1 /*=====================================================================*\
2 || ###################################################################
3 || # Bugdar [#]version[#]
4 || # Copyright ©2002-[#]year[#] Blue Static
6 || # This program is free software; you can redistribute it and/or modify
7 || # it under the terms of the GNU General Public License as published by
8 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || # This program is distributed in the hope that it will be useful, but
11 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 || # You should have received a copy of the GNU General Public License along
16 || # with this program; if not, write to the Free Software Foundation, Inc.,
17 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 || ###################################################################
19 \*=====================================================================*/
23 function draw_cancel(location
)
25 location
= (location
== "" ? "history.back(1)" : "window.location=\"" + location
+ "\"");
26 document
.write("<input name=\"cancel\" type=\"button\" value=\"" + lang
["Cancel"] + "\" onclick=\"" + location
+ "\" />");
29 function setup_report(prod
, comp
, vers
)
31 var hasProduct
= ((prod
+ 0) > 0);
32 var target
= $("#pcv-select");
36 { "do": "pcvajax", "product": prod
, "piece": "product" },
39 target
.html(" <select name=\"product\" id=\"pcv-product\" onchange=\"change_pcv(" + (!hasProduct
) + ", true)\">" + result
+ "</select> ");
42 setup_report_component(prod
, comp
, vers
);
48 function setup_report_component(prod
, comp
, vers
)
50 var target
= $("#pcv-select");
54 { "do": "pcvajax", "product": prod
, "component": comp
, "piece": "component" },
61 target
.html(target
.html() + " <select name=\"component\" id=\"pcv-component\" onchange=\"change_pcv(false, false)\">" + result
+ "</select> ");
65 $("#pcv-component").html(result
);
68 setup_report_version(prod
, comp
, vers
);
73 function setup_report_version(prod
, comp
, vers
)
75 var target
= $("#pcv-select");
79 { "do": "pcvajax", "product": prod
, "component": comp
, "version": vers
, "piece": "version" },
84 target
.html(target
.html() + " <select name=\"version\" id=\"pcv-version\">" + result
+ "</select> ");
88 $("#pcv-version").html(result
);
95 function change_pcv(doProducts
, doComponents
)
99 setup_report($("#pcv-product").val(), $("#pcv-component").val(), $("#pcv-version").val());
101 else if (doComponents
)
103 setup_report_component($("#pcv-product").val(), $("#pcv-component").val(), $("#pcv-version").val());
107 setup_report_version($("#pcv-product").val(), $("#pcv-component").val(), $("#pcv-version").val());
111 /*=====================================================================*\
112 || ###################################################################
115 || ###################################################################
116 \*=====================================================================*/