зеркало из https://github.com/mozilla/pjs.git
Make tags not reload the combobox each time a tag is added or removed.
This commit is contained in:
Родитель
9a1f27cb7f
Коммит
4103bafb15
|
@ -242,12 +242,13 @@
|
|||
</table>
|
||||
</td>
|
||||
<td valign="top" align="center" rowspan="2">
|
||||
<div id="tagTable" dojoType="ContentPane">
|
||||
[% PROCESS testopia/tag/form.html.tmpl
|
||||
item = case
|
||||
%]
|
||||
|
||||
[% PROCESS testopia/tag/table.html.tmpl
|
||||
item = case
|
||||
type = 'case'
|
||||
%]
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -182,12 +182,14 @@
|
|||
</td>
|
||||
<td valign="top" align="center" rowspan="2">
|
||||
|
||||
<div id="tagTable" dojoType="ContentPane">
|
||||
[% PROCESS testopia/tag/form.html.tmpl
|
||||
item = plan
|
||||
%]
|
||||
|
||||
[% PROCESS testopia/tag/table.html.tmpl
|
||||
item = plan
|
||||
type = 'plan'
|
||||
%]
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td align="right">
|
||||
[% PROCESS select sel = { list => plan.product.builds
|
||||
|
|
|
@ -317,11 +317,12 @@
|
|||
|
||||
<td valign="top" align="center">
|
||||
|
||||
<div id="tagTable" dojoType="ContentPane">
|
||||
[% PROCESS testopia/tag/form.html.tmpl
|
||||
item = run
|
||||
%]
|
||||
[% PROCESS testopia/tag/table.html.tmpl
|
||||
item = run
|
||||
%]
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
[%# 1.0@bugzilla.org %]
|
||||
[%# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Test Runner System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Maciej Maczynski.
|
||||
# Portions created by Maciej Maczynski are Copyright (C) 2001
|
||||
# Maciej Maczynski. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
|
||||
#%]
|
||||
|
||||
[%# INTERFACE:
|
||||
# ...
|
||||
#%]
|
||||
<script type="text/javascript">
|
||||
dojo.require("dojo.widget.ComboBox");
|
||||
</script>
|
||||
[% IF item.type == 'case' %]
|
||||
[% product_id = join(",", case.get_product_ids) %]
|
||||
[% ELSIF item.type == 'plan' %]
|
||||
[% product_id = plan.product_id %]
|
||||
[% ELSIF item.type == 'run' %]
|
||||
[% product_id = run.plan.product_id %]
|
||||
[% END %]
|
||||
[% IF item.canedit %]
|
||||
<input id="newtag" name="newtag"
|
||||
dojoType="combobox"
|
||||
dataUrl="tr_quicksearch.cgi?action=gettag&product_id=[% product_id %]&search=${searchString}"
|
||||
mode="remote"
|
||||
maxListLength="10">
|
||||
|
||||
<input type="button" id="doAdd" onclick="addTag([% item.id FILTER none %],'[% item.type FILTER none %]')" value="Add"></a><br>
|
||||
[% END %]
|
||||
<div id="message" style="border:none"></div>
|
|
@ -21,27 +21,8 @@
|
|||
[%# INTERFACE:
|
||||
# ...
|
||||
#%]
|
||||
<script type="text/javascript">
|
||||
dojo.require("dojo.widget.ComboBox");
|
||||
</script>
|
||||
[% IF item.type == 'case' %]
|
||||
[% product_id = join(",", case.get_product_ids) %]
|
||||
[% ELSIF item.type == 'plan' %]
|
||||
[% product_id = plan.product_id %]
|
||||
[% ELSIF item.type == 'run' %]
|
||||
[% product_id = run.plan.product_id %]
|
||||
[% END %]
|
||||
[% IF item.canedit %]
|
||||
<input id="newtag" name="newtag"
|
||||
dojoType="combobox"
|
||||
dataUrl="tr_quicksearch.cgi?action=gettag&product_id=[% product_id %]&search=${searchString}"
|
||||
mode="remote"
|
||||
maxListLength="10">
|
||||
|
||||
<input type="button" id="doAdd" onclick="addTag([% item.id FILTER none %],'[% type FILTER none %]')" value="Add"></a><br>
|
||||
[% END %]
|
||||
<div id="message" style="border:none"></div>
|
||||
|
||||
<div id="tagTable" dojoType="ContentPane">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
@ -60,4 +41,4 @@
|
|||
[% END %]
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -62,7 +62,7 @@ function tagAttached() {
|
|||
}
|
||||
httpReq = undefined;
|
||||
document.getElementById('doAdd').disabled = false;
|
||||
dojo.widget.manager.getWidgetById('newtag').setAllValues = '';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче