1 namespace('kivi.PriceRule', function(ns) {
3 ns.add_new_row = function (type) {
5 action: 'PriceRule/add_item_row',
8 $.post('controller.pl', data, kivi.eval_json_result);
11 ns.open_price_type_help_popup = function() {
13 url: 'controller.pl?action=PriceRule/price_type_help',
14 dialog: { title: kivi.t8('Price Types') },
19 $('#price_rule_item_add').click(function() {
20 ns.add_new_row($('#price_rules_empty_item_select').val());
22 $('#price_rule_items').on('click', 'a.price_rule_remove_line', function(){
23 $(this).closest('div').remove();
25 $('#price_rule_price_type_help').click(ns.open_price_type_help_popup);