mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-04 05:52:44 +08:00
4cc2207513
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
115 lines
No EOL
3.4 KiB
JavaScript
115 lines
No EOL
3.4 KiB
JavaScript
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
|
|
|
|
window.onload = function() {
|
|
function addIcon(el, entity) {
|
|
var html = el.innerHTML;
|
|
el.innerHTML = '<span style="font-family: \'icomoon\'">' + entity + '</span>' + html;
|
|
}
|
|
var icons = {
|
|
'icon-paperplane' : '',
|
|
'icon-reply' : '',
|
|
'icon-reply-all' : '',
|
|
'icon-forward' : '',
|
|
'icon-search' : '',
|
|
'icon-add-to-list' : '',
|
|
'icon-info' : '',
|
|
'icon-arrow-right' : '',
|
|
'icon-arrow-down' : '',
|
|
'icon-ellipsis' : '',
|
|
'icon-pencil' : '',
|
|
'icon-image' : '',
|
|
'icon-music' : '',
|
|
'icon-film' : '',
|
|
'icon-print' : '',
|
|
'icon-calendar' : '',
|
|
'icon-key' : '',
|
|
'icon-cog' : '',
|
|
'icon-fire' : '',
|
|
'icon-rocket' : '',
|
|
'icon-checkbox-checked' : '',
|
|
'icon-checkbox-unchecked' : '',
|
|
'icon-checkbox-partial' : '',
|
|
'icon-radio-checked' : '',
|
|
'icon-radio-unchecked' : '',
|
|
'icon-google' : '',
|
|
'icon-google-plus' : '',
|
|
'icon-facebook' : '',
|
|
'icon-twitter' : '',
|
|
'icon-youtube' : '',
|
|
'icon-file-pdf' : '',
|
|
'icon-file-word' : '',
|
|
'icon-file-excel' : '',
|
|
'icon-file-powerpoint' : '',
|
|
'icon-file-xml' : '',
|
|
'icon-file-css' : '',
|
|
'icon-warning' : '',
|
|
'icon-switch' : '',
|
|
'icon-wrench' : '',
|
|
'icon-remove' : '',
|
|
'icon-ok' : '',
|
|
'icon-plus' : '',
|
|
'icon-minus' : '',
|
|
'icon-attachment' : '',
|
|
'icon-arrow-left' : '',
|
|
'icon-arrow-up--upload' : '',
|
|
'icon-arrow-right-2' : '',
|
|
'icon-arrow-down-2' : '',
|
|
'icon-file' : '',
|
|
'icon-file-zip' : '',
|
|
'icon-console' : '',
|
|
'icon-floppy' : '',
|
|
'icon-user' : '',
|
|
'icon-envelope' : '',
|
|
'icon-user-add' : '',
|
|
'icon-eye' : '',
|
|
'icon-arrow-right-3' : '',
|
|
'icon-arrow-down-3' : '',
|
|
'icon-facebook-2' : '',
|
|
'icon-spinner' : '',
|
|
'icon-lightning' : '',
|
|
'icon-trash' : '',
|
|
'icon-download' : '',
|
|
'icon-upload' : '',
|
|
'icon-settings5' : '',
|
|
'icon-bug' : '',
|
|
'icon-libreoffice' : '',
|
|
'icon-file-openoffice' : '',
|
|
'icon-google-drive' : '',
|
|
'icon-edit2' : '',
|
|
'icon-phonebook' : '',
|
|
'icon-book' : '',
|
|
'icon-spinner-2' : '',
|
|
'icon-bell' : '',
|
|
'icon-cart' : '',
|
|
'icon-cog-2' : '',
|
|
'icon-legacyfilemanager' : '',
|
|
'icon-favorite' : '',
|
|
'icon-favorite2' : '',
|
|
'icon-loved' : '',
|
|
'icon-love' : '',
|
|
'icon-scaleup' : '',
|
|
'icon-scaledown' : '',
|
|
'icon-opennewwindow' : '',
|
|
'icon-repeat' : '',
|
|
'icon-reorder' : '',
|
|
'icon-skype' : '',
|
|
'icon-dropbox' : ''
|
|
},
|
|
els = document.getElementsByTagName('*'),
|
|
i, attr, html, c, el;
|
|
for (i = 0; ; i += 1) {
|
|
el = els[i];
|
|
if(!el) {
|
|
break;
|
|
}
|
|
attr = el.getAttribute('data-icon');
|
|
if (attr) {
|
|
addIcon(el, attr);
|
|
}
|
|
c = el.className;
|
|
c = c.match(/icon-[^\s'"]+/);
|
|
if (c && icons[c[0]]) {
|
|
addIcon(el, icons[c[0]]);
|
|
}
|
|
}
|
|
}; |