TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
/**
|
|
|
|
* plugin.js
|
|
|
|
*
|
|
|
|
* Copyright, Moxiecode Systems AB
|
|
|
|
* Released under LGPL License.
|
|
|
|
*
|
|
|
|
* License: http://www.tinymce.com/license
|
|
|
|
* Contributing: http://www.tinymce.com/contributing
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*global tinymce:true, console:true */
|
2014-03-19 00:46:15 -04:00
|
|
|
/*eslint no-console:0, new-cap:0 */
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This plugin adds missing events form the 4.x API back. Not every event is
|
|
|
|
* properly supported but most things should work.
|
|
|
|
*
|
|
|
|
* Unsupported things:
|
|
|
|
* - No editor.onEvent
|
|
|
|
* - Can't cancel execCommands with beforeExecCommand
|
|
|
|
*/
|
|
|
|
(function(tinymce) {
|
|
|
|
var reported;
|
|
|
|
|
2014-08-09 16:56:15 -04:00
|
|
|
function noop() {
|
|
|
|
}
|
2014-01-30 19:06:12 -05:00
|
|
|
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
function log(apiCall) {
|
|
|
|
if (!reported && window && window.console) {
|
|
|
|
reported = true;
|
|
|
|
console.log("Deprecated TinyMCE API call: " + apiCall);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function Dispatcher(target, newEventName, argsMap, defaultScope) {
|
|
|
|
target = target || this;
|
|
|
|
|
2014-01-30 19:06:12 -05:00
|
|
|
if (!newEventName) {
|
|
|
|
this.add = this.addToTop = this.remove = this.dispatch = noop;
|
2014-01-01 20:07:11 -05:00
|
|
|
return;
|
|
|
|
}
|
2014-01-30 19:06:12 -05:00
|
|
|
|
2014-03-19 00:46:15 -04:00
|
|
|
this.add = function(callback, scope, prepend) {
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
log('<target>.on' + newEventName + ".add(..)");
|
|
|
|
|
|
|
|
// Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2)
|
|
|
|
function patchedEventCallback(e) {
|
|
|
|
var callbackArgs = [];
|
|
|
|
|
|
|
|
if (typeof argsMap == "string") {
|
|
|
|
argsMap = argsMap.split(" ");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (argsMap && typeof argsMap != "function") {
|
|
|
|
for (var i = 0; i < argsMap.length; i++) {
|
|
|
|
callbackArgs.push(e[argsMap[i]]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof argsMap == "function") {
|
|
|
|
callbackArgs = argsMap(newEventName, e, target);
|
|
|
|
if (!callbackArgs) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!argsMap) {
|
|
|
|
callbackArgs = [e];
|
|
|
|
}
|
|
|
|
|
|
|
|
callbackArgs.unshift(defaultScope || target);
|
|
|
|
|
|
|
|
if (callback.apply(scope || defaultScope || target, callbackArgs) === false) {
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-19 00:46:15 -04:00
|
|
|
target.on(newEventName, patchedEventCallback, prepend);
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
|
|
|
|
return patchedEventCallback;
|
|
|
|
};
|
|
|
|
|
2014-03-19 00:46:15 -04:00
|
|
|
this.addToTop = function(callback, scope) {
|
|
|
|
this.add(callback, scope, true);
|
|
|
|
};
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
|
|
|
|
this.remove = function(callback) {
|
|
|
|
return target.off(newEventName, callback);
|
|
|
|
};
|
|
|
|
|
|
|
|
this.dispatch = function() {
|
|
|
|
target.fire(newEventName);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2014-01-01 20:07:11 -05:00
|
|
|
tinymce.util.Dispatcher = Dispatcher;
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
tinymce.onBeforeUnload = new Dispatcher(tinymce, "BeforeUnload");
|
|
|
|
tinymce.onAddEditor = new Dispatcher(tinymce, "AddEditor", "editor");
|
|
|
|
tinymce.onRemoveEditor = new Dispatcher(tinymce, "RemoveEditor", "editor");
|
|
|
|
|
2014-01-01 20:07:11 -05:00
|
|
|
tinymce.util.Cookie = {
|
|
|
|
get: noop, getHash: noop, remove: noop, set: noop, setHash: noop
|
|
|
|
};
|
|
|
|
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
function patchEditor(editor) {
|
|
|
|
function patchEditorEvents(oldEventNames, argsMap) {
|
|
|
|
tinymce.each(oldEventNames.split(" "), function(oldName) {
|
|
|
|
editor["on" + oldName] = new Dispatcher(editor, oldName, argsMap);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function convertUndoEventArgs(type, event, target) {
|
|
|
|
return [
|
|
|
|
event.level,
|
|
|
|
target
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
function filterSelectionEvents(needsSelection) {
|
|
|
|
return function(type, e) {
|
|
|
|
if ((!e.selection && !needsSelection) || e.selection == needsSelection) {
|
|
|
|
return [e];
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
if (editor.controlManager) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-01-02 02:03:11 -05:00
|
|
|
function cmNoop() {
|
|
|
|
var obj = {}, methods = 'add addMenu addSeparator collapse createMenu destroy displayColor expand focus ' +
|
|
|
|
'getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark ' +
|
|
|
|
'postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex ' +
|
|
|
|
'setActive setAriaProperty setColor setDisabled setSelected setState showMenu update';
|
|
|
|
|
|
|
|
log('editor.controlManager.*');
|
|
|
|
|
|
|
|
function _noop() {
|
|
|
|
return cmNoop();
|
|
|
|
}
|
|
|
|
|
2014-01-30 19:06:12 -05:00
|
|
|
tinymce.each(methods.split(' '), function(method) {
|
2014-01-02 02:03:11 -05:00
|
|
|
obj[method] = _noop;
|
|
|
|
});
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
editor.controlManager = {
|
|
|
|
buttons: {},
|
|
|
|
|
|
|
|
setDisabled: function(name, state) {
|
|
|
|
log("controlManager.setDisabled(..)");
|
|
|
|
|
|
|
|
if (this.buttons[name]) {
|
|
|
|
this.buttons[name].disabled(state);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
setActive: function(name, state) {
|
|
|
|
log("controlManager.setActive(..)");
|
|
|
|
|
|
|
|
if (this.buttons[name]) {
|
|
|
|
this.buttons[name].active(state);
|
|
|
|
}
|
2014-01-02 02:03:11 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
onAdd: new Dispatcher(),
|
|
|
|
onPostRender: new Dispatcher(),
|
|
|
|
|
2014-08-09 16:56:15 -04:00
|
|
|
add: function(obj) {
|
|
|
|
return obj;
|
|
|
|
},
|
2014-01-02 02:03:11 -05:00
|
|
|
createButton: cmNoop,
|
|
|
|
createColorSplitButton: cmNoop,
|
|
|
|
createControl: cmNoop,
|
|
|
|
createDropMenu: cmNoop,
|
|
|
|
createListBox: cmNoop,
|
|
|
|
createMenuButton: cmNoop,
|
|
|
|
createSeparator: cmNoop,
|
|
|
|
createSplitButton: cmNoop,
|
|
|
|
createToolbar: cmNoop,
|
|
|
|
createToolbarGroup: cmNoop,
|
|
|
|
destroy: noop,
|
|
|
|
get: noop,
|
|
|
|
setControlType: cmNoop
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
patchEditorEvents("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate", "editor");
|
|
|
|
patchEditorEvents("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset");
|
|
|
|
patchEditorEvents("BeforeExecCommand ExecCommand", "command ui value args"); // args.terminate not supported
|
|
|
|
patchEditorEvents("PreProcess PostProcess LoadContent SaveContent Change");
|
|
|
|
patchEditorEvents("BeforeSetContent BeforeGetContent SetContent GetContent", filterSelectionEvents(false));
|
|
|
|
patchEditorEvents("SetProgressState", "state time");
|
|
|
|
patchEditorEvents("VisualAid", "element hasVisual");
|
|
|
|
patchEditorEvents("Undo Redo", convertUndoEventArgs);
|
|
|
|
|
|
|
|
patchEditorEvents("NodeChange", function(type, e) {
|
|
|
|
return [
|
|
|
|
editor.controlManager,
|
|
|
|
e.element,
|
|
|
|
editor.selection.isCollapsed(),
|
|
|
|
e
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
var originalAddButton = editor.addButton;
|
|
|
|
editor.addButton = function(name, settings) {
|
2014-01-24 20:21:13 -05:00
|
|
|
var originalOnPostRender, string, translated;
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
|
|
|
|
function patchedPostRender() {
|
|
|
|
editor.controlManager.buttons[name] = this;
|
|
|
|
|
|
|
|
if (originalOnPostRender) {
|
|
|
|
return originalOnPostRender.call(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (var key in settings) {
|
|
|
|
if (key.toLowerCase() === "onpostrender") {
|
|
|
|
originalOnPostRender = settings[key];
|
|
|
|
settings.onPostRender = patchedPostRender;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!originalOnPostRender) {
|
|
|
|
settings.onPostRender = patchedPostRender;
|
|
|
|
}
|
|
|
|
|
2014-01-21 21:29:12 -05:00
|
|
|
if ( settings.title ) {
|
2014-03-03 20:57:15 -05:00
|
|
|
// WP
|
2014-01-24 20:21:13 -05:00
|
|
|
string = (editor.settings.language || "en") + "." + settings.title;
|
|
|
|
translated = tinymce.i18n.translate(string);
|
|
|
|
|
|
|
|
if ( string !== translated ) {
|
|
|
|
settings.title = translated;
|
|
|
|
}
|
2014-03-03 20:57:15 -05:00
|
|
|
// WP end
|
2014-01-21 21:29:12 -05:00
|
|
|
}
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
|
|
|
|
return originalAddButton.call(this, name, settings);
|
|
|
|
};
|
|
|
|
|
|
|
|
editor.on('init', function() {
|
|
|
|
var undoManager = editor.undoManager, selection = editor.selection;
|
|
|
|
|
|
|
|
undoManager.onUndo = new Dispatcher(editor, "Undo", convertUndoEventArgs, null, undoManager);
|
|
|
|
undoManager.onRedo = new Dispatcher(editor, "Redo", convertUndoEventArgs, null, undoManager);
|
|
|
|
undoManager.onBeforeAdd = new Dispatcher(editor, "BeforeAddUndo", null, undoManager);
|
|
|
|
undoManager.onAdd = new Dispatcher(editor, "AddUndo", null, undoManager);
|
|
|
|
|
|
|
|
selection.onBeforeGetContent = new Dispatcher(editor, "BeforeGetContent", filterSelectionEvents(true), selection);
|
|
|
|
selection.onGetContent = new Dispatcher(editor, "GetContent", filterSelectionEvents(true), selection);
|
|
|
|
selection.onBeforeSetContent = new Dispatcher(editor, "BeforeSetContent", filterSelectionEvents(true), selection);
|
|
|
|
selection.onSetContent = new Dispatcher(editor, "SetContent", filterSelectionEvents(true), selection);
|
2014-01-01 20:07:11 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
editor.on('BeforeRenderUI', function() {
|
|
|
|
var windowManager = editor.windowManager;
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
|
2014-01-01 20:07:11 -05:00
|
|
|
windowManager.onOpen = new Dispatcher();
|
|
|
|
windowManager.onClose = new Dispatcher();
|
|
|
|
windowManager.createInstance = function(className, a, b, c, d, e) {
|
TinyMCE 4.0.12, first run.
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed.
- Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js.
- Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced.
- Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins.
- Updates DFW, wp-admin/js/wp-fullscreen.js.
See #24067.
Built from https://develop.svn.wordpress.org/trunk@26876
git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-28 18:53:15 -05:00
|
|
|
log("windowManager.createInstance(..)");
|
|
|
|
|
|
|
|
var constr = tinymce.resolve(className);
|
|
|
|
return new constr(a, b, c, d, e);
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
tinymce.on('SetupEditor', patchEditor);
|
|
|
|
tinymce.PluginManager.add("compat3x", patchEditor);
|
|
|
|
|
|
|
|
tinymce.addI18n = function(prefix, o) {
|
|
|
|
var I18n = tinymce.util.I18n, each = tinymce.each;
|
|
|
|
|
|
|
|
if (typeof(prefix) == "string" && prefix.indexOf('.') === -1) {
|
|
|
|
I18n.add(prefix, o);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!tinymce.is(prefix, 'string')) {
|
|
|
|
each(prefix, function(o, lc) {
|
|
|
|
each(o, function(o, g) {
|
|
|
|
each(o, function(o, k) {
|
|
|
|
if (g === 'common') {
|
|
|
|
I18n.data[lc + '.' + k] = o;
|
|
|
|
} else {
|
|
|
|
I18n.data[lc + '.' + g + '.' + k] = o;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
each(o, function(o, k) {
|
|
|
|
I18n.data[prefix + '.' + k] = o;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
})(tinymce);
|