summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/template/js
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/template/js
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/template/js')
-rw-r--r--public/javascripts/tiny_mce/plugins/template/js/template.js106
1 files changed, 0 insertions, 106 deletions
diff --git a/public/javascripts/tiny_mce/plugins/template/js/template.js b/public/javascripts/tiny_mce/plugins/template/js/template.js
deleted file mode 100644
index 24045d7..0000000
--- a/public/javascripts/tiny_mce/plugins/template/js/template.js
+++ /dev/null
@@ -1,106 +0,0 @@
1tinyMCEPopup.requireLangPack();
2
3var TemplateDialog = {
4 preInit : function() {
5 var url = tinyMCEPopup.getParam("template_external_list_url");
6
7 if (url != null)
8 document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></sc'+'ript>');
9 },
10
11 init : function() {
12 var ed = tinyMCEPopup.editor, tsrc, sel, x, u;
13
14 tsrc = ed.getParam("template_templates", false);
15 sel = document.getElementById('tpath');
16
17 // Setup external template list
18 if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') {
19 for (x=0, tsrc = []; x<tinyMCETemplateList.length; x++)
20 tsrc.push({title : tinyMCETemplateList[x][0], src : tinyMCETemplateList[x][1], description : tinyMCETemplateList[x][2]});
21 }
22
23 for (x=0; x<tsrc.length; x++)
24 sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src));
25
26 this.resize();
27 this.tsrc = tsrc;
28 },
29
30 resize : function() {
31 var w, h, e;
32
33 if (!self.innerWidth) {
34 w = document.body.clientWidth - 50;
35 h = document.body.clientHeight - 160;
36 } else {
37 w = self.innerWidth - 50;
38 h = self.innerHeight - 170;
39 }
40
41 e = document.getElementById('templatesrc');
42
43 if (e) {
44 e.style.height = Math.abs(h) + 'px';
45 e.style.width = Math.abs(w - 5) + 'px';
46 }
47 },
48
49 loadCSSFiles : function(d) {
50 var ed = tinyMCEPopup.editor;
51
52 tinymce.each(ed.getParam("content_css", '').split(','), function(u) {
53 d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');
54 });
55 },
56
57 selectTemplate : function(u, ti) {
58 var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc;
59
60 if (!u)
61 return;
62
63 d.body.innerHTML = this.templateHTML = this.getFileContents(u);
64
65 for (x=0; x<tsrc.length; x++) {
66 if (tsrc[x].title == ti)
67 document.getElementById('tmpldesc').innerHTML = tsrc[x].description || '';
68 }
69 },
70
71 insert : function() {
72 tinyMCEPopup.execCommand('mceInsertTemplate', false, {
73 content : this.templateHTML,
74 selection : tinyMCEPopup.editor.selection.getContent()
75 });
76
77 tinyMCEPopup.close();
78 },
79
80 getFileContents : function(u) {
81 var x, d, t = 'text/plain';
82
83 function g(s) {
84 x = 0;
85
86 try {
87 x = new ActiveXObject(s);
88 } catch (s) {
89 }
90
91 return x;
92 };
93
94 x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest();
95
96 // Synchronous AJAX load file
97 x.overrideMimeType && x.overrideMimeType(t);
98 x.open("GET", u, false);
99 x.send(null);
100
101 return x.responseText;
102 }
103};
104
105TemplateDialog.preInit();
106tinyMCEPopup.onInit.add(TemplateDialog.init, TemplateDialog);