Revision 6770b19a
Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt
js/calculate_qty.js | ||
---|---|---|
1 |
function calculate_qty_selection_window(input_name, input_id, formel_name, formel_id) { |
|
2 |
var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes"; |
|
3 |
var action = "calculate_qty"; |
|
1 |
function calculate_qty_selection_dialog(input_name, input_id, formel_name, formel_id) { |
|
2 |
// The target input element is determined by it's dom id or by it's name. |
|
3 |
// The formula input element (the one containing the formula) is determined by it's dom id or by it's name. |
|
4 |
// If the id is not provided the name is used. |
|
4 | 5 |
if (formel_id) { |
5 | 6 |
var formel = $('#' + formel_id).val(); |
6 | 7 |
} else { |
7 | 8 |
var formel = $('[name="' + formel_name + '"]').val(); |
8 | 9 |
} |
9 |
url = "common.pl?" + |
|
10 |
"INPUT_ENCODING=UTF-8&" + |
|
11 |
"action=" + action + "&" + |
|
12 |
"input_name=" + encodeURIComponent(input_name) + "&" + |
|
13 |
"input_id=" + encodeURIComponent(input_id) + "&" + |
|
14 |
"formel=" + encodeURIComponent(formel); |
|
15 |
//alert(url); |
|
16 |
window.open(url, "_new_generic", parm); |
|
10 |
var url = "common.pl"; |
|
11 |
var data = { |
|
12 |
action: "calculate_qty", |
|
13 |
input_name: input_name, |
|
14 |
input_id: input_id, |
|
15 |
formel: formel |
|
16 |
}; |
|
17 |
kivi.popup_dialog({ |
|
18 |
id: 'calc_qty_dialog', |
|
19 |
url: url, |
|
20 |
data: data, |
|
21 |
dialog: { |
|
22 |
width: 500, |
|
23 |
height: 400, |
|
24 |
title: kivi.t8('Please enter values'), |
|
25 |
} |
|
26 |
}); |
|
17 | 27 |
} |
Auch abrufbar als: Unified diff
calculate_qty (Formel): auf Dialog umgestellt