mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Fix arguments -> ...args
This commit is contained in:
parent
d22456f4de
commit
253a19987f
2 changed files with 18 additions and 17 deletions
|
|
@ -528,10 +528,10 @@ export function createCommand(context, fExecute, fCanExecute = true)
|
||||||
|
|
||||||
let
|
let
|
||||||
fResult = null,
|
fResult = null,
|
||||||
fNonEmpty = () => {
|
fNonEmpty = (...args) => {
|
||||||
if (fResult && fResult.canExecute && fResult.canExecute())
|
if (fResult && fResult.canExecute && fResult.canExecute())
|
||||||
{
|
{
|
||||||
fExecute.apply(context, Array.prototype.slice.call(arguments));
|
fExecute.apply(context, args);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -786,15 +786,15 @@ export function htmlToPlain(html)
|
||||||
|
|
||||||
convertBlockquote = (blockquoteText) => {
|
convertBlockquote = (blockquoteText) => {
|
||||||
blockquoteText = '> ' + trim(blockquoteText).replace(/\n/gm, '\n> ');
|
blockquoteText = '> ' + trim(blockquoteText).replace(/\n/gm, '\n> ');
|
||||||
return blockquoteText.replace(/(^|\n)([> ]+)/gm, function () {
|
return blockquoteText.replace(/(^|\n)([> ]+)/gm, (...args) => {
|
||||||
return (arguments && 2 < arguments.length) ? arguments[1] + $.trim(arguments[2].replace(/[\s]/g, '')) + ' ' : '';
|
return (args && 2 < args.length) ? args[1] + trim(args[2].replace(/[\s]/g, '')) + ' ' : '';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
convertDivs = () => {
|
convertDivs = (...args) => {
|
||||||
if (arguments && 1 < arguments.length)
|
if (args && 1 < args.length)
|
||||||
{
|
{
|
||||||
let divText = trim(arguments[1]);
|
let divText = trim(args[1]);
|
||||||
if (0 < divText.length)
|
if (0 < divText.length)
|
||||||
{
|
{
|
||||||
divText = divText.replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gmi, convertDivs);
|
divText = divText.replace(/<div[^>]*>([\s\S\r\n]*)<\/div>/gmi, convertDivs);
|
||||||
|
|
@ -807,20 +807,20 @@ export function htmlToPlain(html)
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|
||||||
convertPre = () => {
|
convertPre = (...args) => {
|
||||||
return (arguments && 1 < arguments.length) ?
|
return (args && 1 < args.length) ?
|
||||||
arguments[1].toString()
|
args[1].toString()
|
||||||
.replace(/[\n]/gm, '<br />')
|
.replace(/[\n]/gm, '<br />')
|
||||||
.replace(/[\r]/gm, '')
|
.replace(/[\r]/gm, '')
|
||||||
: '';
|
: '';
|
||||||
},
|
},
|
||||||
|
|
||||||
fixAttibuteValue = () => {
|
fixAttibuteValue = (...args) => {
|
||||||
return (arguments && 1 < arguments.length) ? '' + arguments[1] + _.escape(arguments[2]) : '';
|
return (args && 1 < args.length) ? '' + args[1] + _.escape(args[2]) : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
convertLinks = () => {
|
convertLinks = (...args) => {
|
||||||
return (arguments && 1 < arguments.length) ? trim(arguments[1]) : '';
|
return (args && 1 < args.length) ? trim(args[1]) : '';
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -1431,7 +1431,7 @@ export function delegateRunOnDestroy(objectOrObjects)
|
||||||
{
|
{
|
||||||
if (isArray(objectOrObjects))
|
if (isArray(objectOrObjects))
|
||||||
{
|
{
|
||||||
_.each(objectOrObjects, function (item) {
|
_.each(objectOrObjects, (item) => {
|
||||||
delegateRunOnDestroy(item);
|
delegateRunOnDestroy(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1611,7 +1611,7 @@ export const windowResize = _.debounce((timeout) => {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
window.setTimeout(function () {
|
window.setTimeout(() => {
|
||||||
$win.resize();
|
$win.resize();
|
||||||
}, timeout);
|
}, timeout);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
dev/External/ko.js
vendored
3
dev/External/ko.js
vendored
|
|
@ -996,7 +996,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
jqElement.addClass('command');
|
jqElement.addClass('command');
|
||||||
ko.bindingHandlers[jqElement.is('form') ? 'submit' : 'click'].init.apply(oViewModel, arguments);
|
ko.bindingHandlers[jqElement.is('form') ? 'submit' : 'click']
|
||||||
|
.init.apply(oViewModel, Array.prototype.slice.call(arguments));
|
||||||
},
|
},
|
||||||
|
|
||||||
'update': function (oElement, fValueAccessor) {
|
'update': function (oElement, fValueAccessor) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue