X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..refs/tags/wordpress-4.7-scripts:/wp-includes/js/tinymce/tiny_mce_popup.js diff --git a/wp-includes/js/tinymce/tiny_mce_popup.js b/wp-includes/js/tinymce/tiny_mce_popup.js index 733f4397..4dbe732f 100644 --- a/wp-includes/js/tinymce/tiny_mce_popup.js +++ b/wp-includes/js/tinymce/tiny_mce_popup.js @@ -1,8 +1,8 @@ /** - * Popup.js + * tinymce_mce_popup.js * - * Copyright, Moxiecode Systems AB * Released under LGPL License. + * Copyright (c) 1999-2015 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing @@ -78,7 +78,7 @@ var tinyMCEPopup = { * tinyMCEPopup.onInit.add(function(ed) { * alert(ed.selection.getContent()); * }); - * + * * // Executes the init method on page load in some object using the SomeObject scope * tinyMCEPopup.onInit.add(SomeObject.init, SomeObject); */ @@ -107,7 +107,7 @@ var tinyMCEPopup = { * Returns a window argument/parameter by name. * * @method getWindowArg - * @param {String} name Name of the window argument to retrive. + * @param {String} name Name of the window argument to retrieve. * @param {String} defaultValue Optional default value to return. * @return {String} Argument value or default value if it wasn't found. */ @@ -121,7 +121,7 @@ var tinyMCEPopup = { * Returns a editor parameter/config option value. * * @method getParam - * @param {String} name Name of the editor config option to retrive. + * @param {String} name Name of the editor config option to retrieve. * @param {String} defaultValue Optional default value to return. * @return {String} Parameter value or default value if it wasn't found. */ @@ -327,7 +327,7 @@ var tinyMCEPopup = { } }, - // Internal functions + // Internal functions _restoreSelection : function() { var e = window.event.srcElement; @@ -359,7 +359,7 @@ var tinyMCEPopup = { "browse": "Browse" }; - var langCode = tinymce.settings.language || 'en'; + var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en'; for (var key in map) { tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]); } @@ -523,7 +523,7 @@ tinymce.util.Dispatcher = function(scope) { var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener; self.inDispatch = true; - + // Needs to be a real loop since the listener count might change while looping // And this is also more efficient for (i = 0; i < listeners.length; i++) {