Edit File by line
/home/barbar84/www/wp-inclu.../js/tinymce/themes/inlite
File: theme.js
menu.classes.remove(menu._lastRel).add(rel);
[9000] Fix | Delete
menu._lastRel = rel;
[9001] Fix | Delete
self.classes.add('selected');
[9002] Fix | Delete
self.aria('expanded', true);
[9003] Fix | Delete
}
[9004] Fix | Delete
},
[9005] Fix | Delete
hideMenu: function () {
[9006] Fix | Delete
var self = this;
[9007] Fix | Delete
if (self.menu) {
[9008] Fix | Delete
self.menu.items().each(function (item) {
[9009] Fix | Delete
if (item.hideMenu) {
[9010] Fix | Delete
item.hideMenu();
[9011] Fix | Delete
}
[9012] Fix | Delete
});
[9013] Fix | Delete
self.menu.hide();
[9014] Fix | Delete
self.aria('expanded', false);
[9015] Fix | Delete
}
[9016] Fix | Delete
return self;
[9017] Fix | Delete
},
[9018] Fix | Delete
renderHtml: function () {
[9019] Fix | Delete
var self = this;
[9020] Fix | Delete
var id = self._id;
[9021] Fix | Delete
var settings = self.settings;
[9022] Fix | Delete
var prefix = self.classPrefix;
[9023] Fix | Delete
var text = self.state.get('text');
[9024] Fix | Delete
var icon = self.settings.icon, image = '', shortcut = settings.shortcut;
[9025] Fix | Delete
var url = self.encode(settings.url), iconHtml = '';
[9026] Fix | Delete
function convertShortcut(shortcut) {
[9027] Fix | Delete
var i, value, replace = {};
[9028] Fix | Delete
if (global$1.mac) {
[9029] Fix | Delete
replace = {
[9030] Fix | Delete
alt: '⌥',
[9031] Fix | Delete
ctrl: '⌘',
[9032] Fix | Delete
shift: '⇧',
[9033] Fix | Delete
meta: '⌘'
[9034] Fix | Delete
};
[9035] Fix | Delete
} else {
[9036] Fix | Delete
replace = { meta: 'Ctrl' };
[9037] Fix | Delete
}
[9038] Fix | Delete
shortcut = shortcut.split('+');
[9039] Fix | Delete
for (i = 0; i < shortcut.length; i++) {
[9040] Fix | Delete
value = replace[shortcut[i].toLowerCase()];
[9041] Fix | Delete
if (value) {
[9042] Fix | Delete
shortcut[i] = value;
[9043] Fix | Delete
}
[9044] Fix | Delete
}
[9045] Fix | Delete
return shortcut.join('+');
[9046] Fix | Delete
}
[9047] Fix | Delete
function escapeRegExp(str) {
[9048] Fix | Delete
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
[9049] Fix | Delete
}
[9050] Fix | Delete
function markMatches(text) {
[9051] Fix | Delete
var match = settings.match || '';
[9052] Fix | Delete
return match ? text.replace(new RegExp(escapeRegExp(match), 'gi'), function (match) {
[9053] Fix | Delete
return '!mce~match[' + match + ']mce~match!';
[9054] Fix | Delete
}) : text;
[9055] Fix | Delete
}
[9056] Fix | Delete
function boldMatches(text) {
[9057] Fix | Delete
return text.replace(new RegExp(escapeRegExp('!mce~match['), 'g'), '<b>').replace(new RegExp(escapeRegExp(']mce~match!'), 'g'), '</b>');
[9058] Fix | Delete
}
[9059] Fix | Delete
if (icon) {
[9060] Fix | Delete
self.parent().classes.add('menu-has-icons');
[9061] Fix | Delete
}
[9062] Fix | Delete
if (settings.image) {
[9063] Fix | Delete
image = ' style="background-image: url(\'' + settings.image + '\')"';
[9064] Fix | Delete
}
[9065] Fix | Delete
if (shortcut) {
[9066] Fix | Delete
shortcut = convertShortcut(shortcut);
[9067] Fix | Delete
}
[9068] Fix | Delete
icon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');
[9069] Fix | Delete
iconHtml = text !== '-' ? '<i class="' + icon + '"' + image + '></i>\xA0' : '';
[9070] Fix | Delete
text = boldMatches(self.encode(markMatches(text)));
[9071] Fix | Delete
url = boldMatches(self.encode(markMatches(url)));
[9072] Fix | Delete
return '<div id="' + id + '" class="' + self.classes + '" tabindex="-1">' + iconHtml + (text !== '-' ? '<span id="' + id + '-text" class="' + prefix + 'text">' + text + '</span>' : '') + (shortcut ? '<div id="' + id + '-shortcut" class="' + prefix + 'menu-shortcut">' + shortcut + '</div>' : '') + (settings.menu ? '<div class="' + prefix + 'caret"></div>' : '') + (url ? '<div class="' + prefix + 'menu-item-link">' + url + '</div>' : '') + '</div>';
[9073] Fix | Delete
},
[9074] Fix | Delete
postRender: function () {
[9075] Fix | Delete
var self = this, settings = self.settings;
[9076] Fix | Delete
var textStyle = settings.textStyle;
[9077] Fix | Delete
if (typeof textStyle === 'function') {
[9078] Fix | Delete
textStyle = textStyle.call(this);
[9079] Fix | Delete
}
[9080] Fix | Delete
if (textStyle) {
[9081] Fix | Delete
var textElm = self.getEl('text');
[9082] Fix | Delete
if (textElm) {
[9083] Fix | Delete
textElm.setAttribute('style', textStyle);
[9084] Fix | Delete
self._textStyle = textStyle;
[9085] Fix | Delete
}
[9086] Fix | Delete
}
[9087] Fix | Delete
self.on('mouseenter click', function (e) {
[9088] Fix | Delete
if (e.control === self) {
[9089] Fix | Delete
if (!settings.menu && e.type === 'click') {
[9090] Fix | Delete
self.fire('select');
[9091] Fix | Delete
global$3.requestAnimationFrame(function () {
[9092] Fix | Delete
self.parent().hideAll();
[9093] Fix | Delete
});
[9094] Fix | Delete
} else {
[9095] Fix | Delete
self.showMenu();
[9096] Fix | Delete
if (e.aria) {
[9097] Fix | Delete
self.menu.focus(true);
[9098] Fix | Delete
}
[9099] Fix | Delete
}
[9100] Fix | Delete
}
[9101] Fix | Delete
});
[9102] Fix | Delete
self._super();
[9103] Fix | Delete
return self;
[9104] Fix | Delete
},
[9105] Fix | Delete
hover: function () {
[9106] Fix | Delete
var self = this;
[9107] Fix | Delete
self.parent().items().each(function (ctrl) {
[9108] Fix | Delete
ctrl.classes.remove('selected');
[9109] Fix | Delete
});
[9110] Fix | Delete
self.classes.toggle('selected', true);
[9111] Fix | Delete
return self;
[9112] Fix | Delete
},
[9113] Fix | Delete
active: function (state) {
[9114] Fix | Delete
toggleTextStyle(this, state);
[9115] Fix | Delete
if (typeof state !== 'undefined') {
[9116] Fix | Delete
this.aria('checked', state);
[9117] Fix | Delete
}
[9118] Fix | Delete
return this._super(state);
[9119] Fix | Delete
},
[9120] Fix | Delete
remove: function () {
[9121] Fix | Delete
this._super();
[9122] Fix | Delete
if (this.menu) {
[9123] Fix | Delete
this.menu.remove();
[9124] Fix | Delete
}
[9125] Fix | Delete
}
[9126] Fix | Delete
});
[9127] Fix | Delete
[9128] Fix | Delete
var Radio = Checkbox.extend({
[9129] Fix | Delete
Defaults: {
[9130] Fix | Delete
classes: 'radio',
[9131] Fix | Delete
role: 'radio'
[9132] Fix | Delete
}
[9133] Fix | Delete
});
[9134] Fix | Delete
[9135] Fix | Delete
var ResizeHandle = Widget.extend({
[9136] Fix | Delete
renderHtml: function () {
[9137] Fix | Delete
var self = this, prefix = self.classPrefix;
[9138] Fix | Delete
self.classes.add('resizehandle');
[9139] Fix | Delete
if (self.settings.direction === 'both') {
[9140] Fix | Delete
self.classes.add('resizehandle-both');
[9141] Fix | Delete
}
[9142] Fix | Delete
self.canFocus = false;
[9143] Fix | Delete
return '<div id="' + self._id + '" class="' + self.classes + '">' + '<i class="' + prefix + 'ico ' + prefix + 'i-resize"></i>' + '</div>';
[9144] Fix | Delete
},
[9145] Fix | Delete
postRender: function () {
[9146] Fix | Delete
var self = this;
[9147] Fix | Delete
self._super();
[9148] Fix | Delete
self.resizeDragHelper = new DragHelper(this._id, {
[9149] Fix | Delete
start: function () {
[9150] Fix | Delete
self.fire('ResizeStart');
[9151] Fix | Delete
},
[9152] Fix | Delete
drag: function (e) {
[9153] Fix | Delete
if (self.settings.direction !== 'both') {
[9154] Fix | Delete
e.deltaX = 0;
[9155] Fix | Delete
}
[9156] Fix | Delete
self.fire('Resize', e);
[9157] Fix | Delete
},
[9158] Fix | Delete
stop: function () {
[9159] Fix | Delete
self.fire('ResizeEnd');
[9160] Fix | Delete
}
[9161] Fix | Delete
});
[9162] Fix | Delete
},
[9163] Fix | Delete
remove: function () {
[9164] Fix | Delete
if (this.resizeDragHelper) {
[9165] Fix | Delete
this.resizeDragHelper.destroy();
[9166] Fix | Delete
}
[9167] Fix | Delete
return this._super();
[9168] Fix | Delete
}
[9169] Fix | Delete
});
[9170] Fix | Delete
[9171] Fix | Delete
function createOptions(options) {
[9172] Fix | Delete
var strOptions = '';
[9173] Fix | Delete
if (options) {
[9174] Fix | Delete
for (var i = 0; i < options.length; i++) {
[9175] Fix | Delete
strOptions += '<option value="' + options[i] + '">' + options[i] + '</option>';
[9176] Fix | Delete
}
[9177] Fix | Delete
}
[9178] Fix | Delete
return strOptions;
[9179] Fix | Delete
}
[9180] Fix | Delete
var SelectBox = Widget.extend({
[9181] Fix | Delete
Defaults: {
[9182] Fix | Delete
classes: 'selectbox',
[9183] Fix | Delete
role: 'selectbox',
[9184] Fix | Delete
options: []
[9185] Fix | Delete
},
[9186] Fix | Delete
init: function (settings) {
[9187] Fix | Delete
var self = this;
[9188] Fix | Delete
self._super(settings);
[9189] Fix | Delete
if (self.settings.size) {
[9190] Fix | Delete
self.size = self.settings.size;
[9191] Fix | Delete
}
[9192] Fix | Delete
if (self.settings.options) {
[9193] Fix | Delete
self._options = self.settings.options;
[9194] Fix | Delete
}
[9195] Fix | Delete
self.on('keydown', function (e) {
[9196] Fix | Delete
var rootControl;
[9197] Fix | Delete
if (e.keyCode === 13) {
[9198] Fix | Delete
e.preventDefault();
[9199] Fix | Delete
self.parents().reverse().each(function (ctrl) {
[9200] Fix | Delete
if (ctrl.toJSON) {
[9201] Fix | Delete
rootControl = ctrl;
[9202] Fix | Delete
return false;
[9203] Fix | Delete
}
[9204] Fix | Delete
});
[9205] Fix | Delete
self.fire('submit', { data: rootControl.toJSON() });
[9206] Fix | Delete
}
[9207] Fix | Delete
});
[9208] Fix | Delete
},
[9209] Fix | Delete
options: function (state) {
[9210] Fix | Delete
if (!arguments.length) {
[9211] Fix | Delete
return this.state.get('options');
[9212] Fix | Delete
}
[9213] Fix | Delete
this.state.set('options', state);
[9214] Fix | Delete
return this;
[9215] Fix | Delete
},
[9216] Fix | Delete
renderHtml: function () {
[9217] Fix | Delete
var self = this;
[9218] Fix | Delete
var options, size = '';
[9219] Fix | Delete
options = createOptions(self._options);
[9220] Fix | Delete
if (self.size) {
[9221] Fix | Delete
size = ' size = "' + self.size + '"';
[9222] Fix | Delete
}
[9223] Fix | Delete
return '<select id="' + self._id + '" class="' + self.classes + '"' + size + '>' + options + '</select>';
[9224] Fix | Delete
},
[9225] Fix | Delete
bindStates: function () {
[9226] Fix | Delete
var self = this;
[9227] Fix | Delete
self.state.on('change:options', function (e) {
[9228] Fix | Delete
self.getEl().innerHTML = createOptions(e.value);
[9229] Fix | Delete
});
[9230] Fix | Delete
return self._super();
[9231] Fix | Delete
}
[9232] Fix | Delete
});
[9233] Fix | Delete
[9234] Fix | Delete
function constrain(value, minVal, maxVal) {
[9235] Fix | Delete
if (value < minVal) {
[9236] Fix | Delete
value = minVal;
[9237] Fix | Delete
}
[9238] Fix | Delete
if (value > maxVal) {
[9239] Fix | Delete
value = maxVal;
[9240] Fix | Delete
}
[9241] Fix | Delete
return value;
[9242] Fix | Delete
}
[9243] Fix | Delete
function setAriaProp(el, name, value) {
[9244] Fix | Delete
el.setAttribute('aria-' + name, value);
[9245] Fix | Delete
}
[9246] Fix | Delete
function updateSliderHandle(ctrl, value) {
[9247] Fix | Delete
var maxHandlePos, shortSizeName, sizeName, stylePosName, styleValue, handleEl;
[9248] Fix | Delete
if (ctrl.settings.orientation === 'v') {
[9249] Fix | Delete
stylePosName = 'top';
[9250] Fix | Delete
sizeName = 'height';
[9251] Fix | Delete
shortSizeName = 'h';
[9252] Fix | Delete
} else {
[9253] Fix | Delete
stylePosName = 'left';
[9254] Fix | Delete
sizeName = 'width';
[9255] Fix | Delete
shortSizeName = 'w';
[9256] Fix | Delete
}
[9257] Fix | Delete
handleEl = ctrl.getEl('handle');
[9258] Fix | Delete
maxHandlePos = (ctrl.layoutRect()[shortSizeName] || 100) - funcs.getSize(handleEl)[sizeName];
[9259] Fix | Delete
styleValue = maxHandlePos * ((value - ctrl._minValue) / (ctrl._maxValue - ctrl._minValue)) + 'px';
[9260] Fix | Delete
handleEl.style[stylePosName] = styleValue;
[9261] Fix | Delete
handleEl.style.height = ctrl.layoutRect().h + 'px';
[9262] Fix | Delete
setAriaProp(handleEl, 'valuenow', value);
[9263] Fix | Delete
setAriaProp(handleEl, 'valuetext', '' + ctrl.settings.previewFilter(value));
[9264] Fix | Delete
setAriaProp(handleEl, 'valuemin', ctrl._minValue);
[9265] Fix | Delete
setAriaProp(handleEl, 'valuemax', ctrl._maxValue);
[9266] Fix | Delete
}
[9267] Fix | Delete
var Slider = Widget.extend({
[9268] Fix | Delete
init: function (settings) {
[9269] Fix | Delete
var self = this;
[9270] Fix | Delete
if (!settings.previewFilter) {
[9271] Fix | Delete
settings.previewFilter = function (value) {
[9272] Fix | Delete
return Math.round(value * 100) / 100;
[9273] Fix | Delete
};
[9274] Fix | Delete
}
[9275] Fix | Delete
self._super(settings);
[9276] Fix | Delete
self.classes.add('slider');
[9277] Fix | Delete
if (settings.orientation === 'v') {
[9278] Fix | Delete
self.classes.add('vertical');
[9279] Fix | Delete
}
[9280] Fix | Delete
self._minValue = isNumber$1(settings.minValue) ? settings.minValue : 0;
[9281] Fix | Delete
self._maxValue = isNumber$1(settings.maxValue) ? settings.maxValue : 100;
[9282] Fix | Delete
self._initValue = self.state.get('value');
[9283] Fix | Delete
},
[9284] Fix | Delete
renderHtml: function () {
[9285] Fix | Delete
var self = this, id = self._id, prefix = self.classPrefix;
[9286] Fix | Delete
return '<div id="' + id + '" class="' + self.classes + '">' + '<div id="' + id + '-handle" class="' + prefix + 'slider-handle" role="slider" tabindex="-1"></div>' + '</div>';
[9287] Fix | Delete
},
[9288] Fix | Delete
reset: function () {
[9289] Fix | Delete
this.value(this._initValue).repaint();
[9290] Fix | Delete
},
[9291] Fix | Delete
postRender: function () {
[9292] Fix | Delete
var self = this;
[9293] Fix | Delete
var minValue, maxValue, screenCordName, stylePosName, sizeName, shortSizeName;
[9294] Fix | Delete
function toFraction(min, max, val) {
[9295] Fix | Delete
return (val + min) / (max - min);
[9296] Fix | Delete
}
[9297] Fix | Delete
function fromFraction(min, max, val) {
[9298] Fix | Delete
return val * (max - min) - min;
[9299] Fix | Delete
}
[9300] Fix | Delete
function handleKeyboard(minValue, maxValue) {
[9301] Fix | Delete
function alter(delta) {
[9302] Fix | Delete
var value;
[9303] Fix | Delete
value = self.value();
[9304] Fix | Delete
value = fromFraction(minValue, maxValue, toFraction(minValue, maxValue, value) + delta * 0.05);
[9305] Fix | Delete
value = constrain(value, minValue, maxValue);
[9306] Fix | Delete
self.value(value);
[9307] Fix | Delete
self.fire('dragstart', { value: value });
[9308] Fix | Delete
self.fire('drag', { value: value });
[9309] Fix | Delete
self.fire('dragend', { value: value });
[9310] Fix | Delete
}
[9311] Fix | Delete
self.on('keydown', function (e) {
[9312] Fix | Delete
switch (e.keyCode) {
[9313] Fix | Delete
case 37:
[9314] Fix | Delete
case 38:
[9315] Fix | Delete
alter(-1);
[9316] Fix | Delete
break;
[9317] Fix | Delete
case 39:
[9318] Fix | Delete
case 40:
[9319] Fix | Delete
alter(1);
[9320] Fix | Delete
break;
[9321] Fix | Delete
}
[9322] Fix | Delete
});
[9323] Fix | Delete
}
[9324] Fix | Delete
function handleDrag(minValue, maxValue, handleEl) {
[9325] Fix | Delete
var startPos, startHandlePos, maxHandlePos, handlePos, value;
[9326] Fix | Delete
self._dragHelper = new DragHelper(self._id, {
[9327] Fix | Delete
handle: self._id + '-handle',
[9328] Fix | Delete
start: function (e) {
[9329] Fix | Delete
startPos = e[screenCordName];
[9330] Fix | Delete
startHandlePos = parseInt(self.getEl('handle').style[stylePosName], 10);
[9331] Fix | Delete
maxHandlePos = (self.layoutRect()[shortSizeName] || 100) - funcs.getSize(handleEl)[sizeName];
[9332] Fix | Delete
self.fire('dragstart', { value: value });
[9333] Fix | Delete
},
[9334] Fix | Delete
drag: function (e) {
[9335] Fix | Delete
var delta = e[screenCordName] - startPos;
[9336] Fix | Delete
handlePos = constrain(startHandlePos + delta, 0, maxHandlePos);
[9337] Fix | Delete
handleEl.style[stylePosName] = handlePos + 'px';
[9338] Fix | Delete
value = minValue + handlePos / maxHandlePos * (maxValue - minValue);
[9339] Fix | Delete
self.value(value);
[9340] Fix | Delete
self.tooltip().text('' + self.settings.previewFilter(value)).show().moveRel(handleEl, 'bc tc');
[9341] Fix | Delete
self.fire('drag', { value: value });
[9342] Fix | Delete
},
[9343] Fix | Delete
stop: function () {
[9344] Fix | Delete
self.tooltip().hide();
[9345] Fix | Delete
self.fire('dragend', { value: value });
[9346] Fix | Delete
}
[9347] Fix | Delete
});
[9348] Fix | Delete
}
[9349] Fix | Delete
minValue = self._minValue;
[9350] Fix | Delete
maxValue = self._maxValue;
[9351] Fix | Delete
if (self.settings.orientation === 'v') {
[9352] Fix | Delete
screenCordName = 'screenY';
[9353] Fix | Delete
stylePosName = 'top';
[9354] Fix | Delete
sizeName = 'height';
[9355] Fix | Delete
shortSizeName = 'h';
[9356] Fix | Delete
} else {
[9357] Fix | Delete
screenCordName = 'screenX';
[9358] Fix | Delete
stylePosName = 'left';
[9359] Fix | Delete
sizeName = 'width';
[9360] Fix | Delete
shortSizeName = 'w';
[9361] Fix | Delete
}
[9362] Fix | Delete
self._super();
[9363] Fix | Delete
handleKeyboard(minValue, maxValue);
[9364] Fix | Delete
handleDrag(minValue, maxValue, self.getEl('handle'));
[9365] Fix | Delete
},
[9366] Fix | Delete
repaint: function () {
[9367] Fix | Delete
this._super();
[9368] Fix | Delete
updateSliderHandle(this, this.value());
[9369] Fix | Delete
},
[9370] Fix | Delete
bindStates: function () {
[9371] Fix | Delete
var self = this;
[9372] Fix | Delete
self.state.on('change:value', function (e) {
[9373] Fix | Delete
updateSliderHandle(self, e.value);
[9374] Fix | Delete
});
[9375] Fix | Delete
return self._super();
[9376] Fix | Delete
}
[9377] Fix | Delete
});
[9378] Fix | Delete
[9379] Fix | Delete
var Spacer = Widget.extend({
[9380] Fix | Delete
renderHtml: function () {
[9381] Fix | Delete
var self = this;
[9382] Fix | Delete
self.classes.add('spacer');
[9383] Fix | Delete
self.canFocus = false;
[9384] Fix | Delete
return '<div id="' + self._id + '" class="' + self.classes + '"></div>';
[9385] Fix | Delete
}
[9386] Fix | Delete
});
[9387] Fix | Delete
[9388] Fix | Delete
var SplitButton = MenuButton.extend({
[9389] Fix | Delete
Defaults: {
[9390] Fix | Delete
classes: 'widget btn splitbtn',
[9391] Fix | Delete
role: 'button'
[9392] Fix | Delete
},
[9393] Fix | Delete
repaint: function () {
[9394] Fix | Delete
var self = this;
[9395] Fix | Delete
var elm = self.getEl();
[9396] Fix | Delete
var rect = self.layoutRect();
[9397] Fix | Delete
var mainButtonElm, menuButtonElm;
[9398] Fix | Delete
self._super();
[9399] Fix | Delete
mainButtonElm = elm.firstChild;
[9400] Fix | Delete
menuButtonElm = elm.lastChild;
[9401] Fix | Delete
global$7(mainButtonElm).css({
[9402] Fix | Delete
width: rect.w - funcs.getSize(menuButtonElm).width,
[9403] Fix | Delete
height: rect.h - 2
[9404] Fix | Delete
});
[9405] Fix | Delete
global$7(menuButtonElm).css({ height: rect.h - 2 });
[9406] Fix | Delete
return self;
[9407] Fix | Delete
},
[9408] Fix | Delete
activeMenu: function (state) {
[9409] Fix | Delete
var self = this;
[9410] Fix | Delete
global$7(self.getEl().lastChild).toggleClass(self.classPrefix + 'active', state);
[9411] Fix | Delete
},
[9412] Fix | Delete
renderHtml: function () {
[9413] Fix | Delete
var self = this;
[9414] Fix | Delete
var id = self._id;
[9415] Fix | Delete
var prefix = self.classPrefix;
[9416] Fix | Delete
var image;
[9417] Fix | Delete
var icon = self.state.get('icon');
[9418] Fix | Delete
var text = self.state.get('text');
[9419] Fix | Delete
var settings = self.settings;
[9420] Fix | Delete
var textHtml = '', ariaPressed;
[9421] Fix | Delete
image = settings.image;
[9422] Fix | Delete
if (image) {
[9423] Fix | Delete
icon = 'none';
[9424] Fix | Delete
if (typeof image !== 'string') {
[9425] Fix | Delete
image = domGlobals.window.getSelection ? image[0] : image[1];
[9426] Fix | Delete
}
[9427] Fix | Delete
image = ' style="background-image: url(\'' + image + '\')"';
[9428] Fix | Delete
} else {
[9429] Fix | Delete
image = '';
[9430] Fix | Delete
}
[9431] Fix | Delete
icon = settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : '';
[9432] Fix | Delete
if (text) {
[9433] Fix | Delete
self.classes.add('btn-has-text');
[9434] Fix | Delete
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
[9435] Fix | Delete
}
[9436] Fix | Delete
ariaPressed = typeof settings.active === 'boolean' ? ' aria-pressed="' + settings.active + '"' : '';
[9437] Fix | Delete
return '<div id="' + id + '" class="' + self.classes + '" role="button"' + ariaPressed + ' tabindex="-1">' + '<button type="button" hidefocus="1" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + (self._menuBtnText ? (icon ? '\xA0' : '') + self._menuBtnText : '') + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
[9438] Fix | Delete
},
[9439] Fix | Delete
postRender: function () {
[9440] Fix | Delete
var self = this, onClickHandler = self.settings.onclick;
[9441] Fix | Delete
self.on('click', function (e) {
[9442] Fix | Delete
var node = e.target;
[9443] Fix | Delete
if (e.control === this) {
[9444] Fix | Delete
while (node) {
[9445] Fix | Delete
if (e.aria && e.aria.key !== 'down' || node.nodeName === 'BUTTON' && node.className.indexOf('open') === -1) {
[9446] Fix | Delete
e.stopImmediatePropagation();
[9447] Fix | Delete
if (onClickHandler) {
[9448] Fix | Delete
onClickHandler.call(this, e);
[9449] Fix | Delete
}
[9450] Fix | Delete
return;
[9451] Fix | Delete
}
[9452] Fix | Delete
node = node.parentNode;
[9453] Fix | Delete
}
[9454] Fix | Delete
}
[9455] Fix | Delete
});
[9456] Fix | Delete
delete self.settings.onclick;
[9457] Fix | Delete
return self._super();
[9458] Fix | Delete
}
[9459] Fix | Delete
});
[9460] Fix | Delete
[9461] Fix | Delete
var StackLayout = FlowLayout.extend({
[9462] Fix | Delete
Defaults: {
[9463] Fix | Delete
containerClass: 'stack-layout',
[9464] Fix | Delete
controlClass: 'stack-layout-item',
[9465] Fix | Delete
endClass: 'break'
[9466] Fix | Delete
},
[9467] Fix | Delete
isNative: function () {
[9468] Fix | Delete
return true;
[9469] Fix | Delete
}
[9470] Fix | Delete
});
[9471] Fix | Delete
[9472] Fix | Delete
var TabPanel = Panel.extend({
[9473] Fix | Delete
Defaults: {
[9474] Fix | Delete
layout: 'absolute',
[9475] Fix | Delete
defaults: { type: 'panel' }
[9476] Fix | Delete
},
[9477] Fix | Delete
activateTab: function (idx) {
[9478] Fix | Delete
var activeTabElm;
[9479] Fix | Delete
if (this.activeTabId) {
[9480] Fix | Delete
activeTabElm = this.getEl(this.activeTabId);
[9481] Fix | Delete
global$7(activeTabElm).removeClass(this.classPrefix + 'active');
[9482] Fix | Delete
activeTabElm.setAttribute('aria-selected', 'false');
[9483] Fix | Delete
}
[9484] Fix | Delete
this.activeTabId = 't' + idx;
[9485] Fix | Delete
activeTabElm = this.getEl('t' + idx);
[9486] Fix | Delete
activeTabElm.setAttribute('aria-selected', 'true');
[9487] Fix | Delete
global$7(activeTabElm).addClass(this.classPrefix + 'active');
[9488] Fix | Delete
this.items()[idx].show().fire('showtab');
[9489] Fix | Delete
this.reflow();
[9490] Fix | Delete
this.items().each(function (item, i) {
[9491] Fix | Delete
if (idx !== i) {
[9492] Fix | Delete
item.hide();
[9493] Fix | Delete
}
[9494] Fix | Delete
});
[9495] Fix | Delete
},
[9496] Fix | Delete
renderHtml: function () {
[9497] Fix | Delete
var self = this;
[9498] Fix | Delete
var layout = self._layout;
[9499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function