root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / lte-ie7.js @ f0983986
History | View | Annotate | Download (4.1 kB)
1 |
/* snf-font */
|
---|---|
2 |
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
|
3 |
|
4 |
window.onload = function() { |
5 |
function addIcon(el, entity) { |
6 |
var html = el.innerHTML;
|
7 |
el.innerHTML = '<span style="font-family: \'snf-font\'">' + entity + '</span>' + html; |
8 |
} |
9 |
var icons = {
|
10 |
'snf-eye' : 'A', |
11 |
'snf-radio-checked' : 'B', |
12 |
'snf-radio-unchecked' : 'C', |
13 |
'snf-close' : 'D', |
14 |
'snf-www' : 'I', |
15 |
'snf-arrow-up' : 'L', |
16 |
'snf-arrow-down' : 'M', |
17 |
'snf-checkbox-unchecked' : 'a', |
18 |
'snf-checkbox-checked' : 'b', |
19 |
'snf-cancel-circled' : 'c', |
20 |
'snf-search' : 'd', |
21 |
'snf-twitter-logo' : 'g', |
22 |
'snf-ok' : 'h', |
23 |
'snf-switch' : 'i', |
24 |
'snf-ban-circle' : 'j', |
25 |
'snf-ok-sign' : 'l', |
26 |
'snf-minus-sign' : 'n', |
27 |
'snf-listview' : 's', |
28 |
'snf-gridview' : 't', |
29 |
'snf-dashboard-outline' : 'z', |
30 |
'snf-pithos-outline' : 'y', |
31 |
'snf-info-full' : 'p', |
32 |
'snf-volume-create-full' : '6', |
33 |
'snf-image-full' : 'Q', |
34 |
'snf-pc-create-full' : 'S', |
35 |
'snf-network-create-outline' : 'T', |
36 |
'snf-network-create-full' : 'U', |
37 |
'snf-ram-outline' : 'J', |
38 |
'snf-nic-outline' : 'P', |
39 |
'snf-ram-full' : 'R', |
40 |
'snf-nic-full' : 'r', |
41 |
'snf-network-broken-1-full' : 'V', |
42 |
'snf-network-broken-2-full' : 'W', |
43 |
'snf-pc-broken-full' : 'X', |
44 |
'snf-pc-reboot-full' : 'Y', |
45 |
'snf-pc-switch-full' : 'Z', |
46 |
'snf-key-full' : '1', |
47 |
'snf-router-full' : '2', |
48 |
'snf-chip-full' : '3', |
49 |
'snf-plus-full' : '4', |
50 |
'snf-snapshot-full' : 'N', |
51 |
'snf-pithos-full' : '5', |
52 |
'snf-volume-full' : 'O', |
53 |
'snf-network-full' : 'K', |
54 |
'snf-pc-full' : 'x', |
55 |
'snf-network-broken-1-outline' : '7', |
56 |
'snf-network-broken-2-outline' : '8', |
57 |
'snf-pc-broken-outline' : '9', |
58 |
'snf-volume-broken-outline' : '0', |
59 |
'snf-pc-reboot-outline' : '!', |
60 |
'snf-pc-switch-outline' : '@', |
61 |
'snf-key-outline' : '#', |
62 |
'snf-router-outline' : 'H', |
63 |
'snf-chip-outline' : 'E', |
64 |
'snf-image-outline' : 'f', |
65 |
'snf-plus-outline' : 'm', |
66 |
'snf-volume-outline' : 'u', |
67 |
'snf-network-outline' : 'v', |
68 |
'snf-pc-outline' : 'w', |
69 |
'snf-info-outline' : 'o', |
70 |
'snf-thunder-full' : 'k', |
71 |
'snf-lock-closed-full' : 'F', |
72 |
'snf-lock-open-full' : 'G', |
73 |
'snf-snapshot-outline' : 'e', |
74 |
'snf-folder-outline' : '^', |
75 |
'snf-edit' : 'q', |
76 |
'snf-trash-outline' : '$', |
77 |
'snf-link-outline' : '&', |
78 |
'snf-refresh-outline' : ')', |
79 |
'snf-download-full' : '%', |
80 |
'snf-person-outline' : '*', |
81 |
'snf-upload-full' : '(', |
82 |
'snf-arrow-right-small-full' : '-', |
83 |
'snf-copy-outline' : '?', |
84 |
'snf-arrow-left-small-full' : '_', |
85 |
'snf-folder-full' : '= |
86 |
},
|
87 |
els = document.getElementsByTagName('*'), |
88 |
i, attr, c, el;
|
89 |
for (i = 0; ; i += 1) {
|
90 |
el = els[i];
|
91 |
if(!el) {
|
92 |
break;
|
93 |
}
|
94 |
attr = el.getAttribute('data-icon'); |
95 |
if (attr) {
|
96 |
addIcon(el, attr);
|
97 |
}
|
98 |
c = el.className;
|
99 |
c = c.match(/snf-[^\s'"]+/); |
100 |
if (c && icons[c[0]]) {
|
101 |
addIcon(el, icons[c[0]]);
|
102 |
}
|
103 |
}
|
104 |
};
|
105 |
|
106 |
/* snf-font-auxiliary */
|
107 |
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
|
108 |
|
109 |
window.onload = function() {
|
110 |
function addIcon(el, entity) {
|
111 |
var html = el.innerHTML;
|
112 |
el.innerHTML = '<span style="font-family: \'snf-font-auxiliary\'">' + entity + '</span>' + html; |
113 |
} |
114 |
var icons = {
|
115 |
'snf-folder-create-outline' : 'a', |
116 |
'snf-folder-create-full' : 'A', |
117 |
'snf-shared-by-me' : 'c', |
118 |
'snf-shared-to-me-outline' : 'd', |
119 |
'snf-shared-by-me-full' : 'C', |
120 |
'snf-folder-move-full' : 'E', |
121 |
'snf-folder-move-outline' : 'e', |
122 |
'snf-shared-to-me-full' : 'D' |
123 |
}, |
124 |
els = document.getElementsByTagName('*'),
|
125 |
i, attr, c, el; |
126 |
for (i = 0; ; i += 1) { |
127 |
el = els[i]; |
128 |
if(!el) {
|
129 |
break;
|
130 |
} |
131 |
attr = el.getAttribute('data-icon');
|
132 |
if (attr) {
|
133 |
addIcon(el, attr); |
134 |
} |
135 |
c = el.className; |
136 |
c = c.match(/snf-[^\s'"]+/);
|
137 |
if (c && icons[c[0]]) { |
138 |
addIcon(el, icons[c[0]]);
|
139 |
} |
140 |
} |
141 |
}; |