summaryrefslogtreecommitdiffstats
path: root/static/functions/form_validate.js
diff options
context:
space:
mode:
authorGit <git@what.cd>2013-06-27 08:01:06 +0000
committerGit <git@what.cd>2013-06-27 08:01:06 +0000
commitdefe05e12ab6116072f7502587380aba8b9fcda2 (patch)
tree31893bea7a7c5b20f5c85eb5bbc77cd9c6766e04 /static/functions/form_validate.js
parentf8540013d623507d45cd82cdd4e718352f599490 (diff)
downloadGazelle-defe05e12ab6116072f7502587380aba8b9fcda2.zip
Gazelle-defe05e12ab6116072f7502587380aba8b9fcda2.tar.gz
Gazelle-defe05e12ab6116072f7502587380aba8b9fcda2.tar.bz2
Empty commit
Diffstat (limited to 'static/functions/form_validate.js')
-rw-r--r--static/functions/form_validate.js70
1 files changed, 34 insertions, 36 deletions
diff --git a/static/functions/form_validate.js b/static/functions/form_validate.js
index cdf4b15..9f7aad6 100644
--- a/static/functions/form_validate.js
+++ b/static/functions/form_validate.js
@@ -1,37 +1,35 @@
-(function ($) {
- $(document).ready(function() {
- var parts = window.location.pathname.split('/');
- var page = parts[parts.length - 1].split(".")[0];
- var splitted = window.location.search.substr(1).split("&");
- var query = {};
- for (var i = 0; i < splitted.length; i++) {
- var q = splitted[i].split("=");
- query[q[0]] = q[1];
- };
+$(document).ready(function() {
+ var parts = window.location.pathname.split('/');
+ var page = parts[parts.length - 1].split(".")[0];
+ var splitted = window.location.search.substr(1).split("&");
+ var query = {};
+ for (var i = 0; i < splitted.length; i++) {
+ var q = splitted[i].split("=");
+ query[q[0]] = q[1];
+ };
- switch(page) {
- case "forums":
- if(query['action'] == "new") {
- $("#newthreadform").validate();
- }
- break;
- case "reports":
- if(query['action'] == "report") {
- $("#report_form").validate();
- }
- break;
- case "inbox":
- if(query['action'] == "viewconv" || query['action'] == "compose") {
- $("#messageform").validate();
- }
- break;
- case "user":
- if(query['action'] == "notify") {
- $("#filter_form").validate();
- }
- break;
- default:
- break;
- }
- });
-} (jQuery));
+ switch (page) {
+ case "forums":
+ if (query['action'] == "new") {
+ $("#newthreadform").validate();
+ }
+ break;
+ case "reports":
+ if (query['action'] == "report") {
+ $("#report_form").validate();
+ }
+ break;
+ case "inbox":
+ if (query['action'] == "viewconv" || query['action'] == "compose") {
+ $("#messageform").validate();
+ }
+ break;
+ case "user":
+ if (query['action'] == "notify") {
+ $("#filter_form").validate();
+ }
+ break;
+ default:
+ break;
+ }
+});