summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/global.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/global.js b/js/global.js
index 8ff509289..a997821f4 100644
--- a/js/global.js
+++ b/js/global.js
@@ -16,6 +16,31 @@
*
*/
+$(function () {
+ $('.show_mini_login_form').on("click", function (event) {
+ return show_mini_login_form($(this).data('qs-suffix'));
+ });
+ $('.hide_mini_login_form').on("click", function (event) {
+ return hide_mini_login_form($(this).data('qs-suffix'));
+ });
+ $('.show_forgot_form').on("click", function (event) {
+ return show_forgot_form($(this).data('qs-suffix'));
+ });
+ $('.hide_forgot_form').on("click", function (event) {
+ return hide_forgot_form($(this).data('qs-suffix'));
+ });
+ $('.check_mini_login_fields').on("click", function (event) {
+ return check_mini_login_fields($(this).data('qs-suffix'));
+ });
+ $('form .quicksearch_check_empty').on("submit", function (event) {
+ if (this.quicksearch.value == '') {
+ alert('Please enter one or more search terms first.');
+ return false;
+ }
+ return true;
+ });
+});
+
function show_mini_login_form( suffix ) {
$('#login_link' + suffix).addClass('bz_default_hidden');
$('#mini_login' + suffix).removeClass('bz_default_hidden');
@@ -37,6 +62,7 @@ function show_forgot_form( suffix ) {
return false;
}
+
function hide_forgot_form( suffix ) {
$('#forgot_link' + suffix).removeClass('bz_default_hidden');
$('#forgot_form' + suffix).addClass('bz_default_hidden');