Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/tinymce
File: tiny_mce_popup.js
/**
[0] Fix | Delete
* tinymce_mce_popup.js
[1] Fix | Delete
*
[2] Fix | Delete
* Released under LGPL License.
[3] Fix | Delete
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
[4] Fix | Delete
*
[5] Fix | Delete
* License: http://www.tinymce.com/license
[6] Fix | Delete
* Contributing: http://www.tinymce.com/contributing
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
var tinymce, tinyMCE;
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* TinyMCE popup/dialog helper class. This gives you easy access to the
[13] Fix | Delete
* parent editor instance and a bunch of other things. It's higly recommended
[14] Fix | Delete
* that you load this script into your dialogs.
[15] Fix | Delete
*
[16] Fix | Delete
* @static
[17] Fix | Delete
* @class tinyMCEPopup
[18] Fix | Delete
*/
[19] Fix | Delete
var tinyMCEPopup = {
[20] Fix | Delete
/**
[21] Fix | Delete
* Initializes the popup this will be called automatically.
[22] Fix | Delete
*
[23] Fix | Delete
* @method init
[24] Fix | Delete
*/
[25] Fix | Delete
init: function () {
[26] Fix | Delete
var self = this, parentWin, settings, uiWindow;
[27] Fix | Delete
[28] Fix | Delete
// Find window & API
[29] Fix | Delete
parentWin = self.getWin();
[30] Fix | Delete
tinymce = tinyMCE = parentWin.tinymce;
[31] Fix | Delete
self.editor = tinymce.EditorManager.activeEditor;
[32] Fix | Delete
self.params = self.editor.windowManager.getParams();
[33] Fix | Delete
[34] Fix | Delete
uiWindow = self.editor.windowManager.windows[self.editor.windowManager.windows.length - 1];
[35] Fix | Delete
self.features = uiWindow.features;
[36] Fix | Delete
self.uiWindow = uiWindow;
[37] Fix | Delete
[38] Fix | Delete
settings = self.editor.settings;
[39] Fix | Delete
[40] Fix | Delete
// Setup popup CSS path(s)
[41] Fix | Delete
if (settings.popup_css !== false) {
[42] Fix | Delete
if (settings.popup_css) {
[43] Fix | Delete
settings.popup_css = self.editor.documentBaseURI.toAbsolute(settings.popup_css);
[44] Fix | Delete
} else {
[45] Fix | Delete
settings.popup_css = self.editor.baseURI.toAbsolute("plugins/compat3x/css/dialog.css");
[46] Fix | Delete
}
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
if (settings.popup_css_add) {
[50] Fix | Delete
settings.popup_css += ',' + self.editor.documentBaseURI.toAbsolute(settings.popup_css_add);
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
// Setup local DOM
[54] Fix | Delete
self.dom = self.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document, {
[55] Fix | Delete
ownEvents: true,
[56] Fix | Delete
proxy: tinyMCEPopup._eventProxy
[57] Fix | Delete
});
[58] Fix | Delete
[59] Fix | Delete
self.dom.bind(window, 'ready', self._onDOMLoaded, self);
[60] Fix | Delete
[61] Fix | Delete
// Enables you to skip loading the default css
[62] Fix | Delete
if (self.features.popup_css !== false) {
[63] Fix | Delete
self.dom.loadCSS(self.features.popup_css || self.editor.settings.popup_css);
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
// Setup on init listeners
[67] Fix | Delete
self.listeners = [];
[68] Fix | Delete
[69] Fix | Delete
/**
[70] Fix | Delete
* Fires when the popup is initialized.
[71] Fix | Delete
*
[72] Fix | Delete
* @event onInit
[73] Fix | Delete
* @param {tinymce.Editor} editor Editor instance.
[74] Fix | Delete
* @example
[75] Fix | Delete
* // Alerts the selected contents when the dialog is loaded
[76] Fix | Delete
* tinyMCEPopup.onInit.add(function(ed) {
[77] Fix | Delete
* alert(ed.selection.getContent());
[78] Fix | Delete
* });
[79] Fix | Delete
*
[80] Fix | Delete
* // Executes the init method on page load in some object using the SomeObject scope
[81] Fix | Delete
* tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
[82] Fix | Delete
*/
[83] Fix | Delete
self.onInit = {
[84] Fix | Delete
add: function (func, scope) {
[85] Fix | Delete
self.listeners.push({ func: func, scope: scope });
[86] Fix | Delete
}
[87] Fix | Delete
};
[88] Fix | Delete
[89] Fix | Delete
self.isWindow = !self.getWindowArg('mce_inline');
[90] Fix | Delete
self.id = self.getWindowArg('mce_window_id');
[91] Fix | Delete
},
[92] Fix | Delete
[93] Fix | Delete
/**
[94] Fix | Delete
* Returns the reference to the parent window that opened the dialog.
[95] Fix | Delete
*
[96] Fix | Delete
* @method getWin
[97] Fix | Delete
* @return {Window} Reference to the parent window that opened the dialog.
[98] Fix | Delete
*/
[99] Fix | Delete
getWin: function () {
[100] Fix | Delete
// Added frameElement check to fix bug: #2817583
[101] Fix | Delete
return (!window.frameElement && window.dialogArguments) || opener || parent || top;
[102] Fix | Delete
},
[103] Fix | Delete
[104] Fix | Delete
/**
[105] Fix | Delete
* Returns a window argument/parameter by name.
[106] Fix | Delete
*
[107] Fix | Delete
* @method getWindowArg
[108] Fix | Delete
* @param {String} name Name of the window argument to retrieve.
[109] Fix | Delete
* @param {String} defaultValue Optional default value to return.
[110] Fix | Delete
* @return {String} Argument value or default value if it wasn't found.
[111] Fix | Delete
*/
[112] Fix | Delete
getWindowArg: function (name, defaultValue) {
[113] Fix | Delete
var value = this.params[name];
[114] Fix | Delete
[115] Fix | Delete
return tinymce.is(value) ? value : defaultValue;
[116] Fix | Delete
},
[117] Fix | Delete
[118] Fix | Delete
/**
[119] Fix | Delete
* Returns a editor parameter/config option value.
[120] Fix | Delete
*
[121] Fix | Delete
* @method getParam
[122] Fix | Delete
* @param {String} name Name of the editor config option to retrieve.
[123] Fix | Delete
* @param {String} defaultValue Optional default value to return.
[124] Fix | Delete
* @return {String} Parameter value or default value if it wasn't found.
[125] Fix | Delete
*/
[126] Fix | Delete
getParam: function (name, defaultValue) {
[127] Fix | Delete
return this.editor.getParam(name, defaultValue);
[128] Fix | Delete
},
[129] Fix | Delete
[130] Fix | Delete
/**
[131] Fix | Delete
* Returns a language item by key.
[132] Fix | Delete
*
[133] Fix | Delete
* @method getLang
[134] Fix | Delete
* @param {String} name Language item like mydialog.something.
[135] Fix | Delete
* @param {String} defaultValue Optional default value to return.
[136] Fix | Delete
* @return {String} Language value for the item like "my string" or the default value if it wasn't found.
[137] Fix | Delete
*/
[138] Fix | Delete
getLang: function (name, defaultValue) {
[139] Fix | Delete
return this.editor.getLang(name, defaultValue);
[140] Fix | Delete
},
[141] Fix | Delete
[142] Fix | Delete
/**
[143] Fix | Delete
* Executed a command on editor that opened the dialog/popup.
[144] Fix | Delete
*
[145] Fix | Delete
* @method execCommand
[146] Fix | Delete
* @param {String} cmd Command to execute.
[147] Fix | Delete
* @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
[148] Fix | Delete
* @param {Object} val Optional value to pass with the comman like an URL.
[149] Fix | Delete
* @param {Object} a Optional arguments object.
[150] Fix | Delete
*/
[151] Fix | Delete
execCommand: function (cmd, ui, val, args) {
[152] Fix | Delete
args = args || {};
[153] Fix | Delete
args.skip_focus = 1;
[154] Fix | Delete
[155] Fix | Delete
this.restoreSelection();
[156] Fix | Delete
return this.editor.execCommand(cmd, ui, val, args);
[157] Fix | Delete
},
[158] Fix | Delete
[159] Fix | Delete
/**
[160] Fix | Delete
* Resizes the dialog to the inner size of the window. This is needed since various browsers
[161] Fix | Delete
* have different border sizes on windows.
[162] Fix | Delete
*
[163] Fix | Delete
* @method resizeToInnerSize
[164] Fix | Delete
*/
[165] Fix | Delete
resizeToInnerSize: function () {
[166] Fix | Delete
/*var self = this;
[167] Fix | Delete
[168] Fix | Delete
// Detach it to workaround a Chrome specific bug
[169] Fix | Delete
// https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281
[170] Fix | Delete
setTimeout(function() {
[171] Fix | Delete
var vp = self.dom.getViewPort(window);
[172] Fix | Delete
[173] Fix | Delete
self.editor.windowManager.resizeBy(
[174] Fix | Delete
self.getWindowArg('mce_width') - vp.w,
[175] Fix | Delete
self.getWindowArg('mce_height') - vp.h,
[176] Fix | Delete
self.id || window
[177] Fix | Delete
);
[178] Fix | Delete
}, 10);*/
[179] Fix | Delete
},
[180] Fix | Delete
[181] Fix | Delete
/**
[182] Fix | Delete
* Will executed the specified string when the page has been loaded. This function
[183] Fix | Delete
* was added for compatibility with the 2.x branch.
[184] Fix | Delete
*
[185] Fix | Delete
* @method executeOnLoad
[186] Fix | Delete
* @param {String} evil String to evalutate on init.
[187] Fix | Delete
*/
[188] Fix | Delete
executeOnLoad: function (evil) {
[189] Fix | Delete
this.onInit.add(function () {
[190] Fix | Delete
eval(evil);
[191] Fix | Delete
});
[192] Fix | Delete
},
[193] Fix | Delete
[194] Fix | Delete
/**
[195] Fix | Delete
* Stores the current editor selection for later restoration. This can be useful since some browsers
[196] Fix | Delete
* looses it's selection if a control element is selected/focused inside the dialogs.
[197] Fix | Delete
*
[198] Fix | Delete
* @method storeSelection
[199] Fix | Delete
*/
[200] Fix | Delete
storeSelection: function () {
[201] Fix | Delete
this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
[202] Fix | Delete
},
[203] Fix | Delete
[204] Fix | Delete
/**
[205] Fix | Delete
* Restores any stored selection. This can be useful since some browsers
[206] Fix | Delete
* looses it's selection if a control element is selected/focused inside the dialogs.
[207] Fix | Delete
*
[208] Fix | Delete
* @method restoreSelection
[209] Fix | Delete
*/
[210] Fix | Delete
restoreSelection: function () {
[211] Fix | Delete
var self = tinyMCEPopup;
[212] Fix | Delete
[213] Fix | Delete
if (!self.isWindow && tinymce.isIE) {
[214] Fix | Delete
self.editor.selection.moveToBookmark(self.editor.windowManager.bookmark);
[215] Fix | Delete
}
[216] Fix | Delete
},
[217] Fix | Delete
[218] Fix | Delete
/**
[219] Fix | Delete
* Loads a specific dialog language pack. If you pass in plugin_url as a argument
[220] Fix | Delete
* when you open the window it will load the <plugin url>/langs/<code>_dlg.js lang pack file.
[221] Fix | Delete
*
[222] Fix | Delete
* @method requireLangPack
[223] Fix | Delete
*/
[224] Fix | Delete
requireLangPack: function () {
[225] Fix | Delete
var self = this, url = self.getWindowArg('plugin_url') || self.getWindowArg('theme_url'), settings = self.editor.settings, lang;
[226] Fix | Delete
[227] Fix | Delete
if (settings.language !== false) {
[228] Fix | Delete
lang = settings.language || "en";
[229] Fix | Delete
}
[230] Fix | Delete
[231] Fix | Delete
if (url && lang && self.features.translate_i18n !== false && settings.language_load !== false) {
[232] Fix | Delete
url += '/langs/' + lang + '_dlg.js';
[233] Fix | Delete
[234] Fix | Delete
if (!tinymce.ScriptLoader.isDone(url)) {
[235] Fix | Delete
document.write('<script type="text/javascript" src="' + url + '"></script>');
[236] Fix | Delete
tinymce.ScriptLoader.markDone(url);
[237] Fix | Delete
}
[238] Fix | Delete
}
[239] Fix | Delete
},
[240] Fix | Delete
[241] Fix | Delete
/**
[242] Fix | Delete
* Executes a color picker on the specified element id. When the user
[243] Fix | Delete
* then selects a color it will be set as the value of the specified element.
[244] Fix | Delete
*
[245] Fix | Delete
* @method pickColor
[246] Fix | Delete
* @param {DOMEvent} e DOM event object.
[247] Fix | Delete
* @param {string} element_id Element id to be filled with the color value from the picker.
[248] Fix | Delete
*/
[249] Fix | Delete
pickColor: function (e, element_id) {
[250] Fix | Delete
var el = document.getElementById(element_id), colorPickerCallback = this.editor.settings.color_picker_callback;
[251] Fix | Delete
if (colorPickerCallback) {
[252] Fix | Delete
colorPickerCallback.call(
[253] Fix | Delete
this.editor,
[254] Fix | Delete
function (value) {
[255] Fix | Delete
el.value = value;
[256] Fix | Delete
try {
[257] Fix | Delete
el.onchange();
[258] Fix | Delete
} catch (ex) {
[259] Fix | Delete
// Try fire event, ignore errors
[260] Fix | Delete
}
[261] Fix | Delete
},
[262] Fix | Delete
el.value
[263] Fix | Delete
);
[264] Fix | Delete
}
[265] Fix | Delete
},
[266] Fix | Delete
[267] Fix | Delete
/**
[268] Fix | Delete
* Opens a filebrowser/imagebrowser this will set the output value from
[269] Fix | Delete
* the browser as a value on the specified element.
[270] Fix | Delete
*
[271] Fix | Delete
* @method openBrowser
[272] Fix | Delete
* @param {string} element_id Id of the element to set value in.
[273] Fix | Delete
* @param {string} type Type of browser to open image/file/flash.
[274] Fix | Delete
* @param {string} option Option name to get the file_broswer_callback function name from.
[275] Fix | Delete
*/
[276] Fix | Delete
openBrowser: function (element_id, type) {
[277] Fix | Delete
tinyMCEPopup.restoreSelection();
[278] Fix | Delete
this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
[279] Fix | Delete
},
[280] Fix | Delete
[281] Fix | Delete
/**
[282] Fix | Delete
* Creates a confirm dialog. Please don't use the blocking behavior of this
[283] Fix | Delete
* native version use the callback method instead then it can be extended.
[284] Fix | Delete
*
[285] Fix | Delete
* @method confirm
[286] Fix | Delete
* @param {String} t Title for the new confirm dialog.
[287] Fix | Delete
* @param {function} cb Callback function to be executed after the user has selected ok or cancel.
[288] Fix | Delete
* @param {Object} s Optional scope to execute the callback in.
[289] Fix | Delete
*/
[290] Fix | Delete
confirm: function (t, cb, s) {
[291] Fix | Delete
this.editor.windowManager.confirm(t, cb, s, window);
[292] Fix | Delete
},
[293] Fix | Delete
[294] Fix | Delete
/**
[295] Fix | Delete
* Creates a alert dialog. Please don't use the blocking behavior of this
[296] Fix | Delete
* native version use the callback method instead then it can be extended.
[297] Fix | Delete
*
[298] Fix | Delete
* @method alert
[299] Fix | Delete
* @param {String} tx Title for the new alert dialog.
[300] Fix | Delete
* @param {function} cb Callback function to be executed after the user has selected ok.
[301] Fix | Delete
* @param {Object} s Optional scope to execute the callback in.
[302] Fix | Delete
*/
[303] Fix | Delete
alert: function (tx, cb, s) {
[304] Fix | Delete
this.editor.windowManager.alert(tx, cb, s, window);
[305] Fix | Delete
},
[306] Fix | Delete
[307] Fix | Delete
/**
[308] Fix | Delete
* Closes the current window.
[309] Fix | Delete
*
[310] Fix | Delete
* @method close
[311] Fix | Delete
*/
[312] Fix | Delete
close: function () {
[313] Fix | Delete
var t = this;
[314] Fix | Delete
[315] Fix | Delete
// To avoid domain relaxing issue in Opera
[316] Fix | Delete
function close() {
[317] Fix | Delete
t.editor.windowManager.close(window);
[318] Fix | Delete
tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
[319] Fix | Delete
}
[320] Fix | Delete
[321] Fix | Delete
if (tinymce.isOpera) {
[322] Fix | Delete
t.getWin().setTimeout(close, 0);
[323] Fix | Delete
} else {
[324] Fix | Delete
close();
[325] Fix | Delete
}
[326] Fix | Delete
},
[327] Fix | Delete
[328] Fix | Delete
// Internal functions
[329] Fix | Delete
[330] Fix | Delete
_restoreSelection: function () {
[331] Fix | Delete
var e = window.event.srcElement;
[332] Fix | Delete
[333] Fix | Delete
if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) {
[334] Fix | Delete
tinyMCEPopup.restoreSelection();
[335] Fix | Delete
}
[336] Fix | Delete
},
[337] Fix | Delete
[338] Fix | Delete
/* _restoreSelection : function() {
[339] Fix | Delete
var e = window.event.srcElement;
[340] Fix | Delete
[341] Fix | Delete
// If user focus a non text input or textarea
[342] Fix | Delete
if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
[343] Fix | Delete
tinyMCEPopup.restoreSelection();
[344] Fix | Delete
},*/
[345] Fix | Delete
[346] Fix | Delete
_onDOMLoaded: function () {
[347] Fix | Delete
var t = tinyMCEPopup, ti = document.title, h, nv;
[348] Fix | Delete
[349] Fix | Delete
// Translate page
[350] Fix | Delete
if (t.features.translate_i18n !== false) {
[351] Fix | Delete
var map = {
[352] Fix | Delete
"update": "Ok",
[353] Fix | Delete
"insert": "Ok",
[354] Fix | Delete
"cancel": "Cancel",
[355] Fix | Delete
"not_set": "--",
[356] Fix | Delete
"class_name": "Class name",
[357] Fix | Delete
"browse": "Browse"
[358] Fix | Delete
};
[359] Fix | Delete
[360] Fix | Delete
var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en';
[361] Fix | Delete
for (var key in map) {
[362] Fix | Delete
tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]);
[363] Fix | Delete
}
[364] Fix | Delete
[365] Fix | Delete
h = document.body.innerHTML;
[366] Fix | Delete
[367] Fix | Delete
// Replace a=x with a="x" in IE
[368] Fix | Delete
if (tinymce.isIE) {
[369] Fix | Delete
h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"');
[370] Fix | Delete
}
[371] Fix | Delete
[372] Fix | Delete
document.dir = t.editor.getParam('directionality', '');
[373] Fix | Delete
[374] Fix | Delete
if ((nv = t.editor.translate(h)) && nv != h) {
[375] Fix | Delete
document.body.innerHTML = nv;
[376] Fix | Delete
}
[377] Fix | Delete
[378] Fix | Delete
if ((nv = t.editor.translate(ti)) && nv != ti) {
[379] Fix | Delete
document.title = ti = nv;
[380] Fix | Delete
}
[381] Fix | Delete
}
[382] Fix | Delete
[383] Fix | Delete
if (!t.editor.getParam('browser_preferred_colors', false) || !t.isWindow) {
[384] Fix | Delete
t.dom.addClass(document.body, 'forceColors');
[385] Fix | Delete
}
[386] Fix | Delete
[387] Fix | Delete
document.body.style.display = '';
[388] Fix | Delete
[389] Fix | Delete
// Restore selection in IE when focus is placed on a non textarea or input element of the type text
[390] Fix | Delete
if (tinymce.Env.ie) {
[391] Fix | Delete
if (tinymce.Env.ie < 11) {
[392] Fix | Delete
document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
[393] Fix | Delete
[394] Fix | Delete
// Add base target element for it since it would fail with modal dialogs
[395] Fix | Delete
t.dom.add(t.dom.select('head')[0], 'base', { target: '_self' });
[396] Fix | Delete
} else {
[397] Fix | Delete
document.addEventListener('mouseup', tinyMCEPopup._restoreSelection, false);
[398] Fix | Delete
}
[399] Fix | Delete
}
[400] Fix | Delete
[401] Fix | Delete
t.restoreSelection();
[402] Fix | Delete
t.resizeToInnerSize();
[403] Fix | Delete
[404] Fix | Delete
// Set inline title
[405] Fix | Delete
if (!t.isWindow) {
[406] Fix | Delete
t.editor.windowManager.setTitle(window, ti);
[407] Fix | Delete
} else {
[408] Fix | Delete
window.focus();
[409] Fix | Delete
}
[410] Fix | Delete
[411] Fix | Delete
if (!tinymce.isIE && !t.isWindow) {
[412] Fix | Delete
t.dom.bind(document, 'focus', function () {
[413] Fix | Delete
t.editor.windowManager.focus(t.id);
[414] Fix | Delete
});
[415] Fix | Delete
}
[416] Fix | Delete
[417] Fix | Delete
// Patch for accessibility
[418] Fix | Delete
tinymce.each(t.dom.select('select'), function (e) {
[419] Fix | Delete
e.onkeydown = tinyMCEPopup._accessHandler;
[420] Fix | Delete
});
[421] Fix | Delete
[422] Fix | Delete
// Call onInit
[423] Fix | Delete
// Init must be called before focus so the selection won't get lost by the focus call
[424] Fix | Delete
tinymce.each(t.listeners, function (o) {
[425] Fix | Delete
o.func.call(o.scope, t.editor);
[426] Fix | Delete
});
[427] Fix | Delete
[428] Fix | Delete
// Move focus to window
[429] Fix | Delete
if (t.getWindowArg('mce_auto_focus', true)) {
[430] Fix | Delete
window.focus();
[431] Fix | Delete
[432] Fix | Delete
// Focus element with mceFocus class
[433] Fix | Delete
tinymce.each(document.forms, function (f) {
[434] Fix | Delete
tinymce.each(f.elements, function (e) {
[435] Fix | Delete
if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
[436] Fix | Delete
e.focus();
[437] Fix | Delete
return false; // Break loop
[438] Fix | Delete
}
[439] Fix | Delete
});
[440] Fix | Delete
});
[441] Fix | Delete
}
[442] Fix | Delete
[443] Fix | Delete
document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
[444] Fix | Delete
[445] Fix | Delete
if ('textContent' in document) {
[446] Fix | Delete
t.uiWindow.getEl('head').firstChild.textContent = document.title;
[447] Fix | Delete
} else {
[448] Fix | Delete
t.uiWindow.getEl('head').firstChild.innerText = document.title;
[449] Fix | Delete
}
[450] Fix | Delete
},
[451] Fix | Delete
[452] Fix | Delete
_accessHandler: function (e) {
[453] Fix | Delete
e = e || window.event;
[454] Fix | Delete
[455] Fix | Delete
if (e.keyCode == 13 || e.keyCode == 32) {
[456] Fix | Delete
var elm = e.target || e.srcElement;
[457] Fix | Delete
[458] Fix | Delete
if (elm.onchange) {
[459] Fix | Delete
elm.onchange();
[460] Fix | Delete
}
[461] Fix | Delete
[462] Fix | Delete
return tinymce.dom.Event.cancel(e);
[463] Fix | Delete
}
[464] Fix | Delete
},
[465] Fix | Delete
[466] Fix | Delete
_closeWinKeyHandler: function (e) {
[467] Fix | Delete
e = e || window.event;
[468] Fix | Delete
[469] Fix | Delete
if (e.keyCode == 27) {
[470] Fix | Delete
tinyMCEPopup.close();
[471] Fix | Delete
}
[472] Fix | Delete
},
[473] Fix | Delete
[474] Fix | Delete
_eventProxy: function (id) {
[475] Fix | Delete
return function (evt) {
[476] Fix | Delete
tinyMCEPopup.dom.events.callNativeHandler(id, evt);
[477] Fix | Delete
};
[478] Fix | Delete
}
[479] Fix | Delete
};
[480] Fix | Delete
[481] Fix | Delete
tinyMCEPopup.init();
[482] Fix | Delete
[483] Fix | Delete
tinymce.util.Dispatcher = function (scope) {
[484] Fix | Delete
this.scope = scope || this;
[485] Fix | Delete
this.listeners = [];
[486] Fix | Delete
[487] Fix | Delete
this.add = function (callback, scope) {
[488] Fix | Delete
this.listeners.push({ cb: callback, scope: scope || this.scope });
[489] Fix | Delete
[490] Fix | Delete
return callback;
[491] Fix | Delete
};
[492] Fix | Delete
[493] Fix | Delete
this.addToTop = function (callback, scope) {
[494] Fix | Delete
var self = this, listener = { cb: callback, scope: scope || self.scope };
[495] Fix | Delete
[496] Fix | Delete
// Create new listeners if addToTop is executed in a dispatch loop
[497] Fix | Delete
if (self.inDispatch) {
[498] Fix | Delete
self.listeners = [listener].concat(self.listeners);
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function