PriceSource: Mehr Informationen an Preise übergeben
[kivitendo-erp.git] / js / kivi.js
index 469d889..5ae742c 100644 (file)
@@ -127,6 +127,11 @@ namespace("kivi", function(ns) {
         kivi.PartPicker($(elt));
       });
 
+    if (ns.CustomerVendorPicker)
+      ns.run_once_for('input.customer_vendor_autocomplete', 'customer_vendor_picker', function(elt) {
+        kivi.CustomerVendorPicker($(elt));
+      });
+
     var func = kivi.get_function_by_name('local_reinit_widgets');
     if (func)
       func();
@@ -190,7 +195,12 @@ namespace("kivi", function(ns) {
 
     if (!params.url) {
       // Use existing DOM element and show it. No AJAX call.
-      dialog = $('#' + id).dialog(dialog_params);
+      dialog =
+        $('#' + id)
+        .bind('dialogopen', function() {
+          ns.run_once_for('.texteditor-in-dialog,.texteditor-dialog', 'texteditor', kivi.init_text_editor);
+        })
+        .dialog(dialog_params);
       return true;
     }