diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-01-25 21:04:07 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2017-01-25 21:04:21 +0100 |
commit | 6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5 (patch) | |
tree | 28aea39d85e63a901744c6319f6dc06884040daf /js | |
parent | ec963661fb29c191fec645a956cbddc670cfa3da (diff) | |
download | bugzilla-6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5.tar.gz bugzilla-6a727b70a9f7d3deb690dffd818d7bb5e9eb7bf5.tar.xz |
Bug 1286290 - CSP compliant bug modal
Diffstat (limited to 'js')
-rw-r--r-- | js/global.js | 26 |
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'); |