Revision f0983986 snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/lte-ie7.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/lte-ie7.js
1
/* snf-font */
1 2
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
2 3

  
3 4
window.onload = function() {
......
101 102
		}
102 103
	}
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
};

Also available in: Unified diff