Initial AngularJS version of Webmail (desktop)

This commit is contained in:
Francis Lachapelle
2014-11-25 16:09:55 -05:00
parent 1c9da902d3
commit 2f17e94fef
14 changed files with 995 additions and 169 deletions
+19
View File
@@ -71,6 +71,25 @@ String.prototype.base64decode = function() {
return output;
};
String.prototype.asCSSIdentifier = function() {
var characters = [ '_' , '\\.', '#' , '@' , '\\*', ':' , ',' , ' '
, "'", '&', '\\+' ];
var escapeds = [ '_U_', '_D_', '_H_', '_A_', '_S_', '_C_', '_CO_',
'_SP_', '_SQ_', '_AM_', '_P_' ];
var newString = this;
for (var i = 0; i < characters.length; i++) {
var re = new RegExp(characters[i], 'g');
newString = newString.replace(re, escapeds[i]);
}
if (/^\d+/.test(newString)) {
newString = '_' + newString;
}
return newString;
};
function l() {
var key = arguments[0];
var value = key;