kivitendo/js/kivi.VariantProperty.js @ bf42cb97
8752239e | Werner Hahn | namespace('kivi.VariantProperty', function(ns) {
|
||
var $dialog;
|
||||
a4420618 | Tamino Steinert | ns.variant_property_value_dialog = function(title, html) {
|
||
var id = 'jqueryui_popup_dialog';
|
||||
8752239e | Werner Hahn | var dialog_params = {
|
||
id: id,
|
||||
width: 800,
|
||||
height: 500,
|
||||
modal: true,
|
||||
a4420618 | Tamino Steinert | close: function(_event, _ui) { $dialog.remove(); },
|
||
8752239e | Werner Hahn | };
|
||
$('#' + id).remove();
|
||||
$dialog = $('<div style="display:none" id="' + id + '"></div>').appendTo('body');
|
||||
$dialog.attr('title', title);
|
||||
$dialog.html(html);
|
||||
$dialog.dialog(dialog_params);
|
||||
$('.cancel').click(ns.close_dialog);
|
||||
return true;
|
||||
};
|
||||
a4420618 | Tamino Steinert | ns.save_variant_property_value = function() {
|
||
var data = $('#variant_property_value_form').serializeArray();
|
||||
data.push({ name: 'action', value: 'VariantProperty/save_variant_property_value' });
|
||||
$.post('controller.pl', data, kivi.eval_json_result);
|
||||
8752239e | Werner Hahn | };
|
||
a4420618 | Tamino Steinert | ns.add_variant_property_value = function() {
|
||
var data = $('#variant_property_value_list_form').serializeArray();
|
||||
data.push({ name: 'action', value: 'VariantProperty/add_variant_property_value' });
|
||||
$.post("controller.pl", data, kivi.eval_json_result);
|
||||
}
|
||||
ns.edit_variant_property_value = function(variant_property_value_id) {
|
||||
$.post('controller.pl', {
|
||||
action: 'VariantProperty/edit_variant_property_value',
|
||||
variant_property_value_id: variant_property_value_id
|
||||
}, kivi.eval_json_result);
|
||||
8752239e | Werner Hahn | };
|
||
});
|