Project: Picker in reinit_widgets registriert
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 9 Nov 2015 12:31:16 +0000 (13:31 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 9 Nov 2015 12:31:16 +0000 (13:31 +0100)
js/kivi.js
templates/webpages/project/test_page.html

index 7e2516d..6b47e1b 100644 (file)
@@ -236,6 +236,11 @@ namespace("kivi", function(ns) {
         kivi.PartPicker($(elt));
       });
 
+    if (ns.ProjectPicker)
+      ns.run_once_for('input.project_autocomplete', 'project_picker', function(elt) {
+        kivi.ProjectPicker($(elt));
+      });
+
     if (ns.CustomerVendorPicker)
       ns.run_once_for('input.customer_vendor_autocomplete', 'customer_vendor_picker', function(elt) {
         kivi.CustomerVendorPicker($(elt));
index 65f88c4..e4b8d92 100644 (file)
@@ -4,3 +4,14 @@
 
 <br>
 [% L.project_picker('project_id', '', style='width: 600px') %] text<br>
+
+Runtime test:<br>
+<div id='runtime_picker'>'
+
+<script>
+$(function() {
+  $('#runtime_picker').html('[% L.project_picker("project2_id") %]');
+  kivi.reinit_widgets();
+})
+</script>
+