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
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/js/ui
File: toast.js
/**
[0] Fix | Delete
* @class elFinder toast
[1] Fix | Delete
*
[2] Fix | Delete
* This was created inspired by the toastr. Thanks to developers of toastr.
[3] Fix | Delete
* CodeSeven/toastr: http://johnpapa.net <https://github.com/CodeSeven/toastr>
[4] Fix | Delete
*
[5] Fix | Delete
* @author Naoki Sawada
[6] Fix | Delete
**/
[7] Fix | Delete
jQuery.fn.elfindertoast = function(opts, fm) {
[8] Fix | Delete
"use strict";
[9] Fix | Delete
var defOpts = Object.assign({
[10] Fix | Delete
mode: 'success', // or 'info', 'warning' and 'error'
[11] Fix | Delete
msg: '',
[12] Fix | Delete
showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery
[13] Fix | Delete
showDuration: 300,
[14] Fix | Delete
showEasing: 'swing', //swing and linear are built into jQuery
[15] Fix | Delete
onShown: undefined,
[16] Fix | Delete
hideMethod: 'fadeOut',
[17] Fix | Delete
hideDuration: 1500,
[18] Fix | Delete
hideEasing: 'swing',
[19] Fix | Delete
onHidden: undefined,
[20] Fix | Delete
timeOut: 3000,
[21] Fix | Delete
extNode: undefined,
[22] Fix | Delete
button: undefined,
[23] Fix | Delete
width: undefined
[24] Fix | Delete
}, jQuery.isPlainObject(fm.options.uiOptions.toast.defaults)? fm.options.uiOptions.toast.defaults : {});
[25] Fix | Delete
return this.each(function() {
[26] Fix | Delete
opts = Object.assign({}, defOpts, opts || {});
[27] Fix | Delete
[28] Fix | Delete
var self = jQuery(this),
[29] Fix | Delete
show = function(notm) {
[30] Fix | Delete
self.stop();
[31] Fix | Delete
fm.toFront(self);
[32] Fix | Delete
self[opts.showMethod]({
[33] Fix | Delete
duration: opts.showDuration,
[34] Fix | Delete
easing: opts.showEasing,
[35] Fix | Delete
complete: function() {
[36] Fix | Delete
opts.onShown && opts.onShown();
[37] Fix | Delete
if (!notm && opts.timeOut) {
[38] Fix | Delete
rmTm = setTimeout(rm, opts.timeOut);
[39] Fix | Delete
}
[40] Fix | Delete
}
[41] Fix | Delete
});
[42] Fix | Delete
},
[43] Fix | Delete
rm = function() {
[44] Fix | Delete
self[opts.hideMethod]({
[45] Fix | Delete
duration: opts.hideDuration,
[46] Fix | Delete
easing: opts.hideEasing,
[47] Fix | Delete
complete: function() {
[48] Fix | Delete
opts.onHidden && opts.onHidden();
[49] Fix | Delete
self.remove();
[50] Fix | Delete
}
[51] Fix | Delete
});
[52] Fix | Delete
},
[53] Fix | Delete
rmTm;
[54] Fix | Delete
[55] Fix | Delete
self.on('click', function(e) {
[56] Fix | Delete
e.stopPropagation();
[57] Fix | Delete
e.preventDefault();
[58] Fix | Delete
rmTm && clearTimeout(rmTm);
[59] Fix | Delete
opts.onHidden && opts.onHidden();
[60] Fix | Delete
self.stop().remove();
[61] Fix | Delete
}).on('mouseenter mouseleave', function(e) {
[62] Fix | Delete
if (opts.timeOut) {
[63] Fix | Delete
rmTm && clearTimeout(rmTm);
[64] Fix | Delete
rmTm = null;
[65] Fix | Delete
if (e.type === 'mouseenter') {
[66] Fix | Delete
show(true);
[67] Fix | Delete
} else {
[68] Fix | Delete
rmTm = setTimeout(rm, opts.timeOut);
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
}).hide().addClass('toast-' + opts.mode).append(jQuery('<div class="elfinder-toast-msg"></div>').html(opts.msg.replace(/%([a-zA-Z0-9]+)%/g, function(m, m1) {
[72] Fix | Delete
return fm.i18n(m1);
[73] Fix | Delete
})));
[74] Fix | Delete
[75] Fix | Delete
if (opts.extNode) {
[76] Fix | Delete
self.append(opts.extNode);
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
if (opts.button) {
[80] Fix | Delete
self.append(
[81] Fix | Delete
jQuery('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"></button>')
[82] Fix | Delete
.append(jQuery('<span class="ui-button-text"></span>').text(fm.i18n(opts.button.text)))
[83] Fix | Delete
.on('mouseenter mouseleave', function(e) {
[84] Fix | Delete
jQuery(this).toggleClass('ui-state-hover', e.type == 'mouseenter');
[85] Fix | Delete
})
[86] Fix | Delete
.on('click', opts.button.click || function(){})
[87] Fix | Delete
);
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
if (opts.width) {
[91] Fix | Delete
self.css('max-width', opts.width);
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
show();
[95] Fix | Delete
});
[96] Fix | Delete
};
[97] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function