X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5691320890b97e7523eaf4fc02c9e5765373e693..c59e85c3a7538b1279e25022a6cf431ca1dee700:/js/kivi.js diff --git a/js/kivi.js b/js/kivi.js index 41b3762a3..fbe0c953b 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -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');