Don't update the table after adding material, update the material
authorJoey Schulze <joey@infodrom.org>
Wed, 10 Mar 2010 15:33:57 +0000 (16:33 +0100)
committerJoey Schulze <joey@infodrom.org>
Wed, 10 Mar 2010 15:33:57 +0000 (16:33 +0100)
table (detail) instead

masks/materialverbrauch.php

index 0e4cb00..1d65701 100644 (file)
@@ -2,6 +2,16 @@
 
 $jscode[] = <<<EOC
 
+post_save = materialverbrauch_post_save;
+
+function materialverbrauch_post_save()
+{
+    var einsatz = document.getElementById('edit_einsatz');
+
+    var params = 'source=' + grid.tableId.substr(5) + '&id=' + einsatz.value;
+    ajax_request('details', params, details_callback);
+}
+
 function einheit_callback(data)
 {
   var einheit = document.getElementById('edit_einheit');