2013-06-27 08:01:06 +00:00
|
|
|
$(document).ready(function() {
|
2013-07-01 08:01:00 +00:00
|
|
|
var url = new URL();
|
|
|
|
var query = url.query;
|
2013-07-02 08:01:37 +00:00
|
|
|
switch (url.path) {
|
2013-06-27 08:01:06 +00:00
|
|
|
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;
|
2013-07-16 08:00:49 +00:00
|
|
|
case "requests":
|
|
|
|
if (query['action'] == "new") {
|
|
|
|
$("#request_form").preventDoubleSubmission();
|
|
|
|
}
|
|
|
|
break;
|
2013-07-28 08:00:53 +00:00
|
|
|
case "sitehistory":
|
|
|
|
if (query['action'] == "edit") {
|
|
|
|
$("#event_form").validate();
|
|
|
|
}
|
|
|
|
break;
|
2013-08-28 23:08:41 +00:00
|
|
|
case "tools":
|
|
|
|
if (query['action'] == "calendar") {
|
|
|
|
$("#event_form").validate();
|
|
|
|
}
|
2013-09-02 08:00:37 +00:00
|
|
|
if (query['action'] == "mass_pm") {
|
|
|
|
$("#messageform").validate();
|
|
|
|
}
|
2013-08-28 23:08:41 +00:00
|
|
|
break;
|
2013-06-27 08:01:06 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|