1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[%# Display product and component descriptions after their respective fields %]
<script>
var Event = YAHOO.util.Event;
var Dom = YAHOO.util.Dom;
Event.onDOMReady(function() {
// Display product description if user requests it
var prod_desc = '[% bug.product_obj.description FILTER html_light FILTER js %]';
if (prod_desc) {
var field_container = Dom.get('field_container_product');
var toggle_container = document.createElement('span');
Dom.setAttribute(toggle_container, 'id', 'toggle_prod_desc');
toggle_container.appendChild(document.createTextNode(' ('));
var toggle_link = document.createElement('a');
Dom.setAttribute(toggle_link, 'id', 'toggle_prod_desc_link');
Dom.setAttribute(toggle_link, 'href', 'javascript:void(0);')
toggle_link.appendChild(document.createTextNode('show info'));
toggle_container.appendChild(toggle_link);
toggle_container.appendChild(document.createTextNode(')'));
field_container.appendChild(toggle_container);
var desc_container = document.createElement('div');
Dom.setAttribute(desc_container, 'id', 'prod_desc_container');
Dom.addClass(desc_container, 'bz_default_hidden');
desc_container.innerHTML = prod_desc;
field_container.appendChild(desc_container);
Event.addListener(toggle_link, 'click', function () {
if (Dom.hasClass('prod_desc_container', 'bz_default_hidden')) {
Dom.get('toggle_prod_desc_link').innerHTML = 'hide info';
Dom.removeClass('prod_desc_container', 'bz_default_hidden');
}
else {
Dom.get('toggle_prod_desc_link').innerHTML = 'show info';
Dom.addClass('prod_desc_container', 'bz_default_hidden');
}
});
}
// Display component description if user requests it
var comp_desc = '[% bug.component_obj.description FILTER html_light FILTER js %]';
if (comp_desc) {
var field_container = Dom.get('field_container_component');
var toggle_container = document.createElement('span');
Dom.setAttribute(toggle_container, 'id', 'toggle_comp_desc');
toggle_container.appendChild(document.createTextNode(' ('));
var toggle_link = document.createElement('a');
Dom.setAttribute(toggle_link, 'id', 'toggle_comp_desc_link');
Dom.setAttribute(toggle_link, 'href', 'javascript:void(0);')
toggle_link.appendChild(document.createTextNode('show info'));
toggle_container.appendChild(toggle_link);
toggle_container.appendChild(document.createTextNode(')'));
field_container.appendChild(toggle_container);
var desc_container = document.createElement('div');
Dom.setAttribute(desc_container, 'id', 'comp_desc_container');
Dom.addClass(desc_container, 'bz_default_hidden');
desc_container.innerHTML = comp_desc;
field_container.appendChild(desc_container);
Event.addListener(toggle_link, 'click', function () {
if (Dom.hasClass('comp_desc_container', 'bz_default_hidden')) {
Dom.get('toggle_comp_desc_link').innerHTML = 'hide info';
Dom.removeClass('comp_desc_container', 'bz_default_hidden');
}
else {
Dom.get('toggle_comp_desc_link').innerHTML = 'show info';
Dom.addClass('comp_desc_container', 'bz_default_hidden');
}
});
}
});
</script>
[% UNLESS cf_hidden_in_product('cf_rank', bug.product, bug.component) %]
[% IF bug.check_can_change_field('cf_rank', 0, 1) %]
<label class="field_label" id="rank_label" for="cf_rank">Rank:</label>
<input type="number" id="cf_rank" name="cf_rank" size="3" value="[% bug.cf_rank FILTER html %]">
[% ELSIF bug.cf_rank != '' %]
<label class="field_label" id="rank_label" for="cf_rank">Rank:</label>
<span id="cf_rank">[% bug.cf_rank FILTER html %]</span>
[% END %]
[% END %]
|