Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../js/editor/componen...
File: constructor.mjs
loader = null;
[5000] Fix | Delete
},
[5001] Fix | Delete
updateWpMedia = () => {
[5002] Fix | Delete
let frame = self.mediaFile._frames.json;
[5003] Fix | Delete
if (frame !== undefined) {
[5004] Fix | Delete
frame = frame.content.get();
[5005] Fix | Delete
frame.collection.props.set({ignore: (+new Date())});
[5006] Fix | Delete
frame.options.selection.reset();
[5007] Fix | Delete
}
[5008] Fix | Delete
},
[5009] Fix | Delete
openLibrary = async () => {
[5010] Fix | Delete
api.Spinner.showLoader();
[5011] Fix | Delete
try {
[5012] Fix | Delete
const opt = themifyBuilder.i18n.lottie_lib;
[5013] Fix | Delete
opt.all = i18n.all;
[5014] Fix | Delete
await Themify.loadJs(Themify.url + 'js/admin/modules/lottie-library', !!window.TF_LottieLibrary);
[5015] Fix | Delete
await TF_LottieLibrary.run(input, opt, themifyBuilder.nonce);
[5016] Fix | Delete
input.tfOff('change', updateWpMedia, {passive: true, once: true})
[5017] Fix | Delete
.tfOn('change', updateWpMedia, {passive: true, once: true});
[5018] Fix | Delete
api.Spinner.showLoader('done');
[5019] Fix | Delete
[5020] Fix | Delete
} catch (e) {
[5021] Fix | Delete
api.Spinner.showLoader('error');
[5022] Fix | Delete
}
[5023] Fix | Delete
};
[5024] Fix | Delete
browse.tfOn(_CLICK_, async e => {
[5025] Fix | Delete
e.stopPropagation();
[5026] Fix | Delete
openLibrary();
[5027] Fix | Delete
}, {passive: true})
[5028] Fix | Delete
.innerHTML = themifyBuilder.i18n.lottie_lib.browse;
[5029] Fix | Delete
[5030] Fix | Delete
input.tfOn('change', e => {
[5031] Fix | Delete
e.stopPropagation();
[5032] Fix | Delete
_callback(e.currentTarget, true);
[5033] Fix | Delete
}, {passive: true});
[5034] Fix | Delete
[5035] Fix | Delete
wr.appendChild(loader);
[5036] Fix | Delete
fileWrap.querySelector('.tb_input').appendChild(browse);
[5037] Fix | Delete
f.append(fileWrap, wr);
[5038] Fix | Delete
self.afterRun.push(() => {
[5039] Fix | Delete
_callback(input, false, vals.fid);
[5040] Fix | Delete
if (isMulti) {
[5041] Fix | Delete
if (self.is_new) {
[5042] Fix | Delete
openLibrary();
[5043] Fix | Delete
}
[5044] Fix | Delete
const wrapper = input.closest('.tb_row_js_wrapper');
[5045] Fix | Delete
if (wrapper.parentNode.tfClass('tb_lottie_export')[0] === undefined) {
[5046] Fix | Delete
const exportBtn = createElement('button',{class: 'builder_button tb_text_button tb_lottie_export',type:'button'},i18n.lottie.exp);
[5047] Fix | Delete
exportBtn.tfOn(_CLICK_, e => {
[5048] Fix | Delete
e.stopPropagation();
[5049] Fix | Delete
const opt = api.Forms.serialize('tb_options_setting', false);
[5050] Fix | Delete
for (let k in opt) {
[5051] Fix | Delete
if (k !== 'actions' && k !== 'loop') {
[5052] Fix | Delete
delete opt[k];
[5053] Fix | Delete
}
[5054] Fix | Delete
}
[5055] Fix | Delete
const html = '<tf-lottie data-lazy="1" class="tf_w tf_lazy"><template>' + JSON.stringify(opt) + '</template></tf-lottie>',
[5056] Fix | Delete
msg = i18n.lottie.copy.replaceAll('%html%', '<textarea style="border:0;outline:0;resize:none;display:inline-table;font-weight:bold;margin-top:20px" readonly class="tf_w">' + html + '</textarea>');
[5057] Fix | Delete
api.LiteLightBox.alert(msg);
[5058] Fix | Delete
const textarea = api.LiteLightBox.el.tfTag('textarea')[0],
[5059] Fix | Delete
select = () => {
[5060] Fix | Delete
textarea.focus();
[5061] Fix | Delete
textarea.select();
[5062] Fix | Delete
};
[5063] Fix | Delete
textarea.tfOn(e.type, select, {passive: true});
[5064] Fix | Delete
select();
[5065] Fix | Delete
}, {passive: true});
[5066] Fix | Delete
wrapper.after(exportBtn);
[5067] Fix | Delete
}
[5068] Fix | Delete
}
[5069] Fix | Delete
});
[5070] Fix | Delete
return f;
[5071] Fix | Delete
}
[5072] Fix | Delete
},
[5073] Fix | Delete
icon_radio: {
[5074] Fix | Delete
controlChange(wrap) {
[5075] Fix | Delete
wrap.tfOn(_CLICK_, function (e) {
[5076] Fix | Delete
e.preventDefault();
[5077] Fix | Delete
e.stopImmediatePropagation();
[5078] Fix | Delete
if (e.target !== wrap) {
[5079] Fix | Delete
const input = e.target.closest('label').tfTag('input')[0];
[5080] Fix | Delete
if (input.checked === true) {
[5081] Fix | Delete
input.checked = false;
[5082] Fix | Delete
input.value = undefined;
[5083] Fix | Delete
} else {
[5084] Fix | Delete
input.checked = true;
[5085] Fix | Delete
input.value = input.dataset.value;
[5086] Fix | Delete
}
[5087] Fix | Delete
Themify.triggerEvent(input, 'change');
[5088] Fix | Delete
}
[5089] Fix | Delete
});
[5090] Fix | Delete
},
[5091] Fix | Delete
render(data, self) {
[5092] Fix | Delete
return self.radioGenerate('icon_radio', data);
[5093] Fix | Delete
}
[5094] Fix | Delete
},
[5095] Fix | Delete
radio: {
[5096] Fix | Delete
controlChange(item) {
[5097] Fix | Delete
const context = item.classList.contains('tb_radio_dnd') ? item.closest('.tb_repeatable_field_content') : (item.closest('.tb_tab,.tb_expanded_opttions') || api.LightBox.el),
[5098] Fix | Delete
elements = item.parentNode.parentNode.tfTag('input'),
[5099] Fix | Delete
selected = item.value,
[5100] Fix | Delete
groups = context.tfClass('tb_group_element_' + selected);
[5101] Fix | Delete
for (let i = elements.length - 1; i > -1; --i) {
[5102] Fix | Delete
let v = elements[i].value;
[5103] Fix | Delete
if (selected !== v) {
[5104] Fix | Delete
let g = context.tfClass('tb_group_element_' + v);
[5105] Fix | Delete
for (let j = g.length - 1; j > -1; --j) {
[5106] Fix | Delete
g[j].style.display = 'none';
[5107] Fix | Delete
}
[5108] Fix | Delete
}
[5109] Fix | Delete
}
[5110] Fix | Delete
for (let j = groups.length - 1; j > -1; --j) {
[5111] Fix | Delete
groups[j].style.display = '';
[5112] Fix | Delete
}
[5113] Fix | Delete
},
[5114] Fix | Delete
update(id, v, self) {
[5115] Fix | Delete
const wrap = self.getEl(id);
[5116] Fix | Delete
if (wrap !== null) {
[5117] Fix | Delete
const items = wrap.tfTag('input'),
[5118] Fix | Delete
is_icon = wrap.classList.contains('tb_icon_radio');
[5119] Fix | Delete
let found = null;
[5120] Fix | Delete
for (let i = items.length - 1; i > -1; --i) {
[5121] Fix | Delete
if (items[i].value === v) {
[5122] Fix | Delete
found = items[i];
[5123] Fix | Delete
break;
[5124] Fix | Delete
}
[5125] Fix | Delete
}
[5126] Fix | Delete
if (found === null) {
[5127] Fix | Delete
const def = wrap.dataset.default;
[5128] Fix | Delete
if (def !== undefined) {
[5129] Fix | Delete
found = wrap.querySelector('[value="' + def + '"]');
[5130] Fix | Delete
}
[5131] Fix | Delete
if (is_icon === false && found === null) {
[5132] Fix | Delete
found = items[0];
[5133] Fix | Delete
}
[5134] Fix | Delete
}
[5135] Fix | Delete
[5136] Fix | Delete
if (found !== null) {
[5137] Fix | Delete
found.checked = true;
[5138] Fix | Delete
if (is_icon === false && wrap.classList.contains('tb_option_radio_enable')) {
[5139] Fix | Delete
this.controlChange(found);
[5140] Fix | Delete
}
[5141] Fix | Delete
} else if (is_icon === true) {
[5142] Fix | Delete
for (let i = items.length - 1; i > -1; --i) {
[5143] Fix | Delete
items[i].checked = false;
[5144] Fix | Delete
}
[5145] Fix | Delete
}
[5146] Fix | Delete
}
[5147] Fix | Delete
},
[5148] Fix | Delete
render(data, self) {
[5149] Fix | Delete
return self.radioGenerate('radio', data);
[5150] Fix | Delete
}
[5151] Fix | Delete
},
[5152] Fix | Delete
icon_checkbox: {
[5153] Fix | Delete
render(data, self) {
[5154] Fix | Delete
return self.checkboxGenerate('icon_checkbox', data);
[5155] Fix | Delete
}
[5156] Fix | Delete
},
[5157] Fix | Delete
checkbox: {
[5158] Fix | Delete
update(id, v, self) {
[5159] Fix | Delete
const wrap = self.getEl(id);
[5160] Fix | Delete
if (wrap !== null) {
[5161] Fix | Delete
const items = wrap.tfTag('input'),
[5162] Fix | Delete
js_wrap = wrap.classList.contains('tb_option_checkbox_enable');
[5163] Fix | Delete
v = v?.toString().split('|') || [];
[5164] Fix | Delete
for (let i = items.length - 1; i > -1; --i) {
[5165] Fix | Delete
items[i].checked = v.includes(items[i].value);
[5166] Fix | Delete
if (js_wrap === true) {
[5167] Fix | Delete
this.controlChange(items[i]);
[5168] Fix | Delete
}
[5169] Fix | Delete
}
[5170] Fix | Delete
}
[5171] Fix | Delete
},
[5172] Fix | Delete
controlChange(item) {
[5173] Fix | Delete
const el = item.classList.contains('tb_radio_dnd') ? item.closest('.tb_repeatable_field_content') : api.LightBox.el,
[5174] Fix | Delete
parent = item.parentNode.parentNode,
[5175] Fix | Delete
items = parent.tfTag('input'),
[5176] Fix | Delete
is_revert = parent.classList.contains('tb_option_checkbox_revert');
[5177] Fix | Delete
for (let i = items.length - 1; i > -1; --i) {
[5178] Fix | Delete
let ch = el.tfClass('tb_checkbox_element_' + items[i].value),
[5179] Fix | Delete
is_checked = items[i].checked;
[5180] Fix | Delete
for (let j = ch.length - 1; j > -1; --j) {
[5181] Fix | Delete
ch[j].classList.toggle('_tb_hide_binding', !((is_revert === true && is_checked === false) || (is_revert === false && is_checked === true)));
[5182] Fix | Delete
}
[5183] Fix | Delete
}
[5184] Fix | Delete
},
[5185] Fix | Delete
render(data, self) {
[5186] Fix | Delete
return self.checkboxGenerate('checkbox', data);
[5187] Fix | Delete
}
[5188] Fix | Delete
},
[5189] Fix | Delete
radioGenerate(type, data) {
[5190] Fix | Delete
const d = createDocumentFragment(),
[5191] Fix | Delete
wrapper = createElement('',{class:'tb_radio_wrap',tabindex:-1}),
[5192] Fix | Delete
is_icon = 'icon_radio' === type,
[5193] Fix | Delete
options = this.getOptions(data),
[5194] Fix | Delete
v = this.getStyleVal(data.id),
[5195] Fix | Delete
js_wrap = data.option_js === true,
[5196] Fix | Delete
checked = [],
[5197] Fix | Delete
self = this,
[5198] Fix | Delete
len = options.length;
[5199] Fix | Delete
let toggle = null,
[5200] Fix | Delete
_default = data.default ?? false,
[5201] Fix | Delete
id;
[5202] Fix | Delete
if (len > 1) {
[5203] Fix | Delete
if (data.new_line !== undefined) {
[5204] Fix | Delete
wrapper.className += ' tb_new_line';
[5205] Fix | Delete
}
[5206] Fix | Delete
wrapper.className += ' tb_count_' + len;
[5207] Fix | Delete
}
[5208] Fix | Delete
if (js_wrap === true) {
[5209] Fix | Delete
wrapper.className += ' tb_option_radio_enable';
[5210] Fix | Delete
}
[5211] Fix | Delete
if (is_icon === true) {
[5212] Fix | Delete
wrapper.className += ' tb_icon_radio';
[5213] Fix | Delete
toggle = data.no_toggle===undefined;
[5214] Fix | Delete
}
[5215] Fix | Delete
if (this.is_repeat === true) {
[5216] Fix | Delete
wrapper.className += this.is_sort === true ? ' tb_lb_sort_child' : ' tb_lb_option_child';
[5217] Fix | Delete
id = 'tb_' + Math.random().toString(36).substr(2, 7);
[5218] Fix | Delete
wrapper.dataset.inputId = data.id;
[5219] Fix | Delete
} else {
[5220] Fix | Delete
wrapper.className += ' tb_lb_option';
[5221] Fix | Delete
wrapper.id = id = data.id;
[5222] Fix | Delete
}
[5223] Fix | Delete
if (_default !== false) {
[5224] Fix | Delete
wrapper.dataset.default = _default;
[5225] Fix | Delete
}
[5226] Fix | Delete
else if ( is_icon === false && v === undefined && options[0] ) {
[5227] Fix | Delete
_default = options[0].value;
[5228] Fix | Delete
}
[5229] Fix | Delete
if (data.before !== undefined) {
[5230] Fix | Delete
d.appendChild(createTextNode(data.before));
[5231] Fix | Delete
}
[5232] Fix | Delete
for (let i = 0; i < len; ++i) {
[5233] Fix | Delete
let cl = [],
[5234] Fix | Delete
opt = options[i],
[5235] Fix | Delete
n = i18n[opt.name] || opt.name,
[5236] Fix | Delete
label = createElement('label',opt.class),
[5237] Fix | Delete
ch = createElement('input',{type:'radio',name:id,value:opt.value});
[5238] Fix | Delete
[5239] Fix | Delete
if (is_icon === true) {
[5240] Fix | Delete
ch.dataset.value = opt.value;
[5241] Fix | Delete
}
[5242] Fix | Delete
if (this.is_repeat === true) {
[5243] Fix | Delete
cl.push('tb_radio_dnd');
[5244] Fix | Delete
}
[5245] Fix | Delete
if (data.class !== undefined) {
[5246] Fix | Delete
cl.push(data.class);
[5247] Fix | Delete
}
[5248] Fix | Delete
if (cl.length > 0) {
[5249] Fix | Delete
ch.className = cl.join(' ');
[5250] Fix | Delete
}
[5251] Fix | Delete
if (opt.disable === true) {
[5252] Fix | Delete
ch.disabled = true;
[5253] Fix | Delete
}
[5254] Fix | Delete
if (v === opt.value || (v === undefined && _default === opt.value)) {
[5255] Fix | Delete
ch.checked = true;
[5256] Fix | Delete
if (js_wrap === true) {
[5257] Fix | Delete
checked.push(ch);
[5258] Fix | Delete
}
[5259] Fix | Delete
}
[5260] Fix | Delete
label.appendChild(ch);
[5261] Fix | Delete
if (js_wrap === true) {
[5262] Fix | Delete
ch.tfOn('change', function () {
[5263] Fix | Delete
this.parentNode.parentNode.blur();
[5264] Fix | Delete
self.radio.controlChange(this);
[5265] Fix | Delete
}, {passive: true});
[5266] Fix | Delete
}
[5267] Fix | Delete
if (is_icon === true) {
[5268] Fix | Delete
if (opt.icon !== undefined) {
[5269] Fix | Delete
let icon_wrap = createElement('span','tb_icon_wrapper');
[5270] Fix | Delete
icon_wrap.innerHTML = opt.icon;
[5271] Fix | Delete
label.appendChild(icon_wrap);
[5272] Fix | Delete
}
[5273] Fix | Delete
if (opt.label_class !== undefined) {
[5274] Fix | Delete
label.className += opt.label_class;
[5275] Fix | Delete
}
[5276] Fix | Delete
if (n !== undefined) {
[5277] Fix | Delete
label.appendChild(createElement('span','themify_tooltip',n));
[5278] Fix | Delete
}
[5279] Fix | Delete
[5280] Fix | Delete
} else if (n !== undefined) {
[5281] Fix | Delete
label.appendChild(createElement('span','',n));
[5282] Fix | Delete
}
[5283] Fix | Delete
wrapper.appendChild(label);
[5284] Fix | Delete
this._initControl(ch, data);
[5285] Fix | Delete
}
[5286] Fix | Delete
wrapper.tfOn(_CLICK_, function (e) {
[5287] Fix | Delete
if ('LABEL' === e.target.parentNode.tagName) {
[5288] Fix | Delete
this.blur();
[5289] Fix | Delete
}
[5290] Fix | Delete
}, {passive: true});
[5291] Fix | Delete
d.appendChild(wrapper);
[5292] Fix | Delete
if (data.after !== undefined) {
[5293] Fix | Delete
d.appendChild(self.after(data));
[5294] Fix | Delete
}
[5295] Fix | Delete
if (data.description !== undefined) {
[5296] Fix | Delete
d.appendChild(self.description(data.description));
[5297] Fix | Delete
}
[5298] Fix | Delete
if (is_icon === true && toggle === true) {
[5299] Fix | Delete
self.icon_radio.controlChange(wrapper);
[5300] Fix | Delete
}
[5301] Fix | Delete
if (js_wrap === true) {
[5302] Fix | Delete
this._radioChange.push(() => {
[5303] Fix | Delete
for (let i = 0, len = checked.length; i < len; ++i) {
[5304] Fix | Delete
self.radio.controlChange(checked[i]);
[5305] Fix | Delete
}
[5306] Fix | Delete
});
[5307] Fix | Delete
}
[5308] Fix | Delete
return d;
[5309] Fix | Delete
},
[5310] Fix | Delete
checkboxGenerate(type, data) {
[5311] Fix | Delete
const d = createDocumentFragment(),
[5312] Fix | Delete
wrapper = createElement('','tb_checkbox_wrap'),
[5313] Fix | Delete
options = this.getOptions(data),
[5314] Fix | Delete
is_icon = 'icon_checkbox' === type,
[5315] Fix | Delete
js_wrap = data.option_js === true,
[5316] Fix | Delete
self = this,
[5317] Fix | Delete
chekboxes = [],
[5318] Fix | Delete
len = options.length;
[5319] Fix | Delete
let v = this.getStyleVal(data.id),
[5320] Fix | Delete
_default = null,
[5321] Fix | Delete
is_array = null;
[5322] Fix | Delete
[5323] Fix | Delete
if (len > 1) {
[5324] Fix | Delete
if (data.new_line === false) {
[5325] Fix | Delete
wrapper.className += ' tb_one_row';
[5326] Fix | Delete
}
[5327] Fix | Delete
wrapper.className += ' tb_count_' + len;
[5328] Fix | Delete
}
[5329] Fix | Delete
if (js_wrap === true) {
[5330] Fix | Delete
wrapper.className += ' tb_option_checkbox_enable';
[5331] Fix | Delete
if (data.reverse !== undefined) {
[5332] Fix | Delete
wrapper.className += ' tb_option_checkbox_revert';
[5333] Fix | Delete
}
[5334] Fix | Delete
}
[5335] Fix | Delete
if (this.is_repeat === true) {
[5336] Fix | Delete
wrapper.className += this.is_sort === true ? ' tb_lb_sort_child' : ' tb_lb_option_child';
[5337] Fix | Delete
wrapper.dataset.inputId = data.id;
[5338] Fix | Delete
} else {
[5339] Fix | Delete
wrapper.className += ' tb_lb_option';
[5340] Fix | Delete
wrapper.id = data.id;
[5341] Fix | Delete
}
[5342] Fix | Delete
if (data.wrap_checkbox !== undefined) {
[5343] Fix | Delete
wrapper.className += ' ' + data.wrap_checkbox;
[5344] Fix | Delete
}
[5345] Fix | Delete
if (v === undefined) {
[5346] Fix | Delete
if (data.default !== undefined) {
[5347] Fix | Delete
_default = data.default;
[5348] Fix | Delete
is_array = Array.isArray(_default);
[5349] Fix | Delete
}
[5350] Fix | Delete
}
[5351] Fix | Delete
else if (v !== false) {
[5352] Fix | Delete
v = v.toString().split('|');
[5353] Fix | Delete
}
[5354] Fix | Delete
if (is_icon === true) {
[5355] Fix | Delete
wrapper.className += ' tb_icon_checkbox';
[5356] Fix | Delete
}
[5357] Fix | Delete
if (data.before !== undefined) {
[5358] Fix | Delete
d.appendChild(createTextNode(data.before));
[5359] Fix | Delete
}
[5360] Fix | Delete
for (let i = 0; i < len; ++i) {
[5361] Fix | Delete
let opt = options[i],
[5362] Fix | Delete
n = i18n[opt.value] || opt.value,
[5363] Fix | Delete
label = createElement('label'),
[5364] Fix | Delete
ch = createElement('input',{type:'checkbox',class:'tb_checkbox',value:opt.name});
[5365] Fix | Delete
ch.checked = (v !== false && v?.includes(opt.name)) || (_default === opt.name || (is_array === true && _default.includes(opt.name)));
[5366] Fix | Delete
if (data.class !== undefined) {
[5367] Fix | Delete
ch.className += ' ' + data.class;
[5368] Fix | Delete
}
[5369] Fix | Delete
if (js_wrap === true) {
[5370] Fix | Delete
ch.tfOn('change', function () {
[5371] Fix | Delete
self.checkbox.controlChange(this);
[5372] Fix | Delete
}, {passive: true});
[5373] Fix | Delete
chekboxes.push(ch);
[5374] Fix | Delete
}
[5375] Fix | Delete
if (data.id === 'hide_anchor') {
[5376] Fix | Delete
api.activeModel.options(ch, 'hide_anchor');
[5377] Fix | Delete
}
[5378] Fix | Delete
label.appendChild(ch);
[5379] Fix | Delete
if (is_icon === true) {
[5380] Fix | Delete
label.insertAdjacentHTML('beforeend', opt.icon);
[5381] Fix | Delete
if (n !== undefined) {
[5382] Fix | Delete
label.appendChild(createElement('span','themify_tooltip',n));
[5383] Fix | Delete
}
[5384] Fix | Delete
} else if (n !== undefined) {
[5385] Fix | Delete
label.appendChild(createTextNode(n));
[5386] Fix | Delete
}
[5387] Fix | Delete
if (opt.help !== undefined) {
[5388] Fix | Delete
let hasHelp = createElement('','tb_checkbox_help');
[5389] Fix | Delete
hasHelp.append(label, this.help(opt.help));
[5390] Fix | Delete
label = hasHelp;
[5391] Fix | Delete
}
[5392] Fix | Delete
wrapper.appendChild(label);
[5393] Fix | Delete
this._initControl(ch, data);
[5394] Fix | Delete
}
[5395] Fix | Delete
if (data.id === 'hide_anchor') {
[5396] Fix | Delete
wrapper.tfOn(_CLICK_, e => {
[5397] Fix | Delete
e.stopPropagation();
[5398] Fix | Delete
});
[5399] Fix | Delete
}
[5400] Fix | Delete
d.appendChild(wrapper);
[5401] Fix | Delete
if (data.after !== undefined) {
[5402] Fix | Delete
if ((data.label === undefined || data.label === '') && (data.help !== undefined && data.help !== '')) {
[5403] Fix | Delete
wrapper.className += ' contains-help';
[5404] Fix | Delete
wrapper.appendChild(this.after(data));
[5405] Fix | Delete
} else {
[5406] Fix | Delete
d.appendChild(this.after(data));
[5407] Fix | Delete
}
[5408] Fix | Delete
}
[5409] Fix | Delete
if (data.description !== undefined) {
[5410] Fix | Delete
d.appendChild(this.description(data.description));
[5411] Fix | Delete
}
[5412] Fix | Delete
if (js_wrap === true) {
[5413] Fix | Delete
this.afterRun.push(() => {
[5414] Fix | Delete
for (let i = 0, len = chekboxes.length; i < len; ++i) {
[5415] Fix | Delete
self.checkbox.controlChange(chekboxes[i]);
[5416] Fix | Delete
}
[5417] Fix | Delete
});
[5418] Fix | Delete
}
[5419] Fix | Delete
return d;
[5420] Fix | Delete
},
[5421] Fix | Delete
date: {
[5422] Fix | Delete
_loaded: null,
[5423] Fix | Delete
render(data, self) {
[5424] Fix | Delete
const f = createDocumentFragment(),
[5425] Fix | Delete
input = createElement('input',{type:'text',class:'themify-datepicker fullwidth',autocomplete:'off',readonly:''}),
[5426] Fix | Delete
clear = createElement('button',{type:'button',class:'themify-datepicker-clear tf_close'}),
[5427] Fix | Delete
get_datePicker = () => {
[5428] Fix | Delete
return topWindow.jQuery.fn.themifyDatetimepicker
[5429] Fix | Delete
? topWindow.jQuery.fn.themifyDatetimepicker
[5430] Fix | Delete
: topWindow.jQuery.fn.datetimepicker;
[5431] Fix | Delete
},
[5432] Fix | Delete
hide_picker = () => {
[5433] Fix | Delete
get_datePicker().call($(input), 'hide');
[5434] Fix | Delete
},
[5435] Fix | Delete
callback = () => {
[5436] Fix | Delete
const datePicker = get_datePicker();
[5437] Fix | Delete
[5438] Fix | Delete
if (!datePicker)
[5439] Fix | Delete
return;
[5440] Fix | Delete
[5441] Fix | Delete
const pickerData = data.picker?? {};
[5442] Fix | Delete
clear.tfOn(_CLICK_, function (e) {
[5443] Fix | Delete
e.preventDefault();
[5444] Fix | Delete
e.stopPropagation();
[5445] Fix | Delete
input.value = '';
[5446] Fix | Delete
input.dispatchEvent(new Event('change'));
[5447] Fix | Delete
this.style.display = 'none';
[5448] Fix | Delete
});
[5449] Fix | Delete
datePicker.call($(input), {
[5450] Fix | Delete
showTimepicker: !!(data.timepicker === undefined || data.timepicker),
[5451] Fix | Delete
showButtonPanel: true,
[5452] Fix | Delete
changeYear: true,
[5453] Fix | Delete
dateFormat: pickerData.dateformat || 'yy-mm-dd',
[5454] Fix | Delete
timeFormat: pickerData.timeformat || 'HH:mm:ss',
[5455] Fix | Delete
stepMinute: pickerData.stepMinute || 5,
[5456] Fix | Delete
stepSecond: pickerData.stepSecond || 5,
[5457] Fix | Delete
controlType: pickerData.timecontrol || 'select',
[5458] Fix | Delete
oneLine: true,
[5459] Fix | Delete
separator: pickerData.timeseparator || ' ',
[5460] Fix | Delete
onSelect(v) {
[5461] Fix | Delete
clear.style.display = v === '' ? 'none' : 'block';
[5462] Fix | Delete
input.dispatchEvent(new Event('change'));
[5463] Fix | Delete
},
[5464] Fix | Delete
beforeShow(input, instance) {
[5465] Fix | Delete
instance.dpDiv.addClass('themify-datepicket-panel');
[5466] Fix | Delete
const r = input.getBoundingClientRect();
[5467] Fix | Delete
setTimeout(() => {
[5468] Fix | Delete
instance.dpDiv.css({
[5469] Fix | Delete
top: r.top + input.offsetHeight,
[5470] Fix | Delete
left: r.left
[5471] Fix | Delete
});
[5472] Fix | Delete
}, 10);
[5473] Fix | Delete
if (api.isVisual) {
[5474] Fix | Delete
body.tfOn(_CLICK_, hide_picker, {once: true});
[5475] Fix | Delete
}
[5476] Fix | Delete
},
[5477] Fix | Delete
onClose() {
[5478] Fix | Delete
if (api.isVisual) {
[5479] Fix | Delete
body.tfOff(_CLICK_, hide_picker, {once: true});
[5480] Fix | Delete
}
[5481] Fix | Delete
}
[5482] Fix | Delete
});
[5483] Fix | Delete
};
[5484] Fix | Delete
if (self.is_repeat === true) {
[5485] Fix | Delete
input.className += self.is_sort === true ? ' tb_lb_sort_child' : ' tb_lb_option_child';
[5486] Fix | Delete
input.dataset.inputId = data.id;
[5487] Fix | Delete
} else {
[5488] Fix | Delete
input.className += ' tb_lb_option';
[5489] Fix | Delete
input.id = data.id;
[5490] Fix | Delete
}
[5491] Fix | Delete
if (self.values[data.id] !== undefined) {
[5492] Fix | Delete
input.value = self.values[data.id];
[5493] Fix | Delete
}
[5494] Fix | Delete
if (data.class !== undefined) {
[5495] Fix | Delete
input.className += ' ' + data.class;
[5496] Fix | Delete
}
[5497] Fix | Delete
if (!input.value) {
[5498] Fix | Delete
clear.style.display = 'none';
[5499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function