Edit File by line
/home/barbar84/www/wp-inclu.../js/tinymce/themes/inlite
File: theme.js
maxW: maxW
[5500] Fix | Delete
});
[5501] Fix | Delete
self.menu.repaint();
[5502] Fix | Delete
self.menu.reflow();
[5503] Fix | Delete
self.menu.show();
[5504] Fix | Delete
self.menu.moveRel(self.getEl(), self.isRtl() ? [
[5505] Fix | Delete
'br-tr',
[5506] Fix | Delete
'tr-br'
[5507] Fix | Delete
] : [
[5508] Fix | Delete
'bl-tl',
[5509] Fix | Delete
'tl-bl'
[5510] Fix | Delete
]);
[5511] Fix | Delete
},
[5512] Fix | Delete
hideMenu: function () {
[5513] Fix | Delete
if (this.menu) {
[5514] Fix | Delete
this.menu.hide();
[5515] Fix | Delete
}
[5516] Fix | Delete
},
[5517] Fix | Delete
bindStates: function () {
[5518] Fix | Delete
var self = this;
[5519] Fix | Delete
self.state.on('change:value', function (e) {
[5520] Fix | Delete
if (self.getEl('inp').value !== e.value) {
[5521] Fix | Delete
self.getEl('inp').value = e.value;
[5522] Fix | Delete
}
[5523] Fix | Delete
});
[5524] Fix | Delete
self.state.on('change:disabled', function (e) {
[5525] Fix | Delete
self.getEl('inp').disabled = e.value;
[5526] Fix | Delete
});
[5527] Fix | Delete
self.state.on('change:statusLevel', function (e) {
[5528] Fix | Delete
var statusIconElm = self.getEl('status');
[5529] Fix | Delete
var prefix = self.classPrefix, value = e.value;
[5530] Fix | Delete
funcs.css(statusIconElm, 'display', value === 'none' ? 'none' : '');
[5531] Fix | Delete
funcs.toggleClass(statusIconElm, prefix + 'i-checkmark', value === 'ok');
[5532] Fix | Delete
funcs.toggleClass(statusIconElm, prefix + 'i-warning', value === 'warn');
[5533] Fix | Delete
funcs.toggleClass(statusIconElm, prefix + 'i-error', value === 'error');
[5534] Fix | Delete
self.classes.toggle('has-status', value !== 'none');
[5535] Fix | Delete
self.repaint();
[5536] Fix | Delete
});
[5537] Fix | Delete
funcs.on(self.getEl('status'), 'mouseleave', function () {
[5538] Fix | Delete
self.tooltip().hide();
[5539] Fix | Delete
});
[5540] Fix | Delete
self.on('cancel', function (e) {
[5541] Fix | Delete
if (self.menu && self.menu.visible()) {
[5542] Fix | Delete
e.stopPropagation();
[5543] Fix | Delete
self.hideMenu();
[5544] Fix | Delete
}
[5545] Fix | Delete
});
[5546] Fix | Delete
var focusIdx = function (idx, menu) {
[5547] Fix | Delete
if (menu && menu.items().length > 0) {
[5548] Fix | Delete
menu.items().eq(idx)[0].focus();
[5549] Fix | Delete
}
[5550] Fix | Delete
};
[5551] Fix | Delete
self.on('keydown', function (e) {
[5552] Fix | Delete
var keyCode = e.keyCode;
[5553] Fix | Delete
if (e.target.nodeName === 'INPUT') {
[5554] Fix | Delete
if (keyCode === global$f.DOWN) {
[5555] Fix | Delete
e.preventDefault();
[5556] Fix | Delete
self.fire('autocomplete');
[5557] Fix | Delete
focusIdx(0, self.menu);
[5558] Fix | Delete
} else if (keyCode === global$f.UP) {
[5559] Fix | Delete
e.preventDefault();
[5560] Fix | Delete
focusIdx(-1, self.menu);
[5561] Fix | Delete
}
[5562] Fix | Delete
}
[5563] Fix | Delete
});
[5564] Fix | Delete
return self._super();
[5565] Fix | Delete
},
[5566] Fix | Delete
remove: function () {
[5567] Fix | Delete
global$7(this.getEl('inp')).off();
[5568] Fix | Delete
if (this.menu) {
[5569] Fix | Delete
this.menu.remove();
[5570] Fix | Delete
}
[5571] Fix | Delete
this._super();
[5572] Fix | Delete
}
[5573] Fix | Delete
});
[5574] Fix | Delete
[5575] Fix | Delete
var ColorBox = ComboBox.extend({
[5576] Fix | Delete
init: function (settings) {
[5577] Fix | Delete
var self = this;
[5578] Fix | Delete
settings.spellcheck = false;
[5579] Fix | Delete
if (settings.onaction) {
[5580] Fix | Delete
settings.icon = 'none';
[5581] Fix | Delete
}
[5582] Fix | Delete
self._super(settings);
[5583] Fix | Delete
self.classes.add('colorbox');
[5584] Fix | Delete
self.on('change keyup postrender', function () {
[5585] Fix | Delete
self.repaintColor(self.value());
[5586] Fix | Delete
});
[5587] Fix | Delete
},
[5588] Fix | Delete
repaintColor: function (value) {
[5589] Fix | Delete
var openElm = this.getEl('open');
[5590] Fix | Delete
var elm = openElm ? openElm.getElementsByTagName('i')[0] : null;
[5591] Fix | Delete
if (elm) {
[5592] Fix | Delete
try {
[5593] Fix | Delete
elm.style.background = value;
[5594] Fix | Delete
} catch (ex) {
[5595] Fix | Delete
}
[5596] Fix | Delete
}
[5597] Fix | Delete
},
[5598] Fix | Delete
bindStates: function () {
[5599] Fix | Delete
var self = this;
[5600] Fix | Delete
self.state.on('change:value', function (e) {
[5601] Fix | Delete
if (self.state.get('rendered')) {
[5602] Fix | Delete
self.repaintColor(e.value);
[5603] Fix | Delete
}
[5604] Fix | Delete
});
[5605] Fix | Delete
return self._super();
[5606] Fix | Delete
}
[5607] Fix | Delete
});
[5608] Fix | Delete
[5609] Fix | Delete
var PanelButton = Button.extend({
[5610] Fix | Delete
showPanel: function () {
[5611] Fix | Delete
var self = this, settings = self.settings;
[5612] Fix | Delete
self.classes.add('opened');
[5613] Fix | Delete
if (!self.panel) {
[5614] Fix | Delete
var panelSettings = settings.panel;
[5615] Fix | Delete
if (panelSettings.type) {
[5616] Fix | Delete
panelSettings = {
[5617] Fix | Delete
layout: 'grid',
[5618] Fix | Delete
items: panelSettings
[5619] Fix | Delete
};
[5620] Fix | Delete
}
[5621] Fix | Delete
panelSettings.role = panelSettings.role || 'dialog';
[5622] Fix | Delete
panelSettings.popover = true;
[5623] Fix | Delete
panelSettings.autohide = true;
[5624] Fix | Delete
panelSettings.ariaRoot = true;
[5625] Fix | Delete
self.panel = new FloatPanel(panelSettings).on('hide', function () {
[5626] Fix | Delete
self.classes.remove('opened');
[5627] Fix | Delete
}).on('cancel', function (e) {
[5628] Fix | Delete
e.stopPropagation();
[5629] Fix | Delete
self.focus();
[5630] Fix | Delete
self.hidePanel();
[5631] Fix | Delete
}).parent(self).renderTo(self.getContainerElm());
[5632] Fix | Delete
self.panel.fire('show');
[5633] Fix | Delete
self.panel.reflow();
[5634] Fix | Delete
} else {
[5635] Fix | Delete
self.panel.show();
[5636] Fix | Delete
}
[5637] Fix | Delete
var rtlRels = [
[5638] Fix | Delete
'bc-tc',
[5639] Fix | Delete
'bc-tl',
[5640] Fix | Delete
'bc-tr'
[5641] Fix | Delete
];
[5642] Fix | Delete
var ltrRels = [
[5643] Fix | Delete
'bc-tc',
[5644] Fix | Delete
'bc-tr',
[5645] Fix | Delete
'bc-tl',
[5646] Fix | Delete
'tc-bc',
[5647] Fix | Delete
'tc-br',
[5648] Fix | Delete
'tc-bl'
[5649] Fix | Delete
];
[5650] Fix | Delete
var rel = self.panel.testMoveRel(self.getEl(), settings.popoverAlign || (self.isRtl() ? rtlRels : ltrRels));
[5651] Fix | Delete
self.panel.classes.toggle('start', rel.substr(-1) === 'l');
[5652] Fix | Delete
self.panel.classes.toggle('end', rel.substr(-1) === 'r');
[5653] Fix | Delete
var isTop = rel.substr(0, 1) === 't';
[5654] Fix | Delete
self.panel.classes.toggle('bottom', !isTop);
[5655] Fix | Delete
self.panel.classes.toggle('top', isTop);
[5656] Fix | Delete
self.panel.moveRel(self.getEl(), rel);
[5657] Fix | Delete
},
[5658] Fix | Delete
hidePanel: function () {
[5659] Fix | Delete
var self = this;
[5660] Fix | Delete
if (self.panel) {
[5661] Fix | Delete
self.panel.hide();
[5662] Fix | Delete
}
[5663] Fix | Delete
},
[5664] Fix | Delete
postRender: function () {
[5665] Fix | Delete
var self = this;
[5666] Fix | Delete
self.aria('haspopup', true);
[5667] Fix | Delete
self.on('click', function (e) {
[5668] Fix | Delete
if (e.control === self) {
[5669] Fix | Delete
if (self.panel && self.panel.visible()) {
[5670] Fix | Delete
self.hidePanel();
[5671] Fix | Delete
} else {
[5672] Fix | Delete
self.showPanel();
[5673] Fix | Delete
self.panel.focus(!!e.aria);
[5674] Fix | Delete
}
[5675] Fix | Delete
}
[5676] Fix | Delete
});
[5677] Fix | Delete
return self._super();
[5678] Fix | Delete
},
[5679] Fix | Delete
remove: function () {
[5680] Fix | Delete
if (this.panel) {
[5681] Fix | Delete
this.panel.remove();
[5682] Fix | Delete
this.panel = null;
[5683] Fix | Delete
}
[5684] Fix | Delete
return this._super();
[5685] Fix | Delete
}
[5686] Fix | Delete
});
[5687] Fix | Delete
[5688] Fix | Delete
var DOM = global$2.DOM;
[5689] Fix | Delete
var ColorButton = PanelButton.extend({
[5690] Fix | Delete
init: function (settings) {
[5691] Fix | Delete
this._super(settings);
[5692] Fix | Delete
this.classes.add('splitbtn');
[5693] Fix | Delete
this.classes.add('colorbutton');
[5694] Fix | Delete
},
[5695] Fix | Delete
color: function (color) {
[5696] Fix | Delete
if (color) {
[5697] Fix | Delete
this._color = color;
[5698] Fix | Delete
this.getEl('preview').style.backgroundColor = color;
[5699] Fix | Delete
return this;
[5700] Fix | Delete
}
[5701] Fix | Delete
return this._color;
[5702] Fix | Delete
},
[5703] Fix | Delete
resetColor: function () {
[5704] Fix | Delete
this._color = null;
[5705] Fix | Delete
this.getEl('preview').style.backgroundColor = null;
[5706] Fix | Delete
return this;
[5707] Fix | Delete
},
[5708] Fix | Delete
renderHtml: function () {
[5709] Fix | Delete
var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text');
[5710] Fix | Delete
var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
[5711] Fix | Delete
var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '';
[5712] Fix | Delete
var textHtml = '';
[5713] Fix | Delete
if (text) {
[5714] Fix | Delete
self.classes.add('btn-has-text');
[5715] Fix | Delete
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
[5716] Fix | Delete
}
[5717] Fix | Delete
return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>';
[5718] Fix | Delete
},
[5719] Fix | Delete
postRender: function () {
[5720] Fix | Delete
var self = this, onClickHandler = self.settings.onclick;
[5721] Fix | Delete
self.on('click', function (e) {
[5722] Fix | Delete
if (e.aria && e.aria.key === 'down') {
[5723] Fix | Delete
return;
[5724] Fix | Delete
}
[5725] Fix | Delete
if (e.control === self && !DOM.getParent(e.target, '.' + self.classPrefix + 'open')) {
[5726] Fix | Delete
e.stopImmediatePropagation();
[5727] Fix | Delete
onClickHandler.call(self, e);
[5728] Fix | Delete
}
[5729] Fix | Delete
});
[5730] Fix | Delete
delete self.settings.onclick;
[5731] Fix | Delete
return self._super();
[5732] Fix | Delete
}
[5733] Fix | Delete
});
[5734] Fix | Delete
[5735] Fix | Delete
var global$g = tinymce.util.Tools.resolve('tinymce.util.Color');
[5736] Fix | Delete
[5737] Fix | Delete
var ColorPicker = Widget.extend({
[5738] Fix | Delete
Defaults: { classes: 'widget colorpicker' },
[5739] Fix | Delete
init: function (settings) {
[5740] Fix | Delete
this._super(settings);
[5741] Fix | Delete
},
[5742] Fix | Delete
postRender: function () {
[5743] Fix | Delete
var self = this;
[5744] Fix | Delete
var color = self.color();
[5745] Fix | Delete
var hsv, hueRootElm, huePointElm, svRootElm, svPointElm;
[5746] Fix | Delete
hueRootElm = self.getEl('h');
[5747] Fix | Delete
huePointElm = self.getEl('hp');
[5748] Fix | Delete
svRootElm = self.getEl('sv');
[5749] Fix | Delete
svPointElm = self.getEl('svp');
[5750] Fix | Delete
function getPos(elm, event) {
[5751] Fix | Delete
var pos = funcs.getPos(elm);
[5752] Fix | Delete
var x, y;
[5753] Fix | Delete
x = event.pageX - pos.x;
[5754] Fix | Delete
y = event.pageY - pos.y;
[5755] Fix | Delete
x = Math.max(0, Math.min(x / elm.clientWidth, 1));
[5756] Fix | Delete
y = Math.max(0, Math.min(y / elm.clientHeight, 1));
[5757] Fix | Delete
return {
[5758] Fix | Delete
x: x,
[5759] Fix | Delete
y: y
[5760] Fix | Delete
};
[5761] Fix | Delete
}
[5762] Fix | Delete
function updateColor(hsv, hueUpdate) {
[5763] Fix | Delete
var hue = (360 - hsv.h) / 360;
[5764] Fix | Delete
funcs.css(huePointElm, { top: hue * 100 + '%' });
[5765] Fix | Delete
if (!hueUpdate) {
[5766] Fix | Delete
funcs.css(svPointElm, {
[5767] Fix | Delete
left: hsv.s + '%',
[5768] Fix | Delete
top: 100 - hsv.v + '%'
[5769] Fix | Delete
});
[5770] Fix | Delete
}
[5771] Fix | Delete
svRootElm.style.background = global$g({
[5772] Fix | Delete
s: 100,
[5773] Fix | Delete
v: 100,
[5774] Fix | Delete
h: hsv.h
[5775] Fix | Delete
}).toHex();
[5776] Fix | Delete
self.color().parse({
[5777] Fix | Delete
s: hsv.s,
[5778] Fix | Delete
v: hsv.v,
[5779] Fix | Delete
h: hsv.h
[5780] Fix | Delete
});
[5781] Fix | Delete
}
[5782] Fix | Delete
function updateSaturationAndValue(e) {
[5783] Fix | Delete
var pos;
[5784] Fix | Delete
pos = getPos(svRootElm, e);
[5785] Fix | Delete
hsv.s = pos.x * 100;
[5786] Fix | Delete
hsv.v = (1 - pos.y) * 100;
[5787] Fix | Delete
updateColor(hsv);
[5788] Fix | Delete
self.fire('change');
[5789] Fix | Delete
}
[5790] Fix | Delete
function updateHue(e) {
[5791] Fix | Delete
var pos;
[5792] Fix | Delete
pos = getPos(hueRootElm, e);
[5793] Fix | Delete
hsv = color.toHsv();
[5794] Fix | Delete
hsv.h = (1 - pos.y) * 360;
[5795] Fix | Delete
updateColor(hsv, true);
[5796] Fix | Delete
self.fire('change');
[5797] Fix | Delete
}
[5798] Fix | Delete
self._repaint = function () {
[5799] Fix | Delete
hsv = color.toHsv();
[5800] Fix | Delete
updateColor(hsv);
[5801] Fix | Delete
};
[5802] Fix | Delete
self._super();
[5803] Fix | Delete
self._svdraghelper = new DragHelper(self._id + '-sv', {
[5804] Fix | Delete
start: updateSaturationAndValue,
[5805] Fix | Delete
drag: updateSaturationAndValue
[5806] Fix | Delete
});
[5807] Fix | Delete
self._hdraghelper = new DragHelper(self._id + '-h', {
[5808] Fix | Delete
start: updateHue,
[5809] Fix | Delete
drag: updateHue
[5810] Fix | Delete
});
[5811] Fix | Delete
self._repaint();
[5812] Fix | Delete
},
[5813] Fix | Delete
rgb: function () {
[5814] Fix | Delete
return this.color().toRgb();
[5815] Fix | Delete
},
[5816] Fix | Delete
value: function (value) {
[5817] Fix | Delete
var self = this;
[5818] Fix | Delete
if (arguments.length) {
[5819] Fix | Delete
self.color().parse(value);
[5820] Fix | Delete
if (self._rendered) {
[5821] Fix | Delete
self._repaint();
[5822] Fix | Delete
}
[5823] Fix | Delete
} else {
[5824] Fix | Delete
return self.color().toHex();
[5825] Fix | Delete
}
[5826] Fix | Delete
},
[5827] Fix | Delete
color: function () {
[5828] Fix | Delete
if (!this._color) {
[5829] Fix | Delete
this._color = global$g();
[5830] Fix | Delete
}
[5831] Fix | Delete
return this._color;
[5832] Fix | Delete
},
[5833] Fix | Delete
renderHtml: function () {
[5834] Fix | Delete
var self = this;
[5835] Fix | Delete
var id = self._id;
[5836] Fix | Delete
var prefix = self.classPrefix;
[5837] Fix | Delete
var hueHtml;
[5838] Fix | Delete
var stops = '#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000';
[5839] Fix | Delete
function getOldIeFallbackHtml() {
[5840] Fix | Delete
var i, l, html = '', gradientPrefix, stopsList;
[5841] Fix | Delete
gradientPrefix = 'filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=';
[5842] Fix | Delete
stopsList = stops.split(',');
[5843] Fix | Delete
for (i = 0, l = stopsList.length - 1; i < l; i++) {
[5844] Fix | Delete
html += '<div class="' + prefix + 'colorpicker-h-chunk" style="' + 'height:' + 100 / l + '%;' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ');' + '-ms-' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ')' + '"></div>';
[5845] Fix | Delete
}
[5846] Fix | Delete
return html;
[5847] Fix | Delete
}
[5848] Fix | Delete
var gradientCssText = 'background: -ms-linear-gradient(top,' + stops + ');' + 'background: linear-gradient(to bottom,' + stops + ');';
[5849] Fix | Delete
hueHtml = '<div id="' + id + '-h" class="' + prefix + 'colorpicker-h" style="' + gradientCssText + '">' + getOldIeFallbackHtml() + '<div id="' + id + '-hp" class="' + prefix + 'colorpicker-h-marker"></div>' + '</div>';
[5850] Fix | Delete
return '<div id="' + id + '" class="' + self.classes + '">' + '<div id="' + id + '-sv" class="' + prefix + 'colorpicker-sv">' + '<div class="' + prefix + 'colorpicker-overlay1">' + '<div class="' + prefix + 'colorpicker-overlay2">' + '<div id="' + id + '-svp" class="' + prefix + 'colorpicker-selector1">' + '<div class="' + prefix + 'colorpicker-selector2"></div>' + '</div>' + '</div>' + '</div>' + '</div>' + hueHtml + '</div>';
[5851] Fix | Delete
}
[5852] Fix | Delete
});
[5853] Fix | Delete
[5854] Fix | Delete
var DropZone = Widget.extend({
[5855] Fix | Delete
init: function (settings) {
[5856] Fix | Delete
var self = this;
[5857] Fix | Delete
settings = global$4.extend({
[5858] Fix | Delete
height: 100,
[5859] Fix | Delete
text: 'Drop an image here',
[5860] Fix | Delete
multiple: false,
[5861] Fix | Delete
accept: null
[5862] Fix | Delete
}, settings);
[5863] Fix | Delete
self._super(settings);
[5864] Fix | Delete
self.classes.add('dropzone');
[5865] Fix | Delete
if (settings.multiple) {
[5866] Fix | Delete
self.classes.add('multiple');
[5867] Fix | Delete
}
[5868] Fix | Delete
},
[5869] Fix | Delete
renderHtml: function () {
[5870] Fix | Delete
var self = this;
[5871] Fix | Delete
var attrs, elm;
[5872] Fix | Delete
var cfg = self.settings;
[5873] Fix | Delete
attrs = {
[5874] Fix | Delete
id: self._id,
[5875] Fix | Delete
hidefocus: '1'
[5876] Fix | Delete
};
[5877] Fix | Delete
elm = funcs.create('div', attrs, '<span>' + this.translate(cfg.text) + '</span>');
[5878] Fix | Delete
if (cfg.height) {
[5879] Fix | Delete
funcs.css(elm, 'height', cfg.height + 'px');
[5880] Fix | Delete
}
[5881] Fix | Delete
if (cfg.width) {
[5882] Fix | Delete
funcs.css(elm, 'width', cfg.width + 'px');
[5883] Fix | Delete
}
[5884] Fix | Delete
elm.className = self.classes;
[5885] Fix | Delete
return elm.outerHTML;
[5886] Fix | Delete
},
[5887] Fix | Delete
postRender: function () {
[5888] Fix | Delete
var self = this;
[5889] Fix | Delete
var toggleDragClass = function (e) {
[5890] Fix | Delete
e.preventDefault();
[5891] Fix | Delete
self.classes.toggle('dragenter');
[5892] Fix | Delete
self.getEl().className = self.classes;
[5893] Fix | Delete
};
[5894] Fix | Delete
var filter = function (files) {
[5895] Fix | Delete
var accept = self.settings.accept;
[5896] Fix | Delete
if (typeof accept !== 'string') {
[5897] Fix | Delete
return files;
[5898] Fix | Delete
}
[5899] Fix | Delete
var re = new RegExp('(' + accept.split(/\s*,\s*/).join('|') + ')$', 'i');
[5900] Fix | Delete
return global$4.grep(files, function (file) {
[5901] Fix | Delete
return re.test(file.name);
[5902] Fix | Delete
});
[5903] Fix | Delete
};
[5904] Fix | Delete
self._super();
[5905] Fix | Delete
self.$el.on('dragover', function (e) {
[5906] Fix | Delete
e.preventDefault();
[5907] Fix | Delete
});
[5908] Fix | Delete
self.$el.on('dragenter', toggleDragClass);
[5909] Fix | Delete
self.$el.on('dragleave', toggleDragClass);
[5910] Fix | Delete
self.$el.on('drop', function (e) {
[5911] Fix | Delete
e.preventDefault();
[5912] Fix | Delete
if (self.state.get('disabled')) {
[5913] Fix | Delete
return;
[5914] Fix | Delete
}
[5915] Fix | Delete
var files = filter(e.dataTransfer.files);
[5916] Fix | Delete
self.value = function () {
[5917] Fix | Delete
if (!files.length) {
[5918] Fix | Delete
return null;
[5919] Fix | Delete
} else if (self.settings.multiple) {
[5920] Fix | Delete
return files;
[5921] Fix | Delete
} else {
[5922] Fix | Delete
return files[0];
[5923] Fix | Delete
}
[5924] Fix | Delete
};
[5925] Fix | Delete
if (files.length) {
[5926] Fix | Delete
self.fire('change', e);
[5927] Fix | Delete
}
[5928] Fix | Delete
});
[5929] Fix | Delete
},
[5930] Fix | Delete
remove: function () {
[5931] Fix | Delete
this.$el.off();
[5932] Fix | Delete
this._super();
[5933] Fix | Delete
}
[5934] Fix | Delete
});
[5935] Fix | Delete
[5936] Fix | Delete
var Path = Widget.extend({
[5937] Fix | Delete
init: function (settings) {
[5938] Fix | Delete
var self = this;
[5939] Fix | Delete
if (!settings.delimiter) {
[5940] Fix | Delete
settings.delimiter = '\xBB';
[5941] Fix | Delete
}
[5942] Fix | Delete
self._super(settings);
[5943] Fix | Delete
self.classes.add('path');
[5944] Fix | Delete
self.canFocus = true;
[5945] Fix | Delete
self.on('click', function (e) {
[5946] Fix | Delete
var index;
[5947] Fix | Delete
var target = e.target;
[5948] Fix | Delete
if (index = target.getAttribute('data-index')) {
[5949] Fix | Delete
self.fire('select', {
[5950] Fix | Delete
value: self.row()[index],
[5951] Fix | Delete
index: index
[5952] Fix | Delete
});
[5953] Fix | Delete
}
[5954] Fix | Delete
});
[5955] Fix | Delete
self.row(self.settings.row);
[5956] Fix | Delete
},
[5957] Fix | Delete
focus: function () {
[5958] Fix | Delete
var self = this;
[5959] Fix | Delete
self.getEl().firstChild.focus();
[5960] Fix | Delete
return self;
[5961] Fix | Delete
},
[5962] Fix | Delete
row: function (row) {
[5963] Fix | Delete
if (!arguments.length) {
[5964] Fix | Delete
return this.state.get('row');
[5965] Fix | Delete
}
[5966] Fix | Delete
this.state.set('row', row);
[5967] Fix | Delete
return this;
[5968] Fix | Delete
},
[5969] Fix | Delete
renderHtml: function () {
[5970] Fix | Delete
var self = this;
[5971] Fix | Delete
return '<div id="' + self._id + '" class="' + self.classes + '">' + self._getDataPathHtml(self.state.get('row')) + '</div>';
[5972] Fix | Delete
},
[5973] Fix | Delete
bindStates: function () {
[5974] Fix | Delete
var self = this;
[5975] Fix | Delete
self.state.on('change:row', function (e) {
[5976] Fix | Delete
self.innerHtml(self._getDataPathHtml(e.value));
[5977] Fix | Delete
});
[5978] Fix | Delete
return self._super();
[5979] Fix | Delete
},
[5980] Fix | Delete
_getDataPathHtml: function (data) {
[5981] Fix | Delete
var self = this;
[5982] Fix | Delete
var parts = data || [];
[5983] Fix | Delete
var i, l, html = '';
[5984] Fix | Delete
var prefix = self.classPrefix;
[5985] Fix | Delete
for (i = 0, l = parts.length; i < l; i++) {
[5986] Fix | Delete
html += (i > 0 ? '<div class="' + prefix + 'divider" aria-hidden="true"> ' + self.settings.delimiter + ' </div>' : '') + '<div role="button" class="' + prefix + 'path-item' + (i === l - 1 ? ' ' + prefix + 'last' : '') + '" data-index="' + i + '" tabindex="-1" id="' + self._id + '-' + i + '" aria-level="' + (i + 1) + '">' + parts[i].name + '</div>';
[5987] Fix | Delete
}
[5988] Fix | Delete
if (!html) {
[5989] Fix | Delete
html = '<div class="' + prefix + 'path-item">\xA0</div>';
[5990] Fix | Delete
}
[5991] Fix | Delete
return html;
[5992] Fix | Delete
}
[5993] Fix | Delete
});
[5994] Fix | Delete
[5995] Fix | Delete
var ElementPath = Path.extend({
[5996] Fix | Delete
postRender: function () {
[5997] Fix | Delete
var self = this, editor = self.settings.editor;
[5998] Fix | Delete
function isHidden(elm) {
[5999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function