Revision 5618b4b3
Von Tamino Steinert vor 6 Tagen hinzugefügt
js/kivi.VariantProperty.js | ||
---|---|---|
1 | 1 |
namespace('kivi.VariantProperty', function(ns) { |
2 | 2 |
var $dialog; |
3 | 3 |
|
4 |
ns.variant_dialog = function(title, html) { |
|
5 |
var id = 'jqueryui_popup_dialog';
|
|
4 |
ns.variant_property_value_dialog = function(title, html) {
|
|
5 |
var id = 'jqueryui_popup_dialog'; |
|
6 | 6 |
var dialog_params = { |
7 | 7 |
id: id, |
8 | 8 |
width: 800, |
9 | 9 |
height: 500, |
10 | 10 |
modal: true, |
11 |
close: function(event, ui) { $dialog.remove(); },
|
|
11 |
close: function(_event, _ui) { $dialog.remove(); },
|
|
12 | 12 |
}; |
13 | 13 |
|
14 | 14 |
$('#' + id).remove(); |
... | ... | |
23 | 23 |
return true; |
24 | 24 |
}; |
25 | 25 |
|
26 |
|
|
27 |
ns.save_variant_value = function() { |
|
28 |
var form = $('#variant_property_value_form').serializeArray(); |
|
29 |
console.log("my", form) |
|
30 |
form.push( { name: 'action', value: 'VariantProperty/save_property_value' } |
|
31 |
); |
|
32 |
|
|
33 |
$.post('controller.pl', form, function(data) { |
|
34 |
kivi.eval_json_result(data); |
|
35 |
}); |
|
26 |
ns.save_variant_property_value = function() { |
|
27 |
var data = $('#variant_property_value_form').serializeArray(); |
|
28 |
data.push({ name: 'action', value: 'VariantProperty/save_variant_property_value' }); |
|
29 |
$.post('controller.pl', data, kivi.eval_json_result); |
|
36 | 30 |
}; |
37 | 31 |
|
38 |
ns.add_or_edit_variant_value = function(id) { |
|
39 |
$.post('controller.pl', { action: 'VariantProperty/edit_property_value', id: id }, function(data) { |
|
40 |
kivi.eval_json_result(data); |
|
41 |
}); |
|
32 |
ns.add_variant_property_value = function() { |
|
33 |
var data = $('#variant_property_value_list_form').serializeArray(); |
|
34 |
data.push({ name: 'action', value: 'VariantProperty/add_variant_property_value' }); |
|
35 |
$.post("controller.pl", data, kivi.eval_json_result); |
|
36 |
} |
|
37 |
|
|
38 |
ns.edit_variant_property_value = function(variant_property_value_id) { |
|
39 |
$.post('controller.pl', { |
|
40 |
action: 'VariantProperty/edit_variant_property_value', |
|
41 |
variant_property_value_id: variant_property_value_id |
|
42 |
}, kivi.eval_json_result); |
|
42 | 43 |
}; |
43 | 44 |
|
44 | 45 |
}); |
Auch abrufbar als: Unified diff
Varianten: Bearbeiten von Varianten Eigenschaften und Ausprägungen