diff options
author | Matěj Cepl <mcepl@redhat.com> | 2009-12-15 01:28:14 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2009-12-15 01:28:14 +0100 |
commit | a771bd72e988e5b29699cdb04c0518f7f5669c29 (patch) | |
tree | b22cf3921cd326431c42ccb54805c99f94d7f8fb | |
parent | c0e126a54c2d9ce60652bde7768a74bb5cd79a15 (diff) | |
download | bugzilla-triage-a771bd72e988e5b29699cdb04c0518f7f5669c29.tar.gz |
Lost in the "this" object nightmare again. Now it seems to be working
again.
-rw-r--r-- | bugzillaBugTriage.js | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index 7caadd9..68da4d2 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -392,7 +392,7 @@ Color.prototype.lightColor = function() { * @return Boolean */ bzPage.prototype.hasKeyword = function (str) { - var kwd = $('#keywords', this.doc).val().trim(); + var kwd = this.dok.getElementById('keywords').value.trim(); return (new RegExp(str).test(kwd)); }; @@ -405,11 +405,11 @@ bzPage.prototype.hasKeyword = function (str) { bzPage.prototype.setKeyword = function (str) { // Could be probably rewrote to use this.addTextToTextBox, but // it would be too complicated with a little gain. - var keywordInput = $('#keywords', this.doc); - var kwd = keywordInput.val().trim(); + var keywordInput = this.dok.getElementById('keywords'); + var kwd = keywordInput.value.trim(); var strRE = new RegExp(str); if (!strRE.test(kwd)) { - keywordInput.val(kwd ? kwd + ", " + str : str); + keywordInput.value = kwd ? kwd + ", " + str : str; } }; @@ -763,8 +763,8 @@ bzPage.prototype.queryInNewTab = function(text,component,product) { url += "&field1-0-0=longdesc&type1-0-0=substring&value1-0-0="+text+ "&field1-0-1=attach_data.thedata&type1-0-1=substring&value1-0-1="+text+ "&field1-0-2=status_whiteboard&type1-0-2=substring&value1-0-2="+text; + jetpack.tabs.open(url); } - jetpack.tabs.open(url); }; /** @@ -773,7 +773,6 @@ bzPage.prototype.queryInNewTab = function(text,component,product) { */ bzPage.prototype.queryForSelection = function() { var text = jetpack.selection.text; - console.log("selection = " + text); if (!text) { text = jetpack.clipboard.get(); } @@ -1436,11 +1435,7 @@ function bzPage(doc) { if (signatureFedoraString.length > 0) { // (or a form named "changeform") $("form:nth-child(2)", this.doc).submit(function () { - var cmntText = $("#comment", this.doc); - if ((signatureFedoraString.length > 0) && - (cmntText.text().trim().length > 0)) { - cmntText.text(cmntText.text().trim() + signatureFedoraString); - } + this.addTextToTextBox("comment", signatureFedoraString); }); } |