summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/tabfocus
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
commit420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch)
tree57726b40e8aa9ccf80f874f39d3facefc0331420 /public/javascripts/tiny_mce/plugins/tabfocus
parent241d5e91b2b6716e2861cc77d319c3d3568343a8 (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/tabfocus')
-rw-r--r--public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js1
-rw-r--r--public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js109
2 files changed, 0 insertions, 110 deletions
diff --git a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js
deleted file mode 100644
index 7f1fe26..0000000
--- a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
1(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m<n.length;m++){if(n[m].type!="hidden"){return n[m]}}}else{for(m=j-1;m>=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.EditorManager.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js
deleted file mode 100644
index 0fa8d81..0000000
--- a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js
+++ /dev/null
@@ -1,109 +0,0 @@
1/**
2 * $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $
3 *
4 * @author Moxiecode
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
6 */
7
8(function() {
9 var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
10
11 tinymce.create('tinymce.plugins.TabFocusPlugin', {
12 init : function(ed, url) {
13 function tabCancel(ed, e) {
14 if (e.keyCode === 9)
15 return Event.cancel(e);
16 };
17
18 function tabHandler(ed, e) {
19 var x, i, f, el, v;
20
21 function find(d) {
22 f = DOM.getParent(ed.id, 'form');
23 el = f.elements;
24
25 if (f) {
26 each(el, function(e, i) {
27 if (e.id == ed.id) {
28 x = i;
29 return false;
30 }
31 });
32
33 if (d > 0) {
34 for (i = x + 1; i < el.length; i++) {
35 if (el[i].type != 'hidden')
36 return el[i];
37 }
38 } else {
39 for (i = x - 1; i >= 0; i--) {
40 if (el[i].type != 'hidden')
41 return el[i];
42 }
43 }
44 }
45
46 return null;
47 };
48
49 if (e.keyCode === 9) {
50 v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
51
52 if (v.length == 1) {
53 v[1] = v[0];
54 v[0] = ':prev';
55 }
56
57 // Find element to focus
58 if (e.shiftKey) {
59 if (v[0] == ':prev')
60 el = find(-1);
61 else
62 el = DOM.get(v[0]);
63 } else {
64 if (v[1] == ':next')
65 el = find(1);
66 else
67 el = DOM.get(v[1]);
68 }
69
70 if (el) {
71 if (ed = tinymce.EditorManager.get(el.id || el.name))
72 ed.focus();
73 else
74 window.setTimeout(function() {window.focus();el.focus();}, 10);
75
76 return Event.cancel(e);
77 }
78 }
79 };
80
81 ed.onKeyUp.add(tabCancel);
82
83 if (tinymce.isGecko) {
84 ed.onKeyPress.add(tabHandler);
85 ed.onKeyDown.add(tabCancel);
86 } else
87 ed.onKeyDown.add(tabHandler);
88
89 ed.onInit.add(function() {
90 each(DOM.select('a:first,a:last', ed.getContainer()), function(n) {
91 Event.add(n, 'focus', function() {ed.focus();});
92 });
93 });
94 },
95
96 getInfo : function() {
97 return {
98 longname : 'Tabfocus',
99 author : 'Moxiecode Systems AB',
100 authorurl : 'http://tinymce.moxiecode.com',
101 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
102 version : tinymce.majorVersion + "." + tinymce.minorVersion
103 };
104 }
105 });
106
107 // Register plugin
108 tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
109})(); \ No newline at end of file