Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[livejournal] r19696: LJSUP-9159: Update and improve RTE by CK...

Committer: vkurkin
LJSUP-9159: Update and improve RTE by CKEditor 3.6.1
U   trunk/htdocs/js/rte.js
U   trunk/htdocs/update.bml
Modified: trunk/htdocs/js/rte.js
===================================================================
--- trunk/htdocs/js/rte.js	2011-08-11 04:47:12 UTC (rev 19695)
+++ trunk/htdocs/js/rte.js	2011-08-11 05:33:26 UTC (rev 19696)
@@ -16,6 +16,8 @@
 				data.lastValue = data.restoreData;
 				data.statusNode.val(data.draftStatus);
 			}
+		} else {
+			data.statusNode.val('');
 		}
 
 		draftData.textArea.val(draftData.lastValue);

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-08-11 04:47:12 UTC (rev 19695)
+++ trunk/htdocs/update.bml	2011-08-11 05:33:26 UTC (rev 19696)
@@ -787,9 +787,9 @@
         # While transforms aren't considered posts, we don't want to
         # prompt the user to restore from a draft on a transform
         if (!LJ::did_post()) {
-            $initDraft = 'initDraft(true);';
+            $initDraft = 'window.isInitDraft = true;';
         } else {
-            $initDraft = 'initDraft(false);';
+            $initDraft = 'window.isInitDraft = false;';
         }
     }
 
@@ -814,15 +814,18 @@
 
         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'
+              });
+            }
             $_[0]->{'onload'}
-            window.initDraft({
-              ask: true,
-              restoreData: $draft,
-              saveMsg: '$eMLautosave',
-              interval: $LJ::AUTOSAVE_DRAFT_INTERVAL,
-              draftStatus: '$eMLrestored ',
-              confirmMsg: '$eMLconfirm'
-            });
             $pageload
         }
     </script>^;

Tags: b_vladi, bml, js, livejournal
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