wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r19859: LJSUP-9625: Backspace works as back butt...

Committer: wisest-owl
LJSUP-9625: Backspace works as back button in RTE - add prompt message [tags: can3p]

U   trunk/htdocs/editjournal.bml
U   trunk/htdocs/update.bml
Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-08-26 03:56:07 UTC (rev 19858)
+++ trunk/htdocs/editjournal.bml	2011-08-26 03:59:45 UTC (rev 19859)
@@ -465,11 +465,15 @@
             # -- this is a hack, should be done by weblib and pushed into \$$head above
             #    in a way which is compatible with both this page and update.bml
             my $is_sup = LJ::SUP->is_remote_sup() ? 1 : 0;
+            LJ::need_string('entryform.close.confirm');
+
             $$head .= qq|
     <script type="text/javascript">
     //<![CDATA[
         function initUpdateBml() {
             window.isSupUser = $is_sup;
+            window.initEditor();
+
             $onload
         }
     //]]>

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-08-26 03:56:07 UTC (rev 19858)
+++ trunk/htdocs/update.bml	2011-08-26 03:59:45 UTC (rev 19859)
@@ -676,6 +676,7 @@
     BML::noparse();
 
     my $is_sup = LJ::SUP->is_remote_sup() ? 1 : 0;
+    LJ::need_string('entryform.close.confirm');
 
     $ret .= qq^
     <script type="text/javascript">
@@ -688,16 +689,14 @@
         function initUpdateBml() {
             window.isSupUser = $is_sup;
             $initDraft
-            if('isInitDraft' in window){
-              window.initDraft({
-                ask: window.isInitDraft,
-                restoreData: $draft,
-                saveMsg: '$eMLautosave',
-                interval: $LJ::AUTOSAVE_DRAFT_INTERVAL,
-                draftStatus: '$eMLrestored ',
-                confirmMsg: '$eMLconfirm'
-              });
-            }
+            window.initEditor({
+              ask: window.isInitDraft,
+              restoreData: $draft,
+              saveMsg: '$eMLautosave',
+              interval: $LJ::AUTOSAVE_DRAFT_INTERVAL,
+              draftStatus: '$eMLrestored ',
+              confirmMsg: '$eMLconfirm'
+            });
             $_[0]->{'onload'}
             $pageload
         }

Tags: bml, can3p, livejournal, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments