(js) Improve autocomplete of attendees editor

This commit is contained in:
Francis Lachapelle
2015-06-12 12:05:07 -04:00
parent a95ed0f8e6
commit 290264262c
4 changed files with 49 additions and 7 deletions
+5
View File
@@ -149,6 +149,11 @@ Date.prototype.daysUpTo = function(otherDate) {
return days;
};
String.prototype.isValidEmail = function() {
var emailRE = /^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i;
return emailRE.test(this);
};
String.prototype.asCSSIdentifier = function() {
var characters = [ '_' , '\\.', '#' , '@' , '\\*', ':' , ',' , ' '
, "'", '&', '\\+' ];