X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/69e526ee5cfc3d153f738083b397a000c00c4468..bcda139b21ae2827e5245d00ba85d1b95d861b93:/js/kivi.File.js diff --git a/js/kivi.File.js b/js/kivi.File.js index b02d7d0ff..b509422eb 100644 --- a/js/kivi.File.js +++ b/js/kivi.File.js @@ -27,10 +27,10 @@ namespace('kivi.File', function(ns) { , height: 200 , modal: true , close: function() { - console.log("Closing, moving to original parent " + parent_id); $dlg.remove().appendTo('#' + parent_id); } - } }); + } + }); return true; } @@ -60,14 +60,20 @@ namespace('kivi.File', function(ns) { $('#next_ids_id').val(next_ids); $('#sessionfile_id').val(sessionfile); $('#rename_extra_text').html(kivi.t8("The uploaded filename still exists.
If you not modify the name this is a new version of the file")); + var $dlg = $('#rename_dialog'); + var parent_id = $dlg.parent("div.ui-tabs-panel").attr('id'); kivi.popup_dialog( { id: 'rename_dialog', dialog: { title: kivi.t8("Rename attachment") , width: 400 , height: 200 - , modal: true } - }); + , modal: true + , close: function() { + $dlg.remove().appendTo('#' + parent_id); + } } + } + ); } ns.upload = function(id,type,filetype,upload_title,gl) { @@ -171,6 +177,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'); }); @@ -216,12 +228,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'); });