Edit File by line
/home/barbar84/www/wp-inclu.../js/tinymce/themes/inlite
File: theme.js
{
[6500] Fix | Delete
name: 'Opera',
[6501] Fix | Delete
versionRegexes: [
[6502] Fix | Delete
normalVersionRegex,
[6503] Fix | Delete
/.*?opera\/([0-9]+)\.([0-9]+).*/
[6504] Fix | Delete
],
[6505] Fix | Delete
search: checkContains('opera')
[6506] Fix | Delete
},
[6507] Fix | Delete
{
[6508] Fix | Delete
name: 'Firefox',
[6509] Fix | Delete
versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
[6510] Fix | Delete
search: checkContains('firefox')
[6511] Fix | Delete
},
[6512] Fix | Delete
{
[6513] Fix | Delete
name: 'Safari',
[6514] Fix | Delete
versionRegexes: [
[6515] Fix | Delete
normalVersionRegex,
[6516] Fix | Delete
/.*?cpu os ([0-9]+)_([0-9]+).*/
[6517] Fix | Delete
],
[6518] Fix | Delete
search: function (uastring) {
[6519] Fix | Delete
return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
[6520] Fix | Delete
}
[6521] Fix | Delete
}
[6522] Fix | Delete
];
[6523] Fix | Delete
var oses = [
[6524] Fix | Delete
{
[6525] Fix | Delete
name: 'Windows',
[6526] Fix | Delete
search: checkContains('win'),
[6527] Fix | Delete
versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
[6528] Fix | Delete
},
[6529] Fix | Delete
{
[6530] Fix | Delete
name: 'iOS',
[6531] Fix | Delete
search: function (uastring) {
[6532] Fix | Delete
return contains(uastring, 'iphone') || contains(uastring, 'ipad');
[6533] Fix | Delete
},
[6534] Fix | Delete
versionRegexes: [
[6535] Fix | Delete
/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
[6536] Fix | Delete
/.*cpu os ([0-9]+)_([0-9]+).*/,
[6537] Fix | Delete
/.*cpu iphone os ([0-9]+)_([0-9]+).*/
[6538] Fix | Delete
]
[6539] Fix | Delete
},
[6540] Fix | Delete
{
[6541] Fix | Delete
name: 'Android',
[6542] Fix | Delete
search: checkContains('android'),
[6543] Fix | Delete
versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
[6544] Fix | Delete
},
[6545] Fix | Delete
{
[6546] Fix | Delete
name: 'OSX',
[6547] Fix | Delete
search: checkContains('os x'),
[6548] Fix | Delete
versionRegexes: [/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]
[6549] Fix | Delete
},
[6550] Fix | Delete
{
[6551] Fix | Delete
name: 'Linux',
[6552] Fix | Delete
search: checkContains('linux'),
[6553] Fix | Delete
versionRegexes: []
[6554] Fix | Delete
},
[6555] Fix | Delete
{
[6556] Fix | Delete
name: 'Solaris',
[6557] Fix | Delete
search: checkContains('sunos'),
[6558] Fix | Delete
versionRegexes: []
[6559] Fix | Delete
},
[6560] Fix | Delete
{
[6561] Fix | Delete
name: 'FreeBSD',
[6562] Fix | Delete
search: checkContains('freebsd'),
[6563] Fix | Delete
versionRegexes: []
[6564] Fix | Delete
}
[6565] Fix | Delete
];
[6566] Fix | Delete
var PlatformInfo = {
[6567] Fix | Delete
browsers: constant(browsers),
[6568] Fix | Delete
oses: constant(oses)
[6569] Fix | Delete
};
[6570] Fix | Delete
[6571] Fix | Delete
var detect$2 = function (userAgent) {
[6572] Fix | Delete
var browsers = PlatformInfo.browsers();
[6573] Fix | Delete
var oses = PlatformInfo.oses();
[6574] Fix | Delete
var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
[6575] Fix | Delete
var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
[6576] Fix | Delete
var deviceType = DeviceType(os, browser, userAgent);
[6577] Fix | Delete
return {
[6578] Fix | Delete
browser: browser,
[6579] Fix | Delete
os: os,
[6580] Fix | Delete
deviceType: deviceType
[6581] Fix | Delete
};
[6582] Fix | Delete
};
[6583] Fix | Delete
var PlatformDetection = { detect: detect$2 };
[6584] Fix | Delete
[6585] Fix | Delete
var detect$3 = cached(function () {
[6586] Fix | Delete
var userAgent = domGlobals.navigator.userAgent;
[6587] Fix | Delete
return PlatformDetection.detect(userAgent);
[6588] Fix | Delete
});
[6589] Fix | Delete
var PlatformDetection$1 = { detect: detect$3 };
[6590] Fix | Delete
[6591] Fix | Delete
var ELEMENT$1 = ELEMENT;
[6592] Fix | Delete
var DOCUMENT$1 = DOCUMENT;
[6593] Fix | Delete
var bypassSelector = function (dom) {
[6594] Fix | Delete
return dom.nodeType !== ELEMENT$1 && dom.nodeType !== DOCUMENT$1 || dom.childElementCount === 0;
[6595] Fix | Delete
};
[6596] Fix | Delete
var all = function (selector, scope) {
[6597] Fix | Delete
var base = scope === undefined ? domGlobals.document : scope.dom();
[6598] Fix | Delete
return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), Element.fromDom);
[6599] Fix | Delete
};
[6600] Fix | Delete
var one = function (selector, scope) {
[6601] Fix | Delete
var base = scope === undefined ? domGlobals.document : scope.dom();
[6602] Fix | Delete
return bypassSelector(base) ? Option.none() : Option.from(base.querySelector(selector)).map(Element.fromDom);
[6603] Fix | Delete
};
[6604] Fix | Delete
[6605] Fix | Delete
var regularContains = function (e1, e2) {
[6606] Fix | Delete
var d1 = e1.dom();
[6607] Fix | Delete
var d2 = e2.dom();
[6608] Fix | Delete
return d1 === d2 ? false : d1.contains(d2);
[6609] Fix | Delete
};
[6610] Fix | Delete
var ieContains = function (e1, e2) {
[6611] Fix | Delete
return Node.documentPositionContainedBy(e1.dom(), e2.dom());
[6612] Fix | Delete
};
[6613] Fix | Delete
var browser = PlatformDetection$1.detect().browser;
[6614] Fix | Delete
var contains$1 = browser.isIE() ? ieContains : regularContains;
[6615] Fix | Delete
[6616] Fix | Delete
var spot = Immutable('element', 'offset');
[6617] Fix | Delete
[6618] Fix | Delete
var descendants = function (scope, selector) {
[6619] Fix | Delete
return all(selector, scope);
[6620] Fix | Delete
};
[6621] Fix | Delete
[6622] Fix | Delete
var trim = global$4.trim;
[6623] Fix | Delete
var hasContentEditableState = function (value) {
[6624] Fix | Delete
return function (node) {
[6625] Fix | Delete
if (node && node.nodeType === 1) {
[6626] Fix | Delete
if (node.contentEditable === value) {
[6627] Fix | Delete
return true;
[6628] Fix | Delete
}
[6629] Fix | Delete
if (node.getAttribute('data-mce-contenteditable') === value) {
[6630] Fix | Delete
return true;
[6631] Fix | Delete
}
[6632] Fix | Delete
}
[6633] Fix | Delete
return false;
[6634] Fix | Delete
};
[6635] Fix | Delete
};
[6636] Fix | Delete
var isContentEditableTrue = hasContentEditableState('true');
[6637] Fix | Delete
var isContentEditableFalse = hasContentEditableState('false');
[6638] Fix | Delete
var create$4 = function (type, title, url, level, attach) {
[6639] Fix | Delete
return {
[6640] Fix | Delete
type: type,
[6641] Fix | Delete
title: title,
[6642] Fix | Delete
url: url,
[6643] Fix | Delete
level: level,
[6644] Fix | Delete
attach: attach
[6645] Fix | Delete
};
[6646] Fix | Delete
};
[6647] Fix | Delete
var isChildOfContentEditableTrue = function (node) {
[6648] Fix | Delete
while (node = node.parentNode) {
[6649] Fix | Delete
var value = node.contentEditable;
[6650] Fix | Delete
if (value && value !== 'inherit') {
[6651] Fix | Delete
return isContentEditableTrue(node);
[6652] Fix | Delete
}
[6653] Fix | Delete
}
[6654] Fix | Delete
return false;
[6655] Fix | Delete
};
[6656] Fix | Delete
var select = function (selector, root) {
[6657] Fix | Delete
return map(descendants(Element.fromDom(root), selector), function (element) {
[6658] Fix | Delete
return element.dom();
[6659] Fix | Delete
});
[6660] Fix | Delete
};
[6661] Fix | Delete
var getElementText = function (elm) {
[6662] Fix | Delete
return elm.innerText || elm.textContent;
[6663] Fix | Delete
};
[6664] Fix | Delete
var getOrGenerateId = function (elm) {
[6665] Fix | Delete
return elm.id ? elm.id : generate('h');
[6666] Fix | Delete
};
[6667] Fix | Delete
var isAnchor = function (elm) {
[6668] Fix | Delete
return elm && elm.nodeName === 'A' && (elm.id || elm.name);
[6669] Fix | Delete
};
[6670] Fix | Delete
var isValidAnchor = function (elm) {
[6671] Fix | Delete
return isAnchor(elm) && isEditable(elm);
[6672] Fix | Delete
};
[6673] Fix | Delete
var isHeader = function (elm) {
[6674] Fix | Delete
return elm && /^(H[1-6])$/.test(elm.nodeName);
[6675] Fix | Delete
};
[6676] Fix | Delete
var isEditable = function (elm) {
[6677] Fix | Delete
return isChildOfContentEditableTrue(elm) && !isContentEditableFalse(elm);
[6678] Fix | Delete
};
[6679] Fix | Delete
var isValidHeader = function (elm) {
[6680] Fix | Delete
return isHeader(elm) && isEditable(elm);
[6681] Fix | Delete
};
[6682] Fix | Delete
var getLevel = function (elm) {
[6683] Fix | Delete
return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;
[6684] Fix | Delete
};
[6685] Fix | Delete
var headerTarget = function (elm) {
[6686] Fix | Delete
var headerId = getOrGenerateId(elm);
[6687] Fix | Delete
var attach = function () {
[6688] Fix | Delete
elm.id = headerId;
[6689] Fix | Delete
};
[6690] Fix | Delete
return create$4('header', getElementText(elm), '#' + headerId, getLevel(elm), attach);
[6691] Fix | Delete
};
[6692] Fix | Delete
var anchorTarget = function (elm) {
[6693] Fix | Delete
var anchorId = elm.id || elm.name;
[6694] Fix | Delete
var anchorText = getElementText(elm);
[6695] Fix | Delete
return create$4('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, noop);
[6696] Fix | Delete
};
[6697] Fix | Delete
var getHeaderTargets = function (elms) {
[6698] Fix | Delete
return map(filter(elms, isValidHeader), headerTarget);
[6699] Fix | Delete
};
[6700] Fix | Delete
var getAnchorTargets = function (elms) {
[6701] Fix | Delete
return map(filter(elms, isValidAnchor), anchorTarget);
[6702] Fix | Delete
};
[6703] Fix | Delete
var getTargetElements = function (elm) {
[6704] Fix | Delete
var elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);
[6705] Fix | Delete
return elms;
[6706] Fix | Delete
};
[6707] Fix | Delete
var hasTitle = function (target) {
[6708] Fix | Delete
return trim(target.title).length > 0;
[6709] Fix | Delete
};
[6710] Fix | Delete
var find$2 = function (elm) {
[6711] Fix | Delete
var elms = getTargetElements(elm);
[6712] Fix | Delete
return filter(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);
[6713] Fix | Delete
};
[6714] Fix | Delete
var LinkTargets = { find: find$2 };
[6715] Fix | Delete
[6716] Fix | Delete
var getActiveEditor = function () {
[6717] Fix | Delete
return window.tinymce ? window.tinymce.activeEditor : global$5.activeEditor;
[6718] Fix | Delete
};
[6719] Fix | Delete
var history = {};
[6720] Fix | Delete
var HISTORY_LENGTH = 5;
[6721] Fix | Delete
var clearHistory = function () {
[6722] Fix | Delete
history = {};
[6723] Fix | Delete
};
[6724] Fix | Delete
var toMenuItem = function (target) {
[6725] Fix | Delete
return {
[6726] Fix | Delete
title: target.title,
[6727] Fix | Delete
value: {
[6728] Fix | Delete
title: { raw: target.title },
[6729] Fix | Delete
url: target.url,
[6730] Fix | Delete
attach: target.attach
[6731] Fix | Delete
}
[6732] Fix | Delete
};
[6733] Fix | Delete
};
[6734] Fix | Delete
var toMenuItems = function (targets) {
[6735] Fix | Delete
return global$4.map(targets, toMenuItem);
[6736] Fix | Delete
};
[6737] Fix | Delete
var staticMenuItem = function (title, url) {
[6738] Fix | Delete
return {
[6739] Fix | Delete
title: title,
[6740] Fix | Delete
value: {
[6741] Fix | Delete
title: title,
[6742] Fix | Delete
url: url,
[6743] Fix | Delete
attach: noop
[6744] Fix | Delete
}
[6745] Fix | Delete
};
[6746] Fix | Delete
};
[6747] Fix | Delete
var isUniqueUrl = function (url, targets) {
[6748] Fix | Delete
var foundTarget = exists(targets, function (target) {
[6749] Fix | Delete
return target.url === url;
[6750] Fix | Delete
});
[6751] Fix | Delete
return !foundTarget;
[6752] Fix | Delete
};
[6753] Fix | Delete
var getSetting = function (editorSettings, name, defaultValue) {
[6754] Fix | Delete
var value = name in editorSettings ? editorSettings[name] : defaultValue;
[6755] Fix | Delete
return value === false ? null : value;
[6756] Fix | Delete
};
[6757] Fix | Delete
var createMenuItems = function (term, targets, fileType, editorSettings) {
[6758] Fix | Delete
var separator = { title: '-' };
[6759] Fix | Delete
var fromHistoryMenuItems = function (history) {
[6760] Fix | Delete
var historyItems = history.hasOwnProperty(fileType) ? history[fileType] : [];
[6761] Fix | Delete
var uniqueHistory = filter(historyItems, function (url) {
[6762] Fix | Delete
return isUniqueUrl(url, targets);
[6763] Fix | Delete
});
[6764] Fix | Delete
return global$4.map(uniqueHistory, function (url) {
[6765] Fix | Delete
return {
[6766] Fix | Delete
title: url,
[6767] Fix | Delete
value: {
[6768] Fix | Delete
title: url,
[6769] Fix | Delete
url: url,
[6770] Fix | Delete
attach: noop
[6771] Fix | Delete
}
[6772] Fix | Delete
};
[6773] Fix | Delete
});
[6774] Fix | Delete
};
[6775] Fix | Delete
var fromMenuItems = function (type) {
[6776] Fix | Delete
var filteredTargets = filter(targets, function (target) {
[6777] Fix | Delete
return target.type === type;
[6778] Fix | Delete
});
[6779] Fix | Delete
return toMenuItems(filteredTargets);
[6780] Fix | Delete
};
[6781] Fix | Delete
var anchorMenuItems = function () {
[6782] Fix | Delete
var anchorMenuItems = fromMenuItems('anchor');
[6783] Fix | Delete
var topAnchor = getSetting(editorSettings, 'anchor_top', '#top');
[6784] Fix | Delete
var bottomAchor = getSetting(editorSettings, 'anchor_bottom', '#bottom');
[6785] Fix | Delete
if (topAnchor !== null) {
[6786] Fix | Delete
anchorMenuItems.unshift(staticMenuItem('<top>', topAnchor));
[6787] Fix | Delete
}
[6788] Fix | Delete
if (bottomAchor !== null) {
[6789] Fix | Delete
anchorMenuItems.push(staticMenuItem('<bottom>', bottomAchor));
[6790] Fix | Delete
}
[6791] Fix | Delete
return anchorMenuItems;
[6792] Fix | Delete
};
[6793] Fix | Delete
var join = function (items) {
[6794] Fix | Delete
return foldl(items, function (a, b) {
[6795] Fix | Delete
var bothEmpty = a.length === 0 || b.length === 0;
[6796] Fix | Delete
return bothEmpty ? a.concat(b) : a.concat(separator, b);
[6797] Fix | Delete
}, []);
[6798] Fix | Delete
};
[6799] Fix | Delete
if (editorSettings.typeahead_urls === false) {
[6800] Fix | Delete
return [];
[6801] Fix | Delete
}
[6802] Fix | Delete
return fileType === 'file' ? join([
[6803] Fix | Delete
filterByQuery(term, fromHistoryMenuItems(history)),
[6804] Fix | Delete
filterByQuery(term, fromMenuItems('header')),
[6805] Fix | Delete
filterByQuery(term, anchorMenuItems())
[6806] Fix | Delete
]) : filterByQuery(term, fromHistoryMenuItems(history));
[6807] Fix | Delete
};
[6808] Fix | Delete
var addToHistory = function (url, fileType) {
[6809] Fix | Delete
var items = history[fileType];
[6810] Fix | Delete
if (!/^https?/.test(url)) {
[6811] Fix | Delete
return;
[6812] Fix | Delete
}
[6813] Fix | Delete
if (items) {
[6814] Fix | Delete
if (indexOf(items, url).isNone()) {
[6815] Fix | Delete
history[fileType] = items.slice(0, HISTORY_LENGTH).concat(url);
[6816] Fix | Delete
}
[6817] Fix | Delete
} else {
[6818] Fix | Delete
history[fileType] = [url];
[6819] Fix | Delete
}
[6820] Fix | Delete
};
[6821] Fix | Delete
var filterByQuery = function (term, menuItems) {
[6822] Fix | Delete
var lowerCaseTerm = term.toLowerCase();
[6823] Fix | Delete
var result = global$4.grep(menuItems, function (item) {
[6824] Fix | Delete
return item.title.toLowerCase().indexOf(lowerCaseTerm) !== -1;
[6825] Fix | Delete
});
[6826] Fix | Delete
return result.length === 1 && result[0].title === term ? [] : result;
[6827] Fix | Delete
};
[6828] Fix | Delete
var getTitle = function (linkDetails) {
[6829] Fix | Delete
var title = linkDetails.title;
[6830] Fix | Delete
return title.raw ? title.raw : title;
[6831] Fix | Delete
};
[6832] Fix | Delete
var setupAutoCompleteHandler = function (ctrl, editorSettings, bodyElm, fileType) {
[6833] Fix | Delete
var autocomplete = function (term) {
[6834] Fix | Delete
var linkTargets = LinkTargets.find(bodyElm);
[6835] Fix | Delete
var menuItems = createMenuItems(term, linkTargets, fileType, editorSettings);
[6836] Fix | Delete
ctrl.showAutoComplete(menuItems, term);
[6837] Fix | Delete
};
[6838] Fix | Delete
ctrl.on('autocomplete', function () {
[6839] Fix | Delete
autocomplete(ctrl.value());
[6840] Fix | Delete
});
[6841] Fix | Delete
ctrl.on('selectitem', function (e) {
[6842] Fix | Delete
var linkDetails = e.value;
[6843] Fix | Delete
ctrl.value(linkDetails.url);
[6844] Fix | Delete
var title = getTitle(linkDetails);
[6845] Fix | Delete
if (fileType === 'image') {
[6846] Fix | Delete
ctrl.fire('change', {
[6847] Fix | Delete
meta: {
[6848] Fix | Delete
alt: title,
[6849] Fix | Delete
attach: linkDetails.attach
[6850] Fix | Delete
}
[6851] Fix | Delete
});
[6852] Fix | Delete
} else {
[6853] Fix | Delete
ctrl.fire('change', {
[6854] Fix | Delete
meta: {
[6855] Fix | Delete
text: title,
[6856] Fix | Delete
attach: linkDetails.attach
[6857] Fix | Delete
}
[6858] Fix | Delete
});
[6859] Fix | Delete
}
[6860] Fix | Delete
ctrl.focus();
[6861] Fix | Delete
});
[6862] Fix | Delete
ctrl.on('click', function (e) {
[6863] Fix | Delete
if (ctrl.value().length === 0 && e.target.nodeName === 'INPUT') {
[6864] Fix | Delete
autocomplete('');
[6865] Fix | Delete
}
[6866] Fix | Delete
});
[6867] Fix | Delete
ctrl.on('PostRender', function () {
[6868] Fix | Delete
ctrl.getRoot().on('submit', function (e) {
[6869] Fix | Delete
if (!e.isDefaultPrevented()) {
[6870] Fix | Delete
addToHistory(ctrl.value(), fileType);
[6871] Fix | Delete
}
[6872] Fix | Delete
});
[6873] Fix | Delete
});
[6874] Fix | Delete
};
[6875] Fix | Delete
var statusToUiState = function (result) {
[6876] Fix | Delete
var status = result.status, message = result.message;
[6877] Fix | Delete
if (status === 'valid') {
[6878] Fix | Delete
return {
[6879] Fix | Delete
status: 'ok',
[6880] Fix | Delete
message: message
[6881] Fix | Delete
};
[6882] Fix | Delete
} else if (status === 'unknown') {
[6883] Fix | Delete
return {
[6884] Fix | Delete
status: 'warn',
[6885] Fix | Delete
message: message
[6886] Fix | Delete
};
[6887] Fix | Delete
} else if (status === 'invalid') {
[6888] Fix | Delete
return {
[6889] Fix | Delete
status: 'warn',
[6890] Fix | Delete
message: message
[6891] Fix | Delete
};
[6892] Fix | Delete
} else {
[6893] Fix | Delete
return {
[6894] Fix | Delete
status: 'none',
[6895] Fix | Delete
message: ''
[6896] Fix | Delete
};
[6897] Fix | Delete
}
[6898] Fix | Delete
};
[6899] Fix | Delete
var setupLinkValidatorHandler = function (ctrl, editorSettings, fileType) {
[6900] Fix | Delete
var validatorHandler = editorSettings.filepicker_validator_handler;
[6901] Fix | Delete
if (validatorHandler) {
[6902] Fix | Delete
var validateUrl_1 = function (url) {
[6903] Fix | Delete
if (url.length === 0) {
[6904] Fix | Delete
ctrl.statusLevel('none');
[6905] Fix | Delete
return;
[6906] Fix | Delete
}
[6907] Fix | Delete
validatorHandler({
[6908] Fix | Delete
url: url,
[6909] Fix | Delete
type: fileType
[6910] Fix | Delete
}, function (result) {
[6911] Fix | Delete
var uiState = statusToUiState(result);
[6912] Fix | Delete
ctrl.statusMessage(uiState.message);
[6913] Fix | Delete
ctrl.statusLevel(uiState.status);
[6914] Fix | Delete
});
[6915] Fix | Delete
};
[6916] Fix | Delete
ctrl.state.on('change:value', function (e) {
[6917] Fix | Delete
validateUrl_1(e.value);
[6918] Fix | Delete
});
[6919] Fix | Delete
}
[6920] Fix | Delete
};
[6921] Fix | Delete
var FilePicker = ComboBox.extend({
[6922] Fix | Delete
Statics: { clearHistory: clearHistory },
[6923] Fix | Delete
init: function (settings) {
[6924] Fix | Delete
var self = this, editor = getActiveEditor(), editorSettings = editor.settings;
[6925] Fix | Delete
var actionCallback, fileBrowserCallback, fileBrowserCallbackTypes;
[6926] Fix | Delete
var fileType = settings.filetype;
[6927] Fix | Delete
settings.spellcheck = false;
[6928] Fix | Delete
fileBrowserCallbackTypes = editorSettings.file_picker_types || editorSettings.file_browser_callback_types;
[6929] Fix | Delete
if (fileBrowserCallbackTypes) {
[6930] Fix | Delete
fileBrowserCallbackTypes = global$4.makeMap(fileBrowserCallbackTypes, /[, ]/);
[6931] Fix | Delete
}
[6932] Fix | Delete
if (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType]) {
[6933] Fix | Delete
fileBrowserCallback = editorSettings.file_picker_callback;
[6934] Fix | Delete
if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {
[6935] Fix | Delete
actionCallback = function () {
[6936] Fix | Delete
var meta = self.fire('beforecall').meta;
[6937] Fix | Delete
meta = global$4.extend({ filetype: fileType }, meta);
[6938] Fix | Delete
fileBrowserCallback.call(editor, function (value, meta) {
[6939] Fix | Delete
self.value(value).fire('change', { meta: meta });
[6940] Fix | Delete
}, self.value(), meta);
[6941] Fix | Delete
};
[6942] Fix | Delete
} else {
[6943] Fix | Delete
fileBrowserCallback = editorSettings.file_browser_callback;
[6944] Fix | Delete
if (fileBrowserCallback && (!fileBrowserCallbackTypes || fileBrowserCallbackTypes[fileType])) {
[6945] Fix | Delete
actionCallback = function () {
[6946] Fix | Delete
fileBrowserCallback(self.getEl('inp').id, self.value(), fileType, window);
[6947] Fix | Delete
};
[6948] Fix | Delete
}
[6949] Fix | Delete
}
[6950] Fix | Delete
}
[6951] Fix | Delete
if (actionCallback) {
[6952] Fix | Delete
settings.icon = 'browse';
[6953] Fix | Delete
settings.onaction = actionCallback;
[6954] Fix | Delete
}
[6955] Fix | Delete
self._super(settings);
[6956] Fix | Delete
self.classes.add('filepicker');
[6957] Fix | Delete
setupAutoCompleteHandler(self, editorSettings, editor.getBody(), fileType);
[6958] Fix | Delete
setupLinkValidatorHandler(self, editorSettings, fileType);
[6959] Fix | Delete
}
[6960] Fix | Delete
});
[6961] Fix | Delete
[6962] Fix | Delete
var FitLayout = AbsoluteLayout.extend({
[6963] Fix | Delete
recalc: function (container) {
[6964] Fix | Delete
var contLayoutRect = container.layoutRect(), paddingBox = container.paddingBox;
[6965] Fix | Delete
container.items().filter(':visible').each(function (ctrl) {
[6966] Fix | Delete
ctrl.layoutRect({
[6967] Fix | Delete
x: paddingBox.left,
[6968] Fix | Delete
y: paddingBox.top,
[6969] Fix | Delete
w: contLayoutRect.innerW - paddingBox.right - paddingBox.left,
[6970] Fix | Delete
h: contLayoutRect.innerH - paddingBox.top - paddingBox.bottom
[6971] Fix | Delete
});
[6972] Fix | Delete
if (ctrl.recalc) {
[6973] Fix | Delete
ctrl.recalc();
[6974] Fix | Delete
}
[6975] Fix | Delete
});
[6976] Fix | Delete
}
[6977] Fix | Delete
});
[6978] Fix | Delete
[6979] Fix | Delete
var FlexLayout = AbsoluteLayout.extend({
[6980] Fix | Delete
recalc: function (container) {
[6981] Fix | Delete
var i, l, items, contLayoutRect, contPaddingBox, contSettings, align, pack, spacing, totalFlex, availableSpace, direction;
[6982] Fix | Delete
var ctrl, ctrlLayoutRect, ctrlSettings, flex;
[6983] Fix | Delete
var maxSizeItems = [];
[6984] Fix | Delete
var size, maxSize, ratio, rect, pos, maxAlignEndPos;
[6985] Fix | Delete
var sizeName, minSizeName, posName, maxSizeName, beforeName, innerSizeName, deltaSizeName, contentSizeName;
[6986] Fix | Delete
var alignAxisName, alignInnerSizeName, alignSizeName, alignMinSizeName, alignBeforeName, alignAfterName;
[6987] Fix | Delete
var alignDeltaSizeName, alignContentSizeName;
[6988] Fix | Delete
var max = Math.max, min = Math.min;
[6989] Fix | Delete
items = container.items().filter(':visible');
[6990] Fix | Delete
contLayoutRect = container.layoutRect();
[6991] Fix | Delete
contPaddingBox = container.paddingBox;
[6992] Fix | Delete
contSettings = container.settings;
[6993] Fix | Delete
direction = container.isRtl() ? contSettings.direction || 'row-reversed' : contSettings.direction;
[6994] Fix | Delete
align = contSettings.align;
[6995] Fix | Delete
pack = container.isRtl() ? contSettings.pack || 'end' : contSettings.pack;
[6996] Fix | Delete
spacing = contSettings.spacing || 0;
[6997] Fix | Delete
if (direction === 'row-reversed' || direction === 'column-reverse') {
[6998] Fix | Delete
items = items.set(items.toArray().reverse());
[6999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function