mirror of
https://github.com/coreui/coreui-icons.git
synced 2025-08-21 16:01:25 +02:00
Initial release
This commit is contained in:
70
ie7/ie7.js
Executable file
70
ie7/ie7.js
Executable file
@@ -0,0 +1,70 @@
|
||||
/* To avoid CSS expressions while still supporting IE 7 and IE 6, use this script */
|
||||
/* The script tag referencing this file must be placed before the ending body tag. */
|
||||
|
||||
/* Use conditional comments in order to target IE 7 and older:
|
||||
<!--[if lt IE 8]><!-->
|
||||
<script src="ie7/ie7.js"></script>
|
||||
<!--<![endif]-->
|
||||
*/
|
||||
|
||||
(function() {
|
||||
function addIcon(el, entity) {
|
||||
var html = el.innerHTML;
|
||||
el.innerHTML = '<span style="font-family: \'CoreUI-Icons-Linear\'">' + entity + '</span>' + html;
|
||||
}
|
||||
var icons = {
|
||||
'cui-basket-loaded': '',
|
||||
'cui-bell': '',
|
||||
'cui-calculator': '',
|
||||
'cui-calendar': '',
|
||||
'cui-camera': '',
|
||||
'cui-chart': '',
|
||||
'cui-cloud-download': '',
|
||||
'cui-cursor': '',
|
||||
'cui-cursor-move': '',
|
||||
'cui-drop': '',
|
||||
'cui-energy': '',
|
||||
'cui-envelope-letter': '',
|
||||
'cui-equalizer': '',
|
||||
'cui-globe': '',
|
||||
'cui-graph': '',
|
||||
'cui-home': '',
|
||||
'cui-layers': '',
|
||||
'cui-list': '',
|
||||
'cui-location-pin': '',
|
||||
'cui-map': '',
|
||||
'cui-note': '',
|
||||
'cui-options': '',
|
||||
'cui-pencil': '',
|
||||
'cui-people': '',
|
||||
'cui-pie-chart': '',
|
||||
'cui-puzzle': '',
|
||||
'cui-screen-desktop': '',
|
||||
'cui-screen-smartphone': '',
|
||||
'cui-settings': '',
|
||||
'cui-social-facebook': '',
|
||||
'cui-social-skype': '',
|
||||
'cui-social-twitter': '',
|
||||
'cui-speech': '',
|
||||
'cui-speedometer': '',
|
||||
'cui-star': '',
|
||||
'cui-user': '',
|
||||
'cui-user-female': '',
|
||||
'cui-user-follow': '',
|
||||
'cui-user-unfollow': '',
|
||||
'0': 0
|
||||
},
|
||||
els = document.getElementsByTagName('*'),
|
||||
i, c, el;
|
||||
for (i = 0; ; i += 1) {
|
||||
el = els[i];
|
||||
if(!el) {
|
||||
break;
|
||||
}
|
||||
c = el.className;
|
||||
c = c.match(/cui-[^\s'"]+/);
|
||||
if (c && icons[c[0]]) {
|
||||
addIcon(el, icons[c[0]]);
|
||||
}
|
||||
}
|
||||
}());
|
Reference in New Issue
Block a user