Browse code

Re-add TinyMCE 2.0.1 to the site settings list - TinyMCE directoy names changed - installer submission settings layout dirty fix

Clarissa Walker authored on 2026/07/27 11:20:38
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,162 +0,0 @@
1
-/**
2
- * mctabs.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
-function MCTabs() {
12
-	this.settings = [];
13
-	this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
14
-};
15
-
16
-MCTabs.prototype.init = function(settings) {
17
-	this.settings = settings;
18
-};
19
-
20
-MCTabs.prototype.getParam = function(name, default_value) {
21
-	var value = null;
22
-
23
-	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
24
-
25
-	// Fix bool values
26
-	if (value == "true" || value == "false")
27
-		return (value == "true");
28
-
29
-	return value;
30
-};
31
-
32
-MCTabs.prototype.showTab =function(tab){
33
-	tab.className = 'current';
34
-	tab.setAttribute("aria-selected", true);
35
-	tab.setAttribute("aria-expanded", true);
36
-	tab.tabIndex = 0;
37
-};
38
-
39
-MCTabs.prototype.hideTab =function(tab){
40
-	var t=this;
41
-
42
-	tab.className = '';
43
-	tab.setAttribute("aria-selected", false);
44
-	tab.setAttribute("aria-expanded", false);
45
-	tab.tabIndex = -1;
46
-};
47
-
48
-MCTabs.prototype.showPanel = function(panel) {
49
-	panel.className = 'current'; 
50
-	panel.setAttribute("aria-hidden", false);
51
-};
52
-
53
-MCTabs.prototype.hidePanel = function(panel) {
54
-	panel.className = 'panel';
55
-	panel.setAttribute("aria-hidden", true);
56
-}; 
57
-
58
-MCTabs.prototype.getPanelForTab = function(tabElm) {
59
-	return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
60
-};
61
-
62
-MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
63
-	var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
64
-
65
-	tabElm = document.getElementById(tab_id);
66
-
67
-	if (panel_id === undefined) {
68
-		panel_id = t.getPanelForTab(tabElm);
69
-	}
70
-
71
-	panelElm= document.getElementById(panel_id);
72
-	panelContainerElm = panelElm ? panelElm.parentNode : null;
73
-	tabContainerElm = tabElm ? tabElm.parentNode : null;
74
-	selectionClass = t.getParam('selection_class', 'current');
75
-
76
-	if (tabElm && tabContainerElm) {
77
-		nodes = tabContainerElm.childNodes;
78
-
79
-		// Hide all other tabs
80
-		for (i = 0; i < nodes.length; i++) {
81
-			if (nodes[i].nodeName == "LI") {
82
-				t.hideTab(nodes[i]);
83
-			}
84
-		}
85
-
86
-		// Show selected tab
87
-		t.showTab(tabElm);
88
-	}
89
-
90
-	if (panelElm && panelContainerElm) {
91
-		nodes = panelContainerElm.childNodes;
92
-
93
-		// Hide all other panels
94
-		for (i = 0; i < nodes.length; i++) {
95
-			if (nodes[i].nodeName == "DIV")
96
-				t.hidePanel(nodes[i]);
97
-		}
98
-
99
-		if (!avoid_focus) { 
100
-			tabElm.focus();
101
-		}
102
-
103
-		// Show selected panel
104
-		t.showPanel(panelElm);
105
-	}
106
-};
107
-
108
-MCTabs.prototype.getAnchor = function() {
109
-	var pos, url = document.location.href;
110
-
111
-	if ((pos = url.lastIndexOf('#')) != -1)
112
-		return url.substring(pos + 1);
113
-
114
-	return "";
115
-};
116
-
117
-
118
-//Global instance
119
-var mcTabs = new MCTabs();
120
-
121
-tinyMCEPopup.onInit.add(function() {
122
-	var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
123
-
124
-	each(dom.select('div.tabs'), function(tabContainerElm) {
125
-		var keyNav;
126
-
127
-		dom.setAttrib(tabContainerElm, "role", "tablist"); 
128
-
129
-		var items = tinyMCEPopup.dom.select('li', tabContainerElm);
130
-		var action = function(id) {
131
-			mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
132
-			mcTabs.onChange.dispatch(id);
133
-		};
134
-
135
-		each(items, function(item) {
136
-			dom.setAttrib(item, 'role', 'tab');
137
-			dom.bind(item, 'click', function(evt) {
138
-				action(item.id);
139
-			});
140
-		});
141
-
142
-		dom.bind(dom.getRoot(), 'keydown', function(evt) {
143
-			if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
144
-				keyNav.moveFocus(evt.shiftKey ? -1 : 1);
145
-				tinymce.dom.Event.cancel(evt);
146
-			}
147
-		});
148
-
149
-		each(dom.select('a', tabContainerElm), function(a) {
150
-			dom.setAttrib(a, 'tabindex', '-1');
151
-		});
152
-
153
-		keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
154
-			root: tabContainerElm,
155
-			items: items,
156
-			onAction: action,
157
-			actOnFocus: true,
158
-			enableLeftRight: true,
159
-			enableUpDown: true
160
-		}, tinyMCEPopup.dom);
161
-	});
162
-});
163 0
\ No newline at end of file
Browse code

Actually use TinyMCE 3.4.8 for TinyMCE3 option instead of original 2.0.1; that version is moved to 'tinymce2' directory

Clarissa Walker authored on 2026/07/27 09:02:31
Showing 1 changed files
... ...
@@ -1,76 +1,162 @@
1
-/**
2
- * $Id: mctabs.js 758 2008-03-30 13:53:29Z spocke $
3
- *
4
- * Moxiecode DHTML Tabs script.
5
- *
6
- * @author Moxiecode
7
- * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
8
- */
9
-
10
-function MCTabs() {
11
-	this.settings = [];
12
-};
13
-
14
-MCTabs.prototype.init = function(settings) {
15
-	this.settings = settings;
16
-};
17
-
18
-MCTabs.prototype.getParam = function(name, default_value) {
19
-	var value = null;
20
-
21
-	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
22
-
23
-	// Fix bool values
24
-	if (value == "true" || value == "false")
25
-		return (value == "true");
26
-
27
-	return value;
28
-};
29
-
30
-MCTabs.prototype.displayTab = function(tab_id, panel_id) {
31
-	var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
32
-
33
-	panelElm= document.getElementById(panel_id);
34
-	panelContainerElm = panelElm ? panelElm.parentNode : null;
35
-	tabElm = document.getElementById(tab_id);
36
-	tabContainerElm = tabElm ? tabElm.parentNode : null;
37
-	selectionClass = this.getParam('selection_class', 'current');
38
-
39
-	if (tabElm && tabContainerElm) {
40
-		nodes = tabContainerElm.childNodes;
41
-
42
-		// Hide all other tabs
43
-		for (i = 0; i < nodes.length; i++) {
44
-			if (nodes[i].nodeName == "LI")
45
-				nodes[i].className = '';
46
-		}
47
-
48
-		// Show selected tab
49
-		tabElm.className = 'current';
50
-	}
51
-
52
-	if (panelElm && panelContainerElm) {
53
-		nodes = panelContainerElm.childNodes;
54
-
55
-		// Hide all other panels
56
-		for (i = 0; i < nodes.length; i++) {
57
-			if (nodes[i].nodeName == "DIV")
58
-				nodes[i].className = 'panel';
59
-		}
60
-
61
-		// Show selected panel
62
-		panelElm.className = 'current';
63
-	}
64
-};
65
-
66
-MCTabs.prototype.getAnchor = function() {
67
-	var pos, url = document.location.href;
68
-
69
-	if ((pos = url.lastIndexOf('#')) != -1)
70
-		return url.substring(pos + 1);
71
-
72
-	return "";
73
-};
74
-
75
-// Global instance
76
-var mcTabs = new MCTabs();
1
+/**
2
+ * mctabs.js
3
+ *
4
+ * Copyright 2009, Moxiecode Systems AB
5
+ * Released under LGPL License.
6
+ *
7
+ * License: http://tinymce.moxiecode.com/license
8
+ * Contributing: http://tinymce.moxiecode.com/contributing
9
+ */
10
+
11
+function MCTabs() {
12
+	this.settings = [];
13
+	this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
14
+};
15
+
16
+MCTabs.prototype.init = function(settings) {
17
+	this.settings = settings;
18
+};
19
+
20
+MCTabs.prototype.getParam = function(name, default_value) {
21
+	var value = null;
22
+
23
+	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
24
+
25
+	// Fix bool values
26
+	if (value == "true" || value == "false")
27
+		return (value == "true");
28
+
29
+	return value;
30
+};
31
+
32
+MCTabs.prototype.showTab =function(tab){
33
+	tab.className = 'current';
34
+	tab.setAttribute("aria-selected", true);
35
+	tab.setAttribute("aria-expanded", true);
36
+	tab.tabIndex = 0;
37
+};
38
+
39
+MCTabs.prototype.hideTab =function(tab){
40
+	var t=this;
41
+
42
+	tab.className = '';
43
+	tab.setAttribute("aria-selected", false);
44
+	tab.setAttribute("aria-expanded", false);
45
+	tab.tabIndex = -1;
46
+};
47
+
48
+MCTabs.prototype.showPanel = function(panel) {
49
+	panel.className = 'current'; 
50
+	panel.setAttribute("aria-hidden", false);
51
+};
52
+
53
+MCTabs.prototype.hidePanel = function(panel) {
54
+	panel.className = 'panel';
55
+	panel.setAttribute("aria-hidden", true);
56
+}; 
57
+
58
+MCTabs.prototype.getPanelForTab = function(tabElm) {
59
+	return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
60
+};
61
+
62
+MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
63
+	var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
64
+
65
+	tabElm = document.getElementById(tab_id);
66
+
67
+	if (panel_id === undefined) {
68
+		panel_id = t.getPanelForTab(tabElm);
69
+	}
70
+
71
+	panelElm= document.getElementById(panel_id);
72
+	panelContainerElm = panelElm ? panelElm.parentNode : null;
73
+	tabContainerElm = tabElm ? tabElm.parentNode : null;
74
+	selectionClass = t.getParam('selection_class', 'current');
75
+
76
+	if (tabElm && tabContainerElm) {
77
+		nodes = tabContainerElm.childNodes;
78
+
79
+		// Hide all other tabs
80
+		for (i = 0; i < nodes.length; i++) {
81
+			if (nodes[i].nodeName == "LI") {
82
+				t.hideTab(nodes[i]);
83
+			}
84
+		}
85
+
86
+		// Show selected tab
87
+		t.showTab(tabElm);
88
+	}
89
+
90
+	if (panelElm && panelContainerElm) {
91
+		nodes = panelContainerElm.childNodes;
92
+
93
+		// Hide all other panels
94
+		for (i = 0; i < nodes.length; i++) {
95
+			if (nodes[i].nodeName == "DIV")
96
+				t.hidePanel(nodes[i]);
97
+		}
98
+
99
+		if (!avoid_focus) { 
100
+			tabElm.focus();
101
+		}
102
+
103
+		// Show selected panel
104
+		t.showPanel(panelElm);
105
+	}
106
+};
107
+
108
+MCTabs.prototype.getAnchor = function() {
109
+	var pos, url = document.location.href;
110
+
111
+	if ((pos = url.lastIndexOf('#')) != -1)
112
+		return url.substring(pos + 1);
113
+
114
+	return "";
115
+};
116
+
117
+
118
+//Global instance
119
+var mcTabs = new MCTabs();
120
+
121
+tinyMCEPopup.onInit.add(function() {
122
+	var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
123
+
124
+	each(dom.select('div.tabs'), function(tabContainerElm) {
125
+		var keyNav;
126
+
127
+		dom.setAttrib(tabContainerElm, "role", "tablist"); 
128
+
129
+		var items = tinyMCEPopup.dom.select('li', tabContainerElm);
130
+		var action = function(id) {
131
+			mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
132
+			mcTabs.onChange.dispatch(id);
133
+		};
134
+
135
+		each(items, function(item) {
136
+			dom.setAttrib(item, 'role', 'tab');
137
+			dom.bind(item, 'click', function(evt) {
138
+				action(item.id);
139
+			});
140
+		});
141
+
142
+		dom.bind(dom.getRoot(), 'keydown', function(evt) {
143
+			if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
144
+				keyNav.moveFocus(evt.shiftKey ? -1 : 1);
145
+				tinymce.dom.Event.cancel(evt);
146
+			}
147
+		});
148
+
149
+		each(dom.select('a', tabContainerElm), function(a) {
150
+			dom.setAttrib(a, 'tabindex', '-1');
151
+		});
152
+
153
+		keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
154
+			root: tabContainerElm,
155
+			items: items,
156
+			onAction: action,
157
+			actOnFocus: true,
158
+			enableLeftRight: true,
159
+			enableUpDown: true
160
+		}, tinyMCEPopup.dom);
161
+	});
162
+});
77 163
\ No newline at end of file
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,76 @@
1
+/**
2
+ * $Id: mctabs.js 758 2008-03-30 13:53:29Z spocke $
3
+ *
4
+ * Moxiecode DHTML Tabs script.
5
+ *
6
+ * @author Moxiecode
7
+ * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
8
+ */
9
+
10
+function MCTabs() {
11
+	this.settings = [];
12
+};
13
+
14
+MCTabs.prototype.init = function(settings) {
15
+	this.settings = settings;
16
+};
17
+
18
+MCTabs.prototype.getParam = function(name, default_value) {
19
+	var value = null;
20
+
21
+	value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
22
+
23
+	// Fix bool values
24
+	if (value == "true" || value == "false")
25
+		return (value == "true");
26
+
27
+	return value;
28
+};
29
+
30
+MCTabs.prototype.displayTab = function(tab_id, panel_id) {
31
+	var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i;
32
+
33
+	panelElm= document.getElementById(panel_id);
34
+	panelContainerElm = panelElm ? panelElm.parentNode : null;
35
+	tabElm = document.getElementById(tab_id);
36
+	tabContainerElm = tabElm ? tabElm.parentNode : null;
37
+	selectionClass = this.getParam('selection_class', 'current');
38
+
39
+	if (tabElm && tabContainerElm) {
40
+		nodes = tabContainerElm.childNodes;
41
+
42
+		// Hide all other tabs
43
+		for (i = 0; i < nodes.length; i++) {
44
+			if (nodes[i].nodeName == "LI")
45
+				nodes[i].className = '';
46
+		}
47
+
48
+		// Show selected tab
49
+		tabElm.className = 'current';
50
+	}
51
+
52
+	if (panelElm && panelContainerElm) {
53
+		nodes = panelContainerElm.childNodes;
54
+
55
+		// Hide all other panels
56
+		for (i = 0; i < nodes.length; i++) {
57
+			if (nodes[i].nodeName == "DIV")
58
+				nodes[i].className = 'panel';
59
+		}
60
+
61
+		// Show selected panel
62
+		panelElm.className = 'current';
63
+	}
64
+};
65
+
66
+MCTabs.prototype.getAnchor = function() {
67
+	var pos, url = document.location.href;
68
+
69
+	if ((pos = url.lastIndexOf('#')) != -1)
70
+		return url.substring(pos + 1);
71
+
72
+	return "";
73
+};
74
+
75
+// Global instance
76
+var mcTabs = new MCTabs();