diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-02-15 00:37:57 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-02-15 00:37:57 +0100 |
commit | 10dcf8de5c6965832452c538451d6170b3bafb66 (patch) | |
tree | 26a485d017ce2d3ea2032293687827f6c6d3a3e8 /data | |
parent | 04657077ba12e8f23feaa0c3787b590c44446056 (diff) | |
download | bugzilla-triage-10dcf8de5c6965832452c538451d6170b3bafb66.tar.gz |
Bit of reorganization
Also add an event handler on changes in assigned_to input box
Diffstat (limited to 'data')
-rw-r--r-- | data/bzpage.js | 26 | ||||
-rw-r--r-- | data/rhbzpage.js | 6 | ||||
-rw-r--r-- | data/util.js | 26 |
3 files changed, 32 insertions, 26 deletions
diff --git a/data/bzpage.js b/data/bzpage.js index f99bc21..c71ab51 100644 --- a/data/bzpage.js +++ b/data/bzpage.js @@ -20,32 +20,6 @@ var config = {}; var constantData = {}; // This should be probably eliminated ASAP or // or done by other means. TODO var submitHandlerInstalled = false; // for setUpLogging -// ============================================ -/** - * object to pack messaging. Use as in - postMessage(new Message("GetPassword", { - login: login, - hostname: location.hostname - })); - */ -function Message(cmd, data) { - this.cmd = cmd; - this.data = data; -} - -function log(msg) { - postMessage(new Message("LogMessage", msg)); -} - -var NotLoggedinException = function NotLoggedinException (message) { - this.message = message; - this.name = "NotLoggedinException"; -}; - -NotLoggedinException.prototype.toString = function () { - return this.name + ': "' + this.message + '"'; -}; - /** * central handler processing messages from the main script. */ diff --git a/data/rhbzpage.js b/data/rhbzpage.js index fa511c7..f0347d7 100644 --- a/data/rhbzpage.js +++ b/data/rhbzpage.js @@ -986,4 +986,10 @@ function RHBZinit() { changeAssignee("default"); }, false); } + + // Uncheck "set default assignee" when the assignee is changed by other means + document.getElementById("assigned_to").addEventListener("change", + function() { + document.getElementById("set_default_assignee").checked = false; + }, false); } diff --git a/data/util.js b/data/util.js index 09360a0..6c5e7b0 100644 --- a/data/util.js +++ b/data/util.js @@ -251,3 +251,29 @@ function removeDuplicates (arr) { } return arr; } + +// ============================================ +/** + * object to pack messaging. Use as in + postMessage(new Message("GetPassword", { + login: login, + hostname: location.hostname + })); + */ +function Message(cmd, data) { + this.cmd = cmd; + this.data = data; +} + +function log(msg) { + postMessage(new Message("LogMessage", msg)); +} + +var NotLoggedinException = function NotLoggedinException (message) { + this.message = message; + this.name = "NotLoggedinException"; +}; + +NotLoggedinException.prototype.toString = function () { + return this.name + ': "' + this.message + '"'; +}; |