includes/clientside/tinymce/plugins/save/editor_plugin_src.js
changeset 588 20484deb89cd
parent 459 31c23016ab62
equal deleted inserted replaced
587:705ed7162315 588:20484deb89cd
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 609 2008-02-18 16:19:27Z spocke $
     2  * $Id: editor_plugin_src.js 851 2008-05-26 15:38:49Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
    51 			var ed = this.editor, formObj, os, i, elementId;
    51 			var ed = this.editor, formObj, os, i, elementId;
    52 
    52 
    53 			formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');
    53 			formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');
    54 
    54 
    55 			if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
    55 			if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
    56 				return true;
    56 				return;
    57 
    57 
    58 			tinyMCE.triggerSave();
    58 			tinyMCE.triggerSave();
    59 
    59 
    60 			// Use callback instead
    60 			// Use callback instead
    61 			if (os = ed.getParam("save_onsavecallback")) {
    61 			if (os = ed.getParam("save_onsavecallback")) {
    74 					formObj.submit();
    74 					formObj.submit();
    75 
    75 
    76 				ed.nodeChanged();
    76 				ed.nodeChanged();
    77 			} else
    77 			} else
    78 				ed.windowManager.alert("Error: No form element found.");
    78 				ed.windowManager.alert("Error: No form element found.");
    79 
       
    80 			return true;
       
    81 		},
    79 		},
    82 
    80 
    83 		_cancel : function() {
    81 		_cancel : function() {
    84 			var ed = this.editor, os, h = tinymce.trim(ed.startContent);
    82 			var ed = this.editor, os, h = tinymce.trim(ed.startContent);
    85 
    83