changed new leimnud.module.app.alert().make by comun alert for bug 6345

This commit is contained in:
Alvaro Campos
2011-03-14 15:47:14 +00:00
parent 9e9cae6051
commit c6d39a023d

View File

@@ -371,13 +371,13 @@ function IsUnsignedInteger(YourNumber){
break; break;
case "Alpha": case "Alpha":
if (keyCode==8) return true; if (keyCode==8) return true;
patron =/[A-Za-z\sáéíóúäëïöüñçÇÑÁÉÍÓÚÄËÏÖÜ]/; patron =/[A-Za-z\sáéíóúäëïöüñçÇÃÃ<EFBFBD>ÉÃ<EFBFBD>ÓÚÄÃÃ<EFBFBD>ÃÜ]/;
te = String.fromCharCode(keyCode); te = String.fromCharCode(keyCode);
return patron.test(te); return patron.test(te);
break; break;
case "AlphaNum": case "AlphaNum":
if (keyCode==8) return true; if (keyCode==8) return true;
patron =/[A-Za-z0-9\sáéíóúäëïöüñçÇÑÁÉÍÓÚÄËÏÖÜ]/; patron =/[A-Za-z0-9\sáéíóúäëïöüñçÇÃÃ<EFBFBD>ÉÃ<EFBFBD>ÓÚÄÃÃ<EFBFBD>ÃÜ]/;
te = String.fromCharCode(keyCode); te = String.fromCharCode(keyCode);
return patron.test(te); return patron.test(te);
break; break;
@@ -805,7 +805,7 @@ function isNumberMask (mask){
if(this.validate=="Email") if(this.validate=="Email")
{ {
var pat=/^[\w\_\-\.çñ]{2,255}@[\w\_\-]{2,255}\.[a-z]{1,3}\.?[a-z]{0,3}$/; var pat=/^[\w\_\-\.çñ]{2,255}@[\w\_\-]{2,255}\.[a-z]{1,3}\.?[a-z]{0,3}$/;
if(!pat.test(this.element.value)) if(!pat.test(this.element.value))
{ {
this.element.className=this.element.className.split(" ")[0]+" FormFieldInvalid"; this.element.className=this.element.className.split(" ")[0]+" FormFieldInvalid";
@@ -838,7 +838,7 @@ function isNumberMask (mask){
/* leimnud.event.add(this.element,'blur',function() { /* leimnud.event.add(this.element,'blur',function() {
if (this.validate == 'Email') { if (this.validate == 'Email') {
//if (!this.element.value.match("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)\$")) { //if (!this.element.value.match("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)\$")) {
var pat=/^[\w\_\.çñ]{2,255}@[\w]{2,255}\.[a-z]{1,3}\.?[a-z]{0,3}$/; var pat=/^[\w\_\.çñ]{2,255}@[\w]{2,255}\.[a-z]{1,3}\.?[a-z]{0,3}$/;
if(!pat.test(this.element.value)){ if(!pat.test(this.element.value)){
// if (!this.element.value.match("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2-3})\$")) { // if (!this.element.value.match("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2-3})\$")) {
new leimnud.module.app.alert().make({ new leimnud.module.app.alert().make({
@@ -1809,11 +1809,13 @@ var validateForm = function(sRequiredFields) {
sMessage += invalid_fields[j]; sMessage += invalid_fields[j];
} }
new leimnud.module.app.alert().make({ /* new leimnud.module.app.alert().make({
label:G_STRINGS.ID_REQUIRED_FIELDS + ": <br/><br/>[ " + sMessage + " ]", label:G_STRINGS.ID_REQUIRED_FIELDS + ": <br/><br/>[ " + sMessage + " ]",
width:450, width:450,
height:140 + (parseInt(invalid_fields.length/10)*10) height:140 + (parseInt(invalid_fields.length/10)*10)
}); });*/
alert(G_STRINGS.ID_REQUIRED_FIELDS + ": \n \n [ " + sMessage + " ]");
return false; return false;
} }
else { else {