Zeiterfassung: Eingabe: Projekt-Wechsel mit on('set_item:...') registrieren, …
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 17 May 2021 13:48:59 +0000 (15:48 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 17 May 2021 15:29:28 +0000 (17:29 +0200)
sonst wird das Event nicht ausgelöst,wenn man im Popup-Dialog ein Projekt
wählt.

js/kivi.TimeRecording.js
templates/webpages/time_recording/form.html

index 47b0f16..574549e 100644 (file)
@@ -57,3 +57,7 @@ namespace('kivi.TimeRecording', function(ns) {
   };
 
 });
+
+$(function() {
+  $('#time_recording_project_id').on('set_item:ProjectPicker', function(){ kivi.TimeRecording.project_changed() });
+});
index 337f3c7..07939da 100644 (file)
@@ -58,7 +58,7 @@
     </tr>
     <tr>
       <th align="right">[% 'Project' | $T8 %]</th>
-      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, description_style='both', style='width: 300px', onchange='kivi.TimeRecording.project_changed()') %]</td>
+      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, description_style='both', style='width: 300px') %]</td>
     </tr>
     <tr></tr><tr></tr>
     <tr>