Skip to content
Browse files

Re-adding the email validation

  • Loading branch information...
1 parent da37ec7 commit 243877900dfa298c99a8d5e21e64946615753dc4 @fd fd committed Apr 30, 2010
Showing with 16 additions and 15 deletions.
  1. +16 −15 public/javascripts/application.js
View
31 public/javascripts/application.js
@@ -17,9 +17,8 @@ var switchContent = (function(sender){
});
var validateEmail = (function(address){
- // var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
- // !(reg.test(address) == false);
- return true;
+ var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
+ return reg.test(address);
});
/*
@@ -125,16 +124,18 @@ $(document).ready(function() {
$('.clear-field').clearField();
- /*
- * Table sorter
- */
- // $("table.sortable").tablesorter({textExtraction: 'complex'});
- // $("table.sortable th").filter(function(idx){
- // if ($(this).hasClass('sortable')) {
- // return false;
- // } else {
- // return $(this);
- // }
- // }).unbind('click');
-
+ try {
+ /*
+ * Table sorter
+ */
+ $("table.sortable").tablesorter({textExtraction: 'complex'});
+ $("table.sortable th").filter(function(idx){
+ if ($(this).hasClass('sortable')) {
+ return false;
+ } else {
+ return $(this);
+ }
+ }).unbind('click');
+ } catch (e) { /* ignore */ };
+
}); // End DOM ready

0 comments on commit 2438779

Please sign in to comment.
Something went wrong with that request. Please try again.