mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-15 03:46:25 +00:00
39 lines
798 B
JavaScript
39 lines
798 B
JavaScript
$(document).ready(function() {
|
|
var url = new URL();
|
|
var query = url.query;
|
|
switch (url.path) {
|
|
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;
|
|
case "requests":
|
|
if (query['action'] == "new") {
|
|
$("#request_form").preventDoubleSubmission();
|
|
}
|
|
break;
|
|
case "sitehistory":
|
|
if (query['action'] == "edit") {
|
|
$("#event_form").validate();
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
});
|