]> wagnertech.de Git - mfinanz.git/blobdiff - js/kivi.js
ckeditor update auf 4.7.2
[mfinanz.git] / js / kivi.js
index 31e7bb4445bd52aa0563e9e218f0351948a91ed1..fbe0c953beb3dcfb02e2933726db21a414c59e9f 100644 (file)
@@ -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 = $('<textarea></textarea>');
+
+    $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');