Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: commits

[8542] Only run that FCKeditor code if it needs to run.

 

 

Bricolage commits RSS feed   Index | Next | Previous | View Threaded


theory at bricolage

Apr 1, 2009, 5:15 PM

Post #1 of 1 (533 views)
Permalink
[8542] Only run that FCKeditor code if it needs to run.

Revision: 8542
Author: theory
Date: 2009-04-01 17:15:25 -0700 (Wed, 01 Apr 2009)
ViewCVS: http://viewsvn.bricolage.cc/?rev=8542&view=rev

Log Message:
-----------
Only run that FCKeditor code if it needs to run.

Modified Paths:
--------------
bricolage/trunk/comp/media/js/lib.js
bricolage/trunk/comp/widgets/wysiwyg/fckeditor.html

Modified: bricolage/trunk/comp/media/js/lib.js
===================================================================
--- bricolage/trunk/comp/media/js/lib.js 2009-04-01 23:27:29 UTC (rev 8541)
+++ bricolage/trunk/comp/media/js/lib.js 2009-04-02 00:15:25 UTC (rev 8542)
@@ -1439,13 +1439,6 @@

// Be sure to call onsubmit() so the wysiwyg fields can be updated.
if (form.onsubmit) form.onsubmit();
-
- // Check for FCK fields to submit, too.
- // http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Troubleshooting#AjaxSubmit
- for ( i = 0; i < parent.frames.length; ++i )
- if ( parent.frames[i].FCK )
- parent.frames[i].FCK.UpdateLinkedField();
-
submitting = false; // Reset this so we can submit again!

// Serialize the form.

Modified: bricolage/trunk/comp/widgets/wysiwyg/fckeditor.html
===================================================================
--- bricolage/trunk/comp/widgets/wysiwyg/fckeditor.html 2009-04-01 23:27:29 UTC (rev 8541)
+++ bricolage/trunk/comp/widgets/wysiwyg/fckeditor.html 2009-04-02 00:15:25 UTC (rev 8542)
@@ -9,5 +9,17 @@
oFCKeditor.ReplaceTextarea();
})
};
+
+ var sub = $('theForm').onsubmit;
+ $('theForm').onsubmit = function () {
+ if ( !arguments.callee.caller) return sub();
+ // Check for FCK fields to submit, too.
+ // http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Troubleshooting#AjaxSubmit
+ for ( i = 0; i < parent.frames.length; ++i ) {
+ if ( parent.frames[i].FCK )
+ parent.frames[i].FCK.UpdateLinkedField();
+ }
+ return sub();
+ };
Event.observe(window, 'load', fckCallback);
</script>

Bricolage commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.