X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/525758a569e2829faaf7be306be79715cc61cb0e..b857a9fcba5c0f6f96cfc7d85308aab6860ca089:/js/kivi.js diff --git a/js/kivi.js b/js/kivi.js index 31e7bb444..fbe0c953b 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -357,13 +357,13 @@ namespace("kivi", function(ns) { params.dialog || { }, { // Options that must not be changed: close: function(event, ui) { + dialog.dialog('close'); + if (custom_close) custom_close(); if (params.url || params.html) dialog.remove(); - else - dialog.dialog('close'); } }); @@ -535,6 +535,23 @@ namespace("kivi", function(ns) { return true; }; + + ns.switch_areainput_to_textarea = function(id) { + var $input = $('#' + id); + if (!$input.length) + return; + + var $area = $(''); + + $area.prop('rows', 3); + $area.prop('cols', $input.prop('size') || 40); + $area.prop('name', $input.prop('name')); + $area.prop('id', $input.prop('id')); + $area.val($input.val()); + + $input.parent().replaceWith($area); + $area.focus(); + }; }); kivi = namespace('kivi');