Select preis if date is available already
authorJoey Schulze <joey@infodrom.org>
Sat, 19 Jan 2013 20:11:03 +0000 (21:11 +0100)
committerJoey Schulze <joey@infodrom.org>
Sat, 19 Jan 2013 20:11:03 +0000 (21:11 +0100)
artikel.php

index d18a219..e26008d 100644 (file)
@@ -50,7 +50,11 @@ function price_popup_open()
     artikel.value = form_id.value;
 
     var datum = document.getElementById('form_datum');
     artikel.value = form_id.value;
 
     var datum = document.getElementById('form_datum');
-    datum.activate();
+    var preis = document.getElementById('form_preis');
+    if (datum.value.length)
+      preis.activate();
+    else
+      datum.activate();
 }
 
 function open_popup()
 }
 
 function open_popup()