diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 16:58:53 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 16:58:53 +0200 |
| commit | 420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch) | |
| tree | 57726b40e8aa9ccf80f874f39d3facefc0331420 /public/javascripts/tiny_mce/plugins/save | |
| parent | 241d5e91b2b6716e2861cc77d319c3d3568343a8 (diff) | |
Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade)
- config.load_defaults 8.1; merge app:update diffs for all environment files
- Remove routing-filter 0.7.0; replace with native scope '(:locale)' in
routes.rb and default_url_options in ApplicationController
- Delete config/initializers/routing_filter_rails71_patch.rb
- Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3;
migrate admin_interface.js from jQuery .tinymce()/advanced theme to
tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL
- rails-i18n ~> 8.0 added explicitly (previously indirect dependency)
- awesome_nested_set, acts-as-taggable-on pinned to git main/master
(gemspec activerecord < 8.1 ceiling; no functional incompatibility;
repin to version once upstream releases updated gemspecs)
- globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5
- sass-rails, coffee-rails, uglifier moved from :assets group to main
(Sprockets 4 convention; :assets group no longer meaningful)
- Node: head, draft, lock_owner marked belongs_to optional: true
- Page: node, user, editor marked belongs_to optional: true
- Static assets in public/images/ and public/javascripts/ referenced via
plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for
undeclared assets
- sessions_controller_test.rb: remove stale require and dead rescue_action
- users_controller_test.rb: assert button[type=submit] not input[type=submit]
(Rails 8 button_to renders <button> not <input>)
- test_helper.rb: node.reload after children.create! (awesome_nested_set
3.9.0 does not refresh parent in memory after callback)
- 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/save')
| -rw-r--r-- | public/javascripts/tiny_mce/plugins/save/editor_plugin.js | 1 | ||||
| -rw-r--r-- | public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js | 98 |
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 | ||
