X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/33749625e16aae5386b5b59a45c9c0e987bd5b4e..1f0d7da266e23a443c47aaa2dbab844e6be50ee4:/js/kivi.File.js diff --git a/js/kivi.File.js b/js/kivi.File.js index 4bf79ba77..11adf7646 100644 --- a/js/kivi.File.js +++ b/js/kivi.File.js @@ -1,6 +1,8 @@ namespace('kivi.File', function(ns) { ns.rename = function(id,type,file_type,checkbox_class,is_global) { + var $dlg = $('#rename_dialog'); + var parent_id = $dlg.parent("div.ui-tabs-panel").attr('id'); var checkboxes = $('.'+checkbox_class).filter(function () { return $(this).prop('checked'); }); if (checkboxes.size() === 0) { @@ -23,7 +25,11 @@ namespace('kivi.File', function(ns) { dialog: { title: kivi.t8("Rename attachment") , width: 400 , height: 200 - , modal: true } }); + , modal: true + , close: function() { + $dlg.remove().appendTo('#' + parent_id); + } + } }); return true; } @@ -164,6 +170,12 @@ namespace('kivi.File', function(ns) { return false; } + ns.delete_file = function(id,controller_action) { + $.post('controller.pl', { action: controller_action, id: id }, function(data) { + kivi.eval_json_result(data); + }); + }; + ns.unimport = function(id,type,file_type,checkbox_class) { var checkboxes = $('.'+checkbox_class).filter(function () { return $(this).prop('checked'); }); @@ -209,12 +221,12 @@ namespace('kivi.File', function(ns) { }); return true; } - + ns.importclose = function() { $("#import_dialog").dialog('close'); return false; } - + ns.importaction = function(id,type,file_type,fromwhere,frompath,checkbox_class) { var checkboxes = $('.'+checkbox_class).filter(function () { return $(this).prop('checked'); });