Skip to content

Commit

Permalink
Fixed support for loading themes from external URLs.
Browse files Browse the repository at this point in the history
Moved spellchecker JS files into the development package.
  • Loading branch information
spocke committed Nov 22, 2007
1 parent 6bfe4e6 commit 619ff51
Show file tree
Hide file tree
Showing 11 changed files with 384 additions and 19 deletions.
1 change: 1 addition & 0 deletions JSTrim.config
Expand Up @@ -91,4 +91,5 @@
<trim src="jscripts/tiny_mce/plugins/safari/editor_plugin_src.js" dest="jscripts/tiny_mce/plugins/safari/editor_plugin.js" />
<trim src="jscripts/tiny_mce/plugins/compat2x/editor_plugin_src.js" dest="jscripts/tiny_mce/plugins/compat2x/editor_plugin.js" />
<trim src="jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js" dest="jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js" />
<trim src="jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js" dest="jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js" />
</jstrim>
3 changes: 3 additions & 0 deletions changelog.txt
@@ -1,3 +1,6 @@
Version 3.0b2 (2007-11-xx)
Fixed support for loading themes from external URLs.
Moved spellchecker JS files into the development package.
Version 3.0b1 (2007-11-21)
Added new tab_focus option, that enables you to specify a element id or that the next element to be focused on tab key down.
Added new addQueryValueHandler method to the tinymce.Editor class.
Expand Down
17 changes: 10 additions & 7 deletions jscripts/tiny_mce/classes/Editor.js
Expand Up @@ -139,12 +139,6 @@

t.windowManager = new tinymce.WindowManager(t);

// Setup popup CSS path(s)
s.popup_css = t.baseURI.toAbsolute(s.popup_css || "themes/" + s.theme + "/skins/" + s.skin + "/dialog.css");

if (s.popup_css_add)
s.popup_css += ',' + s.popup_css_add;

if (s.encoding == 'xml') {
t.onGetContent.add(function(ed, o) {
if (o.get)
Expand Down Expand Up @@ -194,7 +188,9 @@
// Load scripts
function loadScripts() {
sl.add(tinymce.baseURL + '/langs/' + s.language + '.js');
ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js');

if (s.theme.charAt(0) != '-')
ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js');

each(s.plugins.split(','), function(p) {
if (p && p.charAt(0) != '-') {
Expand Down Expand Up @@ -245,6 +241,7 @@
EditorManager.add(t);

// Create theme
s.theme = s.theme.replace(/-/, '');
o = ThemeManager.get(s.theme);
t.theme = new o();

Expand All @@ -265,6 +262,12 @@
}
});

// Setup popup CSS path(s)
s.popup_css = t.baseURI.toAbsolute(s.popup_css || "themes/" + s.theme + "/skins/" + s.skin + "/dialog.css");

if (s.popup_css_add)
s.popup_css += ',' + s.popup_css_add;

// Setup control factory
t.controlManager = new tinymce.ControlManager(t);
t.undoManager = new tinymce.UndoManager(t);
Expand Down
2 changes: 1 addition & 1 deletion jscripts/tiny_mce/classes/EditorManager.js
Expand Up @@ -63,7 +63,7 @@
sl.add(tinymce.baseURL + '/langs/' + s.language + '.js');

// Load theme
if (s.theme)
if (s.theme && s.theme.charAt(0) != '-')
ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js');

// Load plugins
Expand Down
9 changes: 9 additions & 0 deletions jscripts/tiny_mce/classes/tinymce.js
Expand Up @@ -34,6 +34,15 @@ var tinymce = {
t.isGecko = !t.isWebKit && /Gecko/.test(ua);
// t.isGecko3 = t.isGecko && /(Firefox|Minefield)\/[3-9]/.test(ua);
t.isMac = ua.indexOf('Mac') != -1;

// TinyMCE .NET webcontrol might be setting the values for TinyMCE
if (window.tinyMCEPreInit) {
t.suffix = tinyMCEPreInit.suffix;
t.baseURL = tinyMCEPreInit.base;
return;
}

// Get suffix and base
t.suffix = '';

function getBase(n) {
Expand Down
1 change: 1 addition & 0 deletions jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 619ff51

Please sign in to comment.