1 namespace('kivi.Draft', function(ns) {
4 ns.popup = function(module, submodule, id, description) {
5 $.get('controller.pl', {
6 action: 'Draft/draft_dialog.js',
10 description: description
11 }, kivi.eval_json_result)
14 ns.save = function(module, submodule) {
15 $.post('controller.pl', {
16 action: 'Draft/save.js',
19 form: $('form').serializeArray(),
20 id: $('#new_draft_id').val(),
21 description: $('#new_draft_description').val()
22 }, kivi.eval_json_result)
25 ns.delete = function(id) {
26 if (!confirm(kivi.t8('Do you really want to delete this draft?'))) return;
28 $.post('controller.pl', {
29 action: 'Draft/delete.js',
31 }, kivi.eval_json_result)