Edit File by line
/home/barbar84/www/wp-inclu.../js/tinymce/themes/inlite
File: theme.js
}
[2000] Fix | Delete
}
[2001] Fix | Delete
if (self._eventsRoot) {
[2002] Fix | Delete
for (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) {
[2003] Fix | Delete
parentEventsRoot = parent._eventsRoot;
[2004] Fix | Delete
}
[2005] Fix | Delete
if (parentEventsRoot) {
[2006] Fix | Delete
for (name in parentEventsRoot._nativeEvents) {
[2007] Fix | Delete
self._nativeEvents[name] = true;
[2008] Fix | Delete
}
[2009] Fix | Delete
}
[2010] Fix | Delete
}
[2011] Fix | Delete
bindPendingEvents(self);
[2012] Fix | Delete
if (settings.style) {
[2013] Fix | Delete
elm = self.getEl();
[2014] Fix | Delete
if (elm) {
[2015] Fix | Delete
elm.setAttribute('style', settings.style);
[2016] Fix | Delete
elm.style.cssText = settings.style;
[2017] Fix | Delete
}
[2018] Fix | Delete
}
[2019] Fix | Delete
if (self.settings.border) {
[2020] Fix | Delete
box = self.borderBox;
[2021] Fix | Delete
self.$el.css({
[2022] Fix | Delete
'border-top-width': box.top,
[2023] Fix | Delete
'border-right-width': box.right,
[2024] Fix | Delete
'border-bottom-width': box.bottom,
[2025] Fix | Delete
'border-left-width': box.left
[2026] Fix | Delete
});
[2027] Fix | Delete
}
[2028] Fix | Delete
var root = self.getRoot();
[2029] Fix | Delete
if (!root.controlIdLookup) {
[2030] Fix | Delete
root.controlIdLookup = {};
[2031] Fix | Delete
}
[2032] Fix | Delete
root.controlIdLookup[self._id] = self;
[2033] Fix | Delete
for (var key in self._aria) {
[2034] Fix | Delete
self.aria(key, self._aria[key]);
[2035] Fix | Delete
}
[2036] Fix | Delete
if (self.state.get('visible') === false) {
[2037] Fix | Delete
self.getEl().style.display = 'none';
[2038] Fix | Delete
}
[2039] Fix | Delete
self.bindStates();
[2040] Fix | Delete
self.state.on('change:visible', function (e) {
[2041] Fix | Delete
var state = e.value;
[2042] Fix | Delete
var parentCtrl;
[2043] Fix | Delete
if (self.state.get('rendered')) {
[2044] Fix | Delete
self.getEl().style.display = state === false ? 'none' : '';
[2045] Fix | Delete
self.getEl().getBoundingClientRect();
[2046] Fix | Delete
}
[2047] Fix | Delete
parentCtrl = self.parent();
[2048] Fix | Delete
if (parentCtrl) {
[2049] Fix | Delete
parentCtrl._lastRect = null;
[2050] Fix | Delete
}
[2051] Fix | Delete
self.fire(state ? 'show' : 'hide');
[2052] Fix | Delete
ReflowQueue.add(self);
[2053] Fix | Delete
});
[2054] Fix | Delete
self.fire('postrender', {}, false);
[2055] Fix | Delete
},
[2056] Fix | Delete
bindStates: function () {
[2057] Fix | Delete
},
[2058] Fix | Delete
scrollIntoView: function (align) {
[2059] Fix | Delete
function getOffset(elm, rootElm) {
[2060] Fix | Delete
var x, y, parent = elm;
[2061] Fix | Delete
x = y = 0;
[2062] Fix | Delete
while (parent && parent !== rootElm && parent.nodeType) {
[2063] Fix | Delete
x += parent.offsetLeft || 0;
[2064] Fix | Delete
y += parent.offsetTop || 0;
[2065] Fix | Delete
parent = parent.offsetParent;
[2066] Fix | Delete
}
[2067] Fix | Delete
return {
[2068] Fix | Delete
x: x,
[2069] Fix | Delete
y: y
[2070] Fix | Delete
};
[2071] Fix | Delete
}
[2072] Fix | Delete
var elm = this.getEl(), parentElm = elm.parentNode;
[2073] Fix | Delete
var x, y, width, height, parentWidth, parentHeight;
[2074] Fix | Delete
var pos = getOffset(elm, parentElm);
[2075] Fix | Delete
x = pos.x;
[2076] Fix | Delete
y = pos.y;
[2077] Fix | Delete
width = elm.offsetWidth;
[2078] Fix | Delete
height = elm.offsetHeight;
[2079] Fix | Delete
parentWidth = parentElm.clientWidth;
[2080] Fix | Delete
parentHeight = parentElm.clientHeight;
[2081] Fix | Delete
if (align === 'end') {
[2082] Fix | Delete
x -= parentWidth - width;
[2083] Fix | Delete
y -= parentHeight - height;
[2084] Fix | Delete
} else if (align === 'center') {
[2085] Fix | Delete
x -= parentWidth / 2 - width / 2;
[2086] Fix | Delete
y -= parentHeight / 2 - height / 2;
[2087] Fix | Delete
}
[2088] Fix | Delete
parentElm.scrollLeft = x;
[2089] Fix | Delete
parentElm.scrollTop = y;
[2090] Fix | Delete
return this;
[2091] Fix | Delete
},
[2092] Fix | Delete
getRoot: function () {
[2093] Fix | Delete
var ctrl = this, rootControl;
[2094] Fix | Delete
var parents = [];
[2095] Fix | Delete
while (ctrl) {
[2096] Fix | Delete
if (ctrl.rootControl) {
[2097] Fix | Delete
rootControl = ctrl.rootControl;
[2098] Fix | Delete
break;
[2099] Fix | Delete
}
[2100] Fix | Delete
parents.push(ctrl);
[2101] Fix | Delete
rootControl = ctrl;
[2102] Fix | Delete
ctrl = ctrl.parent();
[2103] Fix | Delete
}
[2104] Fix | Delete
if (!rootControl) {
[2105] Fix | Delete
rootControl = this;
[2106] Fix | Delete
}
[2107] Fix | Delete
var i = parents.length;
[2108] Fix | Delete
while (i--) {
[2109] Fix | Delete
parents[i].rootControl = rootControl;
[2110] Fix | Delete
}
[2111] Fix | Delete
return rootControl;
[2112] Fix | Delete
},
[2113] Fix | Delete
reflow: function () {
[2114] Fix | Delete
ReflowQueue.remove(this);
[2115] Fix | Delete
var parent = this.parent();
[2116] Fix | Delete
if (parent && parent._layout && !parent._layout.isNative()) {
[2117] Fix | Delete
parent.reflow();
[2118] Fix | Delete
}
[2119] Fix | Delete
return this;
[2120] Fix | Delete
}
[2121] Fix | Delete
};
[2122] Fix | Delete
global$4.each('text title visible disabled active value'.split(' '), function (name) {
[2123] Fix | Delete
proto$1[name] = function (value) {
[2124] Fix | Delete
if (arguments.length === 0) {
[2125] Fix | Delete
return this.state.get(name);
[2126] Fix | Delete
}
[2127] Fix | Delete
if (typeof value !== 'undefined') {
[2128] Fix | Delete
this.state.set(name, value);
[2129] Fix | Delete
}
[2130] Fix | Delete
return this;
[2131] Fix | Delete
};
[2132] Fix | Delete
});
[2133] Fix | Delete
Control = global$8.extend(proto$1);
[2134] Fix | Delete
function getEventDispatcher(obj) {
[2135] Fix | Delete
if (!obj._eventDispatcher) {
[2136] Fix | Delete
obj._eventDispatcher = new global$9({
[2137] Fix | Delete
scope: obj,
[2138] Fix | Delete
toggleEvent: function (name, state) {
[2139] Fix | Delete
if (state && global$9.isNative(name)) {
[2140] Fix | Delete
if (!obj._nativeEvents) {
[2141] Fix | Delete
obj._nativeEvents = {};
[2142] Fix | Delete
}
[2143] Fix | Delete
obj._nativeEvents[name] = true;
[2144] Fix | Delete
if (obj.state.get('rendered')) {
[2145] Fix | Delete
bindPendingEvents(obj);
[2146] Fix | Delete
}
[2147] Fix | Delete
}
[2148] Fix | Delete
}
[2149] Fix | Delete
});
[2150] Fix | Delete
}
[2151] Fix | Delete
return obj._eventDispatcher;
[2152] Fix | Delete
}
[2153] Fix | Delete
function bindPendingEvents(eventCtrl) {
[2154] Fix | Delete
var i, l, parents, eventRootCtrl, nativeEvents, name;
[2155] Fix | Delete
function delegate(e) {
[2156] Fix | Delete
var control = eventCtrl.getParentCtrl(e.target);
[2157] Fix | Delete
if (control) {
[2158] Fix | Delete
control.fire(e.type, e);
[2159] Fix | Delete
}
[2160] Fix | Delete
}
[2161] Fix | Delete
function mouseLeaveHandler() {
[2162] Fix | Delete
var ctrl = eventRootCtrl._lastHoverCtrl;
[2163] Fix | Delete
if (ctrl) {
[2164] Fix | Delete
ctrl.fire('mouseleave', { target: ctrl.getEl() });
[2165] Fix | Delete
ctrl.parents().each(function (ctrl) {
[2166] Fix | Delete
ctrl.fire('mouseleave', { target: ctrl.getEl() });
[2167] Fix | Delete
});
[2168] Fix | Delete
eventRootCtrl._lastHoverCtrl = null;
[2169] Fix | Delete
}
[2170] Fix | Delete
}
[2171] Fix | Delete
function mouseEnterHandler(e) {
[2172] Fix | Delete
var ctrl = eventCtrl.getParentCtrl(e.target), lastCtrl = eventRootCtrl._lastHoverCtrl, idx = 0, i, parents, lastParents;
[2173] Fix | Delete
if (ctrl !== lastCtrl) {
[2174] Fix | Delete
eventRootCtrl._lastHoverCtrl = ctrl;
[2175] Fix | Delete
parents = ctrl.parents().toArray().reverse();
[2176] Fix | Delete
parents.push(ctrl);
[2177] Fix | Delete
if (lastCtrl) {
[2178] Fix | Delete
lastParents = lastCtrl.parents().toArray().reverse();
[2179] Fix | Delete
lastParents.push(lastCtrl);
[2180] Fix | Delete
for (idx = 0; idx < lastParents.length; idx++) {
[2181] Fix | Delete
if (parents[idx] !== lastParents[idx]) {
[2182] Fix | Delete
break;
[2183] Fix | Delete
}
[2184] Fix | Delete
}
[2185] Fix | Delete
for (i = lastParents.length - 1; i >= idx; i--) {
[2186] Fix | Delete
lastCtrl = lastParents[i];
[2187] Fix | Delete
lastCtrl.fire('mouseleave', { target: lastCtrl.getEl() });
[2188] Fix | Delete
}
[2189] Fix | Delete
}
[2190] Fix | Delete
for (i = idx; i < parents.length; i++) {
[2191] Fix | Delete
ctrl = parents[i];
[2192] Fix | Delete
ctrl.fire('mouseenter', { target: ctrl.getEl() });
[2193] Fix | Delete
}
[2194] Fix | Delete
}
[2195] Fix | Delete
}
[2196] Fix | Delete
function fixWheelEvent(e) {
[2197] Fix | Delete
e.preventDefault();
[2198] Fix | Delete
if (e.type === 'mousewheel') {
[2199] Fix | Delete
e.deltaY = -1 / 40 * e.wheelDelta;
[2200] Fix | Delete
if (e.wheelDeltaX) {
[2201] Fix | Delete
e.deltaX = -1 / 40 * e.wheelDeltaX;
[2202] Fix | Delete
}
[2203] Fix | Delete
} else {
[2204] Fix | Delete
e.deltaX = 0;
[2205] Fix | Delete
e.deltaY = e.detail;
[2206] Fix | Delete
}
[2207] Fix | Delete
e = eventCtrl.fire('wheel', e);
[2208] Fix | Delete
}
[2209] Fix | Delete
nativeEvents = eventCtrl._nativeEvents;
[2210] Fix | Delete
if (nativeEvents) {
[2211] Fix | Delete
parents = eventCtrl.parents().toArray();
[2212] Fix | Delete
parents.unshift(eventCtrl);
[2213] Fix | Delete
for (i = 0, l = parents.length; !eventRootCtrl && i < l; i++) {
[2214] Fix | Delete
eventRootCtrl = parents[i]._eventsRoot;
[2215] Fix | Delete
}
[2216] Fix | Delete
if (!eventRootCtrl) {
[2217] Fix | Delete
eventRootCtrl = parents[parents.length - 1] || eventCtrl;
[2218] Fix | Delete
}
[2219] Fix | Delete
eventCtrl._eventsRoot = eventRootCtrl;
[2220] Fix | Delete
for (l = i, i = 0; i < l; i++) {
[2221] Fix | Delete
parents[i]._eventsRoot = eventRootCtrl;
[2222] Fix | Delete
}
[2223] Fix | Delete
var eventRootDelegates = eventRootCtrl._delegates;
[2224] Fix | Delete
if (!eventRootDelegates) {
[2225] Fix | Delete
eventRootDelegates = eventRootCtrl._delegates = {};
[2226] Fix | Delete
}
[2227] Fix | Delete
for (name in nativeEvents) {
[2228] Fix | Delete
if (!nativeEvents) {
[2229] Fix | Delete
return false;
[2230] Fix | Delete
}
[2231] Fix | Delete
if (name === 'wheel' && !hasWheelEventSupport) {
[2232] Fix | Delete
if (hasMouseWheelEventSupport) {
[2233] Fix | Delete
global$7(eventCtrl.getEl()).on('mousewheel', fixWheelEvent);
[2234] Fix | Delete
} else {
[2235] Fix | Delete
global$7(eventCtrl.getEl()).on('DOMMouseScroll', fixWheelEvent);
[2236] Fix | Delete
}
[2237] Fix | Delete
continue;
[2238] Fix | Delete
}
[2239] Fix | Delete
if (name === 'mouseenter' || name === 'mouseleave') {
[2240] Fix | Delete
if (!eventRootCtrl._hasMouseEnter) {
[2241] Fix | Delete
global$7(eventRootCtrl.getEl()).on('mouseleave', mouseLeaveHandler).on('mouseover', mouseEnterHandler);
[2242] Fix | Delete
eventRootCtrl._hasMouseEnter = 1;
[2243] Fix | Delete
}
[2244] Fix | Delete
} else if (!eventRootDelegates[name]) {
[2245] Fix | Delete
global$7(eventRootCtrl.getEl()).on(name, delegate);
[2246] Fix | Delete
eventRootDelegates[name] = true;
[2247] Fix | Delete
}
[2248] Fix | Delete
nativeEvents[name] = false;
[2249] Fix | Delete
}
[2250] Fix | Delete
}
[2251] Fix | Delete
}
[2252] Fix | Delete
var Control$1 = Control;
[2253] Fix | Delete
[2254] Fix | Delete
var isStatic = function (elm) {
[2255] Fix | Delete
return funcs.getRuntimeStyle(elm, 'position') === 'static';
[2256] Fix | Delete
};
[2257] Fix | Delete
var isFixed = function (ctrl) {
[2258] Fix | Delete
return ctrl.state.get('fixed');
[2259] Fix | Delete
};
[2260] Fix | Delete
function calculateRelativePosition(ctrl, targetElm, rel) {
[2261] Fix | Delete
var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;
[2262] Fix | Delete
viewport = getWindowViewPort();
[2263] Fix | Delete
pos = funcs.getPos(targetElm, UiContainer.getUiContainer(ctrl));
[2264] Fix | Delete
x = pos.x;
[2265] Fix | Delete
y = pos.y;
[2266] Fix | Delete
if (isFixed(ctrl) && isStatic(domGlobals.document.body)) {
[2267] Fix | Delete
x -= viewport.x;
[2268] Fix | Delete
y -= viewport.y;
[2269] Fix | Delete
}
[2270] Fix | Delete
ctrlElm = ctrl.getEl();
[2271] Fix | Delete
size = funcs.getSize(ctrlElm);
[2272] Fix | Delete
selfW = size.width;
[2273] Fix | Delete
selfH = size.height;
[2274] Fix | Delete
size = funcs.getSize(targetElm);
[2275] Fix | Delete
targetW = size.width;
[2276] Fix | Delete
targetH = size.height;
[2277] Fix | Delete
rel = (rel || '').split('');
[2278] Fix | Delete
if (rel[0] === 'b') {
[2279] Fix | Delete
y += targetH;
[2280] Fix | Delete
}
[2281] Fix | Delete
if (rel[1] === 'r') {
[2282] Fix | Delete
x += targetW;
[2283] Fix | Delete
}
[2284] Fix | Delete
if (rel[0] === 'c') {
[2285] Fix | Delete
y += Math.round(targetH / 2);
[2286] Fix | Delete
}
[2287] Fix | Delete
if (rel[1] === 'c') {
[2288] Fix | Delete
x += Math.round(targetW / 2);
[2289] Fix | Delete
}
[2290] Fix | Delete
if (rel[3] === 'b') {
[2291] Fix | Delete
y -= selfH;
[2292] Fix | Delete
}
[2293] Fix | Delete
if (rel[4] === 'r') {
[2294] Fix | Delete
x -= selfW;
[2295] Fix | Delete
}
[2296] Fix | Delete
if (rel[3] === 'c') {
[2297] Fix | Delete
y -= Math.round(selfH / 2);
[2298] Fix | Delete
}
[2299] Fix | Delete
if (rel[4] === 'c') {
[2300] Fix | Delete
x -= Math.round(selfW / 2);
[2301] Fix | Delete
}
[2302] Fix | Delete
return {
[2303] Fix | Delete
x: x,
[2304] Fix | Delete
y: y,
[2305] Fix | Delete
w: selfW,
[2306] Fix | Delete
h: selfH
[2307] Fix | Delete
};
[2308] Fix | Delete
}
[2309] Fix | Delete
var getUiContainerViewPort = function (customUiContainer) {
[2310] Fix | Delete
return {
[2311] Fix | Delete
x: 0,
[2312] Fix | Delete
y: 0,
[2313] Fix | Delete
w: customUiContainer.scrollWidth - 1,
[2314] Fix | Delete
h: customUiContainer.scrollHeight - 1
[2315] Fix | Delete
};
[2316] Fix | Delete
};
[2317] Fix | Delete
var getWindowViewPort = function () {
[2318] Fix | Delete
var win = domGlobals.window;
[2319] Fix | Delete
var x = Math.max(win.pageXOffset, domGlobals.document.body.scrollLeft, domGlobals.document.documentElement.scrollLeft);
[2320] Fix | Delete
var y = Math.max(win.pageYOffset, domGlobals.document.body.scrollTop, domGlobals.document.documentElement.scrollTop);
[2321] Fix | Delete
var w = win.innerWidth || domGlobals.document.documentElement.clientWidth;
[2322] Fix | Delete
var h = win.innerHeight || domGlobals.document.documentElement.clientHeight;
[2323] Fix | Delete
return {
[2324] Fix | Delete
x: x,
[2325] Fix | Delete
y: y,
[2326] Fix | Delete
w: w,
[2327] Fix | Delete
h: h
[2328] Fix | Delete
};
[2329] Fix | Delete
};
[2330] Fix | Delete
var getViewPortRect = function (ctrl) {
[2331] Fix | Delete
var customUiContainer = UiContainer.getUiContainer(ctrl);
[2332] Fix | Delete
return customUiContainer && !isFixed(ctrl) ? getUiContainerViewPort(customUiContainer) : getWindowViewPort();
[2333] Fix | Delete
};
[2334] Fix | Delete
var Movable = {
[2335] Fix | Delete
testMoveRel: function (elm, rels) {
[2336] Fix | Delete
var viewPortRect = getViewPortRect(this);
[2337] Fix | Delete
for (var i = 0; i < rels.length; i++) {
[2338] Fix | Delete
var pos = calculateRelativePosition(this, elm, rels[i]);
[2339] Fix | Delete
if (isFixed(this)) {
[2340] Fix | Delete
if (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) {
[2341] Fix | Delete
return rels[i];
[2342] Fix | Delete
}
[2343] Fix | Delete
} else {
[2344] Fix | Delete
if (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x && pos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) {
[2345] Fix | Delete
return rels[i];
[2346] Fix | Delete
}
[2347] Fix | Delete
}
[2348] Fix | Delete
}
[2349] Fix | Delete
return rels[0];
[2350] Fix | Delete
},
[2351] Fix | Delete
moveRel: function (elm, rel) {
[2352] Fix | Delete
if (typeof rel !== 'string') {
[2353] Fix | Delete
rel = this.testMoveRel(elm, rel);
[2354] Fix | Delete
}
[2355] Fix | Delete
var pos = calculateRelativePosition(this, elm, rel);
[2356] Fix | Delete
return this.moveTo(pos.x, pos.y);
[2357] Fix | Delete
},
[2358] Fix | Delete
moveBy: function (dx, dy) {
[2359] Fix | Delete
var self = this, rect = self.layoutRect();
[2360] Fix | Delete
self.moveTo(rect.x + dx, rect.y + dy);
[2361] Fix | Delete
return self;
[2362] Fix | Delete
},
[2363] Fix | Delete
moveTo: function (x, y) {
[2364] Fix | Delete
var self = this;
[2365] Fix | Delete
function constrain(value, max, size) {
[2366] Fix | Delete
if (value < 0) {
[2367] Fix | Delete
return 0;
[2368] Fix | Delete
}
[2369] Fix | Delete
if (value + size > max) {
[2370] Fix | Delete
value = max - size;
[2371] Fix | Delete
return value < 0 ? 0 : value;
[2372] Fix | Delete
}
[2373] Fix | Delete
return value;
[2374] Fix | Delete
}
[2375] Fix | Delete
if (self.settings.constrainToViewport) {
[2376] Fix | Delete
var viewPortRect = getViewPortRect(this);
[2377] Fix | Delete
var layoutRect = self.layoutRect();
[2378] Fix | Delete
x = constrain(x, viewPortRect.w + viewPortRect.x, layoutRect.w);
[2379] Fix | Delete
y = constrain(y, viewPortRect.h + viewPortRect.y, layoutRect.h);
[2380] Fix | Delete
}
[2381] Fix | Delete
var uiContainer = UiContainer.getUiContainer(self);
[2382] Fix | Delete
if (uiContainer && isStatic(uiContainer) && !isFixed(self)) {
[2383] Fix | Delete
x -= uiContainer.scrollLeft;
[2384] Fix | Delete
y -= uiContainer.scrollTop;
[2385] Fix | Delete
}
[2386] Fix | Delete
if (uiContainer) {
[2387] Fix | Delete
x += 1;
[2388] Fix | Delete
y += 1;
[2389] Fix | Delete
}
[2390] Fix | Delete
if (self.state.get('rendered')) {
[2391] Fix | Delete
self.layoutRect({
[2392] Fix | Delete
x: x,
[2393] Fix | Delete
y: y
[2394] Fix | Delete
}).repaint();
[2395] Fix | Delete
} else {
[2396] Fix | Delete
self.settings.x = x;
[2397] Fix | Delete
self.settings.y = y;
[2398] Fix | Delete
}
[2399] Fix | Delete
self.fire('move', {
[2400] Fix | Delete
x: x,
[2401] Fix | Delete
y: y
[2402] Fix | Delete
});
[2403] Fix | Delete
return self;
[2404] Fix | Delete
}
[2405] Fix | Delete
};
[2406] Fix | Delete
[2407] Fix | Delete
var Tooltip = Control$1.extend({
[2408] Fix | Delete
Mixins: [Movable],
[2409] Fix | Delete
Defaults: { classes: 'widget tooltip tooltip-n' },
[2410] Fix | Delete
renderHtml: function () {
[2411] Fix | Delete
var self = this, prefix = self.classPrefix;
[2412] Fix | Delete
return '<div id="' + self._id + '" class="' + self.classes + '" role="presentation">' + '<div class="' + prefix + 'tooltip-arrow"></div>' + '<div class="' + prefix + 'tooltip-inner">' + self.encode(self.state.get('text')) + '</div>' + '</div>';
[2413] Fix | Delete
},
[2414] Fix | Delete
bindStates: function () {
[2415] Fix | Delete
var self = this;
[2416] Fix | Delete
self.state.on('change:text', function (e) {
[2417] Fix | Delete
self.getEl().lastChild.innerHTML = self.encode(e.value);
[2418] Fix | Delete
});
[2419] Fix | Delete
return self._super();
[2420] Fix | Delete
},
[2421] Fix | Delete
repaint: function () {
[2422] Fix | Delete
var self = this;
[2423] Fix | Delete
var style, rect;
[2424] Fix | Delete
style = self.getEl().style;
[2425] Fix | Delete
rect = self._layoutRect;
[2426] Fix | Delete
style.left = rect.x + 'px';
[2427] Fix | Delete
style.top = rect.y + 'px';
[2428] Fix | Delete
style.zIndex = 65535 + 65535;
[2429] Fix | Delete
}
[2430] Fix | Delete
});
[2431] Fix | Delete
[2432] Fix | Delete
var Widget = Control$1.extend({
[2433] Fix | Delete
init: function (settings) {
[2434] Fix | Delete
var self = this;
[2435] Fix | Delete
self._super(settings);
[2436] Fix | Delete
settings = self.settings;
[2437] Fix | Delete
self.canFocus = true;
[2438] Fix | Delete
if (settings.tooltip && Widget.tooltips !== false) {
[2439] Fix | Delete
self.on('mouseenter', function (e) {
[2440] Fix | Delete
var tooltip = self.tooltip().moveTo(-65535);
[2441] Fix | Delete
if (e.control === self) {
[2442] Fix | Delete
var rel = tooltip.text(settings.tooltip).show().testMoveRel(self.getEl(), [
[2443] Fix | Delete
'bc-tc',
[2444] Fix | Delete
'bc-tl',
[2445] Fix | Delete
'bc-tr'
[2446] Fix | Delete
]);
[2447] Fix | Delete
tooltip.classes.toggle('tooltip-n', rel === 'bc-tc');
[2448] Fix | Delete
tooltip.classes.toggle('tooltip-nw', rel === 'bc-tl');
[2449] Fix | Delete
tooltip.classes.toggle('tooltip-ne', rel === 'bc-tr');
[2450] Fix | Delete
tooltip.moveRel(self.getEl(), rel);
[2451] Fix | Delete
} else {
[2452] Fix | Delete
tooltip.hide();
[2453] Fix | Delete
}
[2454] Fix | Delete
});
[2455] Fix | Delete
self.on('mouseleave mousedown click', function () {
[2456] Fix | Delete
self.tooltip().remove();
[2457] Fix | Delete
self._tooltip = null;
[2458] Fix | Delete
});
[2459] Fix | Delete
}
[2460] Fix | Delete
self.aria('label', settings.ariaLabel || settings.tooltip);
[2461] Fix | Delete
},
[2462] Fix | Delete
tooltip: function () {
[2463] Fix | Delete
if (!this._tooltip) {
[2464] Fix | Delete
this._tooltip = new Tooltip({ type: 'tooltip' });
[2465] Fix | Delete
UiContainer.inheritUiContainer(this, this._tooltip);
[2466] Fix | Delete
this._tooltip.renderTo();
[2467] Fix | Delete
}
[2468] Fix | Delete
return this._tooltip;
[2469] Fix | Delete
},
[2470] Fix | Delete
postRender: function () {
[2471] Fix | Delete
var self = this, settings = self.settings;
[2472] Fix | Delete
self._super();
[2473] Fix | Delete
if (!self.parent() && (settings.width || settings.height)) {
[2474] Fix | Delete
self.initLayoutRect();
[2475] Fix | Delete
self.repaint();
[2476] Fix | Delete
}
[2477] Fix | Delete
if (settings.autofocus) {
[2478] Fix | Delete
self.focus();
[2479] Fix | Delete
}
[2480] Fix | Delete
},
[2481] Fix | Delete
bindStates: function () {
[2482] Fix | Delete
var self = this;
[2483] Fix | Delete
function disable(state) {
[2484] Fix | Delete
self.aria('disabled', state);
[2485] Fix | Delete
self.classes.toggle('disabled', state);
[2486] Fix | Delete
}
[2487] Fix | Delete
function active(state) {
[2488] Fix | Delete
self.aria('pressed', state);
[2489] Fix | Delete
self.classes.toggle('active', state);
[2490] Fix | Delete
}
[2491] Fix | Delete
self.state.on('change:disabled', function (e) {
[2492] Fix | Delete
disable(e.value);
[2493] Fix | Delete
});
[2494] Fix | Delete
self.state.on('change:active', function (e) {
[2495] Fix | Delete
active(e.value);
[2496] Fix | Delete
});
[2497] Fix | Delete
if (self.state.get('disabled')) {
[2498] Fix | Delete
disable(true);
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function