[Pieforms-commit] SF.net SVN: pieforms: [282] pieforms-php5/trunk/src/static/core/pieforms.js
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2008-01-29 04:24:41
|
Revision: 282 http://pieforms.svn.sourceforge.net/pieforms/?rev=282&view=rev Author: oracleshinoda Date: 2008-01-28 20:24:46 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Added a new signal/slot, 'onreply', which is triggered just before the old form is replaced by the new form in the DOM. Useful for the WYSIWYG element, so it can call tinyMCE.execCommand('removeEditor', ...) then, to correctly clean up tinyMCE. Because of the new signal/slot mechanism, the hack to force saving of tinyMCE instances isn't required any more either. Modified Paths: -------------- pieforms-php5/trunk/src/static/core/pieforms.js Modified: pieforms-php5/trunk/src/static/core/pieforms.js =================================================================== --- pieforms-php5/trunk/src/static/core/pieforms.js 2008-01-29 04:22:47 UTC (rev 281) +++ pieforms-php5/trunk/src/static/core/pieforms.js 2008-01-29 04:24:46 UTC (rev 282) @@ -110,7 +110,8 @@ this.observers = { 'onload' : [], // when elements are loaded - 'onsubmit': [] // when a form is submitted + 'onsubmit': [], // when a form is submitted + 'onreply' : [] // when a response is received }; addLoadEvent(self.init); @@ -133,10 +134,6 @@ }//}}} this.processForm = function(e) {//{{{ - // HACK: save any tinyMCE elements on the page. - // TODO: allow elements to export javascript to run at certain times - - // like now, when the form is being submitted - if (typeof(tinyMCE) != 'undefined') { tinyMCE.triggerSave(); } PieformManager.signal('onsubmit', self.data.name); // Call the presubmit callback, if there is one @@ -170,6 +167,8 @@ return; } + PieformManager.signal('onreply', self.data.name); + var tmp = DIV(); tmp.innerHTML = data.replaceHTML; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |