summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/save
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
commit9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch)
tree8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /public/javascripts/tiny_mce/plugins/save
parent85a01e35274b8d4d4165a7b26bd7986e211246bb (diff)
parent1853082fcd8c067390c246f9daa01a9b47387497 (diff)
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/save')
-rw-r--r--public/javascripts/tiny_mce/plugins/save/editor_plugin.js1
-rw-r--r--public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js98
2 files changed, 0 insertions, 99 deletions
diff --git a/public/javascripts/tiny_mce/plugins/save/editor_plugin.js b/public/javascripts/tiny_mce/plugins/save/editor_plugin.js
deleted file mode 100644
index 8e93996..0000000
--- a/public/javascripts/tiny_mce/plugins/save/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
1(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js
deleted file mode 100644
index b38be4d..0000000
--- a/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js
+++ /dev/null
@@ -1,98 +0,0 @@
1/**
2 * $Id: editor_plugin_src.js 851 2008-05-26 15:38:49Z spocke $
3 *
4 * @author Moxiecode
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
6 */
7
8(function() {
9 tinymce.create('tinymce.plugins.Save', {
10 init : function(ed, url) {
11 var t = this;
12
13 t.editor = ed;
14
15 // Register commands
16 ed.addCommand('mceSave', t._save, t);
17 ed.addCommand('mceCancel', t._cancel, t);
18
19 // Register buttons
20 ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'});
21 ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'});
22
23 ed.onNodeChange.add(t._nodeChange, t);
24 ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave');
25 },
26
27 getInfo : function() {
28 return {
29 longname : 'Save',
30 author : 'Moxiecode Systems AB',
31 authorurl : 'http://tinymce.moxiecode.com',
32 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',
33 version : tinymce.majorVersion + "." + tinymce.minorVersion
34 };
35 },
36
37 // Private methods
38
39 _nodeChange : function(ed, cm, n) {
40 var ed = this.editor;
41
42 if (ed.getParam('save_enablewhendirty')) {
43 cm.setDisabled('save', !ed.isDirty());
44 cm.setDisabled('cancel', !ed.isDirty());
45 }
46 },
47
48 // Private methods
49
50 _save : function() {
51 var ed = this.editor, formObj, os, i, elementId;
52
53 formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');
54
55 if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
56 return;
57
58 tinyMCE.triggerSave();
59
60 // Use callback instead
61 if (os = ed.getParam("save_onsavecallback")) {
62 if (ed.execCallback('save_onsavecallback', ed)) {
63 ed.startContent = tinymce.trim(ed.getContent({format : 'raw'}));
64 ed.nodeChanged();
65 }
66
67 return;
68 }
69
70 if (formObj) {
71 ed.isNotDirty = true;
72
73 if (formObj.onsubmit == null || formObj.onsubmit() != false)
74 formObj.submit();
75
76 ed.nodeChanged();
77 } else
78 ed.windowManager.alert("Error: No form element found.");
79 },
80
81 _cancel : function() {
82 var ed = this.editor, os, h = tinymce.trim(ed.startContent);
83
84 // Use callback instead
85 if (os = ed.getParam("save_oncancelcallback")) {
86 ed.execCallback('save_oncancelcallback', ed);
87 return;
88 }
89
90 ed.setContent(h);
91 ed.undoManager.clear();
92 ed.nodeChanged();
93 }
94 });
95
96 // Register plugin
97 tinymce.PluginManager.add('save', tinymce.plugins.Save);
98})(); \ No newline at end of file