summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorKohei Yoshino <kohei.yoshino@gmail.com>2018-08-06 18:21:39 +0200
committerDylan William Hardison <dylan@hardison.net>2018-08-06 18:21:39 +0200
commitb02141a8f95f7982e49cfe34a09d90cf75d463f4 (patch)
treee0c57782834344e55f1c2c48ea582aa2440affe3 /js
parent5da9fee9963bd0e9b7323337952f304bcfa26128 (diff)
downloadbugzilla-b02141a8f95f7982e49cfe34a09d90cf75d463f4.tar.gz
bugzilla-b02141a8f95f7982e49cfe34a09d90cf75d463f4.tar.xz
Bug 1446855 - enter_bug.cgi: Searching for duplicate bugs should trigger on changes to the Summary, not on all keystrokes
Diffstat (limited to 'js')
-rw-r--r--js/bug.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/js/bug.js b/js/bug.js
index 308317c3e..9482d1bf7 100644
--- a/js/bug.js
+++ b/js/bug.js
@@ -17,7 +17,7 @@
* Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
*/
-/* This library assumes that the needed YUI libraries have been loaded
+/* This library assumes that the needed YUI libraries have been loaded
already. */
YAHOO.bugzilla.dupTable = {
@@ -47,7 +47,7 @@ YAHOO.bugzilla.dupTable = {
success: dataTable.onDataReturnInitializeTable,
failure: dataTable.onDataReturnInitializeTable,
scope: dataTable,
- argument: dataTable.getState()
+ argument: dataTable.getState()
};
dataTable.showTableMessage(dataTable.get("MSG_LOADING"),
YAHOO.widget.DataTable.CLASS_LOADING);
@@ -63,6 +63,10 @@ YAHOO.bugzilla.dupTable = {
// if the table shows at the exact same time as the button is clicked,
// the click on the button won't register.)
doUpdateTable: function(e, args) {
+ if (e.isComposing) {
+ return;
+ }
+
var dt = args[0];
var product_name = args[1];
var summary = YAHOO.util.Event.getTarget(e);
@@ -72,14 +76,14 @@ YAHOO.bugzilla.dupTable = {
600);
},
formatBugLink: function(el, oRecord, oColumn, oData) {
- el.innerHTML = '<a href="show_bug.cgi?id=' + oData + '">'
+ el.innerHTML = '<a href="show_bug.cgi?id=' + oData + '">'
+ oData + '</a>';
},
formatStatus: function(el, oRecord, oColumn, oData) {
var resolution = oRecord.getData('resolution');
var bug_status = display_value('bug_status', oData);
if (resolution) {
- el.innerHTML = bug_status + ' '
+ el.innerHTML = bug_status + ' '
+ display_value('resolution', resolution);
}
else {
@@ -87,7 +91,7 @@ YAHOO.bugzilla.dupTable = {
}
},
formatCcButton: function(el, oRecord, oColumn, oData) {
- var url = 'process_bug.cgi?id=' + oRecord.getData('id')
+ var url = 'process_bug.cgi?id=' + oRecord.getData('id')
+ '&addselfcc=1&token=' + escape(oData);
var button = document.createElement('a');
button.setAttribute('href', url);
@@ -107,7 +111,7 @@ YAHOO.bugzilla.dupTable = {
};
// DataSource can't understand a JSON-RPC error response, so
// we have to modify the result data if we get one.
- new_ds.doBeforeParseData =
+ new_ds.doBeforeParseData =
function(oRequest, oFullResponse, oCallback) {
if (oFullResponse.error) {
oFullResponse.result = {};
@@ -124,9 +128,9 @@ YAHOO.bugzilla.dupTable = {
init: function(data) {
if (this.dataSource == null) this.init_ds();
data.options.initialLoad = false;
- var dt = new YAHOO.widget.DataTable(data.container, data.columns,
- this.dataSource, data.options);
- YAHOO.util.Event.on(data.summary_field, 'keyup', this.doUpdateTable,
+ var dt = new YAHOO.widget.DataTable(data.container, data.columns,
+ this.dataSource, data.options);
+ YAHOO.util.Event.on(data.summary_field, 'input', this.doUpdateTable,
[dt, data.product_name]);
}
};