Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[livejournal] r20170: LJSUP-9926: No need to show "Restore fro...

Committer: szhirkov
LJSUP-9926: No need to show "Restore from draft" dialog (on update.bml) if user adds image to post (from catalog)
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
U   trunk/htdocs/editjournal.bml
U   trunk/htdocs/update.bml
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-09-29 08:11:51 UTC (rev 20169)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-09-29 08:55:55 UTC (rev 20170)
@@ -1581,15 +1581,17 @@
             type: 'add'
         })
         .bind('htmlready', function (event) {
+            var html = event.htmlStrings,
+                editor;
+
             if (window.switchedRteOn) {
-                var html = event.htmlStrings,
-                    editor = CKEDITOR.instances.draft;
+                editor = CKEDITOR.instances.draft;
 
                 for (var i = 0, l = html.length; i < l; i++) {
                     editor.insertElement(new CKEDITOR.dom.element.createFromHtml(html[i], editor.document));
                 }
             } else {
-                jQuery('#draft').val(jQuery('#draft').val() + htmlOutput);
+                jQuery('#draft').val(jQuery('#draft').val() + html.join(' '));
             }
         })
         .photouploader('show');

Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-09-29 08:11:51 UTC (rev 20169)
+++ trunk/htdocs/editjournal.bml	2011-09-29 08:55:55 UTC (rev 20170)
@@ -693,9 +693,8 @@
 
         function initUpdateBml() {
             window.isSupUser = $is_sup;
-            window.initEditor();
-
             $onload
+            window.initEditor();
         }
     //]]>
     LiveJournal.qotdText = "$escaped_qotd_text";

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-09-29 08:11:51 UTC (rev 20169)
+++ trunk/htdocs/update.bml	2011-09-29 08:55:55 UTC (rev 20170)
@@ -769,6 +769,7 @@
         function initUpdateBml() {
             window.isSupUser = $is_sup;
             $initDraft
+            $_[0]->{'onload'}
             window.initEditor({
               ask: window.isInitDraft,
               restoreData: $draft,
@@ -777,7 +778,6 @@
               draftStatus: '$eMLrestored ',
               confirmMsg: '$eMLconfirm'
             });
-            $_[0]->{'onload'}
             $pageload
         }
     </script>^;

Tags: aralot, bml, livejournal, pm
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