Revision 7a3ee8d6
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
js/kivi.PriceRule.js | ||
---|---|---|
1 | 1 |
namespace('kivi.PriceRule', function(ns) { |
2 |
"use strict"; |
|
2 | 3 |
|
3 | 4 |
ns.add_new_row = function (type) { |
4 | 5 |
var data = { |
... | ... | |
6 | 7 |
type: type |
7 | 8 |
}; |
8 | 9 |
$.post('controller.pl', data, kivi.eval_json_result); |
9 |
} |
|
10 |
};
|
|
10 | 11 |
|
11 | 12 |
ns.open_price_type_help_popup = function() { |
12 | 13 |
kivi.popup_dialog({ |
13 | 14 |
url: 'controller.pl?action=PriceRule/price_type_help', |
14 | 15 |
dialog: { title: kivi.t8('Price Types') }, |
15 | 16 |
}); |
16 |
} |
|
17 |
};
|
|
17 | 18 |
|
18 | 19 |
ns.on_change_filter_type = function() { |
19 | 20 |
var val = $('#price_rule_filter_type').val(); |
... | ... | |
27 | 28 |
$('#price_rule_filter_vendor_tr').hide(); |
28 | 29 |
$('#price_rule_filter_customer_tr').show(); |
29 | 30 |
} |
30 |
if (val == '') { |
|
31 |
if (val === '') {
|
|
31 | 32 |
$('#price_rule_filter_customer_tr').show(); |
32 | 33 |
$('#price_rule_filter_vendor_tr').show(); |
33 | 34 |
} |
34 |
} |
|
35 |
};
|
|
35 | 36 |
|
36 | 37 |
ns.inline_report = function(target, source, data){ |
37 | 38 |
$.ajax({ |
... | ... | |
54 | 55 |
ns.inline_report('#price_rules_customer_report', 'controller.pl', { action: 'PriceRule/list', 'filter.item_type_matches[].part': id, 'filter.type': 'customer', inline: 1 }); |
55 | 56 |
ns.inline_report('#price_rules_vendor_report', 'controller.pl', { action: 'PriceRule/list', 'filter.item_type_matches[].part': id, 'filter.type': 'vendor', inline: 1 }); |
56 | 57 |
}, 200); |
57 |
} |
|
58 |
};
|
|
58 | 59 |
|
59 | 60 |
$(function() { |
60 | 61 |
$('#price_rule_item_add').click(function() { |
Auch abrufbar als: Unified diff
kivi.PriceRule.js: strict & Warnungen vermeiden