Statistics
| Branch: | Tag: | Revision:

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' : '&#x41;',
11
                        'snf-radio-checked' : '&#x42;',
12
                        'snf-radio-unchecked' : '&#x43;',
13
                        'snf-close' : '&#x44;',
14
                        'snf-www' : '&#x49;',
15
                        'snf-arrow-up' : '&#x4c;',
16
                        'snf-arrow-down' : '&#x4d;',
17
                        'snf-checkbox-unchecked' : '&#x61;',
18
                        'snf-checkbox-checked' : '&#x62;',
19
                        'snf-cancel-circled' : '&#x63;',
20
                        'snf-search' : '&#x64;',
21
                        'snf-twitter-logo' : '&#x67;',
22
                        'snf-ok' : '&#x68;',
23
                        'snf-switch' : '&#x69;',
24
                        'snf-ban-circle' : '&#x6a;',
25
                        'snf-ok-sign' : '&#x6c;',
26
                        'snf-minus-sign' : '&#x6e;',
27
                        'snf-listview' : '&#x73;',
28
                        'snf-gridview' : '&#x74;',
29
                        'snf-dashboard-outline' : '&#x7a;',
30
                        'snf-pithos-outline' : '&#x79;',
31
                        'snf-info-full' : '&#x70;',
32
                        'snf-volume-create-full' : '&#x36;',
33
                        'snf-image-full' : '&#x51;',
34
                        'snf-pc-create-full' : '&#x53;',
35
                        'snf-network-create-outline' : '&#x54;',
36
                        'snf-network-create-full' : '&#x55;',
37
                        'snf-ram-outline' : '&#x4a;',
38
                        'snf-nic-outline' : '&#x50;',
39
                        'snf-ram-full' : '&#x52;',
40
                        'snf-nic-full' : '&#x72;',
41
                        'snf-network-broken-1-full' : '&#x56;',
42
                        'snf-network-broken-2-full' : '&#x57;',
43
                        'snf-pc-broken-full' : '&#x58;',
44
                        'snf-pc-reboot-full' : '&#x59;',
45
                        'snf-pc-switch-full' : '&#x5a;',
46
                        'snf-key-full' : '&#x31;',
47
                        'snf-router-full' : '&#x32;',
48
                        'snf-chip-full' : '&#x33;',
49
                        'snf-plus-full' : '&#x34;',
50
                        'snf-snapshot-full' : '&#x4e;',
51
                        'snf-pithos-full' : '&#x35;',
52
                        'snf-volume-full' : '&#x4f;',
53
                        'snf-network-full' : '&#x4b;',
54
                        'snf-pc-full' : '&#x78;',
55
                        'snf-network-broken-1-outline' : '&#x37;',
56
                        'snf-network-broken-2-outline' : '&#x38;',
57
                        'snf-pc-broken-outline' : '&#x39;',
58
                        'snf-volume-broken-outline' : '&#x30;',
59
                        'snf-pc-reboot-outline' : '&#x21;',
60
                        'snf-pc-switch-outline' : '&#x40;',
61
                        'snf-key-outline' : '&#x23;',
62
                        'snf-router-outline' : '&#x48;',
63
                        'snf-chip-outline' : '&#x45;',
64
                        'snf-image-outline' : '&#x66;',
65
                        'snf-plus-outline' : '&#x6d;',
66
                        'snf-volume-outline' : '&#x75;',
67
                        'snf-network-outline' : '&#x76;',
68
                        'snf-pc-outline' : '&#x77;',
69
                        'snf-info-outline' : '&#x6f;',
70
                        'snf-thunder-full' : '&#x6b;',
71
                        'snf-lock-closed-full' : '&#x46;',
72
                        'snf-lock-open-full' : '&#x47;',
73
                        'snf-snapshot-outline' : '&#x65;',
74
                        'snf-folder-outline' : '&#x5e;',
75
                        'snf-edit' : '&#x71;',
76
                        'snf-trash-outline' : '&#x24;',
77
                        'snf-link-outline' : '&#x26;',
78
                        'snf-refresh-outline' : '&#x29;',
79
                        'snf-download-full' : '&#x25;',
80
                        'snf-person-outline' : '&#x2a;',
81
                        'snf-upload-full' : '&#x28;',
82
                        'snf-arrow-right-small-full' : '&#x2d;',
83
                        'snf-copy-outline' : '&#x3f;',
84
                        'snf-arrow-left-small-full' : '&#x5f;',
85
                        'snf-folder-full' : '&#x3d;
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' : '&#x61;',
116
                        'snf-folder-create-full' : '&#x41;',
117
                        'snf-shared-by-me' : '&#x63;',
118
                        'snf-shared-to-me-outline' : '&#x64;',
119
                        'snf-shared-by-me-full' : '&#x43;',
120
                        'snf-folder-move-full' : '&#x45;',
121
                        'snf-folder-move-outline' : '&#x65;',
122
                        'snf-shared-to-me-full' : '&#x44;'
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
};