mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
Use jQuery.slim
Underscore.js _.uniq(_.compact( to native Array.filter((value, index, self) => !!value && self.indexOf(value) == index) Underscore.js _.compact to native Array.filter(value => !!value) Underscore.js _.uniq to native Array.filter((value, index, self) => self.indexOf(value) == index) Underscore.js _.values to native Object.values Underscore.js _.flatten to native Array.flat Underscore.js _.union to native Array.concat + unique filter Underscore.js _.reduce to native Array.reduce Underscore.js _.escape replaced with advanced htmlspecialchars() Underscore.js _.memoize replaced Now Underscore.js is a slim custom version (only _.debounce, _.defer & _.throttle)
This commit is contained in:
parent
996a71ad8a
commit
dca0ff02ed
27 changed files with 515 additions and 353 deletions
|
|
@ -18,7 +18,49 @@ export const FileType = {
|
|||
'Presentation': 'presentation',
|
||||
'Certificate': 'certificate',
|
||||
'CertificateBin': 'certificate-bin',
|
||||
'Archive': 'archive'
|
||||
'Archive': 'archive',
|
||||
|
||||
getIconClass: function(type) {
|
||||
let result = ['icon-file', ''];
|
||||
switch (type) {
|
||||
case this.Text:
|
||||
case this.Eml:
|
||||
case this.WordText:
|
||||
result[0] += '-text';
|
||||
break;
|
||||
case this.Html:
|
||||
case this.Code:
|
||||
result[0] += '-code';
|
||||
break;
|
||||
case this.Image:
|
||||
result[0] += '-image';
|
||||
break;
|
||||
case this.Audio:
|
||||
result[0] += '-music';
|
||||
break;
|
||||
case this.Video:
|
||||
result[0] += '-movie';
|
||||
break;
|
||||
case this.Archive:
|
||||
result[0] += '-zip';
|
||||
break;
|
||||
case this.Certificate:
|
||||
case this.CertificateBin:
|
||||
result[0] += '-certificate';
|
||||
break;
|
||||
case this.Sheet:
|
||||
result[0] += '-excel';
|
||||
break;
|
||||
case this.Presentation:
|
||||
result[0] += '-chart-graph';
|
||||
break;
|
||||
case this.Pdf:
|
||||
result['icon-none', 'pdf'];
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue