[Movecommons-commits] r502 - trunk/src
Mario Gallegos
mgallegos at ourproject.org
Wed Jun 6 01:45:52 CEST 2012
Author: mgallegos
Date: 2012-06-06 01:45:51 +0200 (Wed, 06 Jun 2012)
New Revision: 502
Modified:
trunk/src/mc-dia-form2.js
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-06-05 23:33:16 UTC (rev 501)
+++ trunk/src/mc-dia-form2.js 2012-06-05 23:45:51 UTC (rev 502)
@@ -547,9 +547,6 @@
$j('input#location').inputfocus({ value: field_values['location'] });
//$('input#email').inputfocus({ value: field_values['email'] });
-
-
-
//reset progress bar
$j('#progress').css('width','0');
$j('#progress_text').html('0% Complete');
@@ -564,14 +561,14 @@
var fields = $j('#first_step input[type=text], #first_step input[type=password]');
var error = 0;
fields.each(function(){
- var value = $j(this).val();
- if( $j.trim(value)=="" || value==field_values[$j(this).attr('id')] ) {
+ var value = $j.trim($j(this).val());
+ if( value=="" || value==field_values[$j(this).attr('id')] ) {
$j(this).addClass('error');
$j(this).effect("shake", { times:3 }, 50);
error++;
} else {
if($j(this).attr('id')=='url'){
- if(validateURL(value)){
+ if(value.match("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)")){
$j(this).addClass('error');
$j(this).effect("shake", { times:3 }, 50);
error++;
@@ -589,14 +586,7 @@
//slide steps
$j('#first_step').slideUp();
- $j('#second_step').slideDown();
-
- /*if($j('#non-profit-website').val()=='') $j('#non-profit-website').val($j('#url').val());
- $j('#').val($j('#url').val());
- $j('#').val($j('#url').val());
- $j('#').val($j('#url').val());
- $j('#').val($j('#url').val());
- $j('#').val($j('#url').val());*/
+ $j('#second_step').slideDown();
} else return false;
});
@@ -772,10 +762,5 @@
$j(this).trigger('keydown');
}
});
-
- function validateURL(textval) {
- var urlregex = new RegExp("^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([0-9A-Za-z]+\.)");
- return urlregex.test(textval);
- }
-
+
});
\ No newline at end of file
More information about the Movecommons-commits
mailing list