Revision b0ad9e13
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
js/show_history.js | ||
---|---|---|
10 | 10 |
return string; |
11 | 11 |
} |
12 | 12 |
|
13 |
function set_history_window(id,trans_id_type) { |
|
14 |
var parm = centerParms(800,500) + ",width=800,height=500,status=yes,scrollbars=yes"; |
|
15 |
var name = "History"; |
|
16 |
url = "common.pl?" + |
|
17 |
"INPUT_ENCODING=UTF-8&" + |
|
18 |
"action=show_history&" + |
|
19 |
"longdescription=" + "&" + |
|
20 |
"trans_id_type=" + encodeURIComponent(trans_id_type) + "&" + |
|
21 |
"input_name=" + encodeURIComponent(id) + "&" |
|
13 |
function set_history_window(id,trans_id_type, snumbers, what_done) { |
|
14 |
var parm = centerParms(1100,500) + ",width=1100,height=500,status=yes,scrollbars=yes"; |
|
15 |
var url = "common.pl?action=show_history&INPUT_ENCODING=UTF-8&"; |
|
16 |
|
|
17 |
if (trans_id_type) |
|
18 |
url += "&trans_id_type=" + encodeURIComponent(trans_id_type); |
|
19 |
if (snumbers) |
|
20 |
url += "&s_numbers=" + encodeURIComponent(snumbers); |
|
21 |
if (what_done) |
|
22 |
url += "&what_done=" + encodeURIComponent(what_done); |
|
23 |
if (id) |
|
24 |
url += "&input_name=" + encodeURIComponent(id); |
|
25 |
|
|
22 | 26 |
window.open(url, "_new_generic", parm); |
23 | 27 |
} |
Auch abrufbar als: Unified diff
Historien-Popup: nur definierte Parameter an URL übergeben
Nicht definierte Werte werden von `encodeURIComponent` stringifiziert,
sodass z.B. `what_done=undefined&…` in der URL steht, wonach
Perl-seitig dann gefiltert wird und keine Ergebnisse mehr liefert.