]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/templates/week.tpl
More work in progress replacing text links with icons.
[timetracker.git] / WEB-INF / templates / week.tpl
index 7c59f5b3b89c0676b82cef673ab0c8b48a19334f..8eaa5fa888143105c30deb252a826ae6ea5d4ec2 100644 (file)
@@ -1,5 +1,20 @@
 {include file="time_script.tpl"}
 
+<script>
+// This is here because fillDropdowns() in time_script.tpl uses a different form name.
+// Perhaps a better fix would be to provide form name as paramater to fillDropdowns()?
+// TODO: try to fix it properly.
+//
+// The fillDropdowns function populates the "project" and "task" dropdown controls
+// with relevant values.
+function fillDropdowns() {
+  if(document.body.contains(document.weekTimeForm.client))
+    fillProjectDropdown(document.weekTimeForm.client.value);
+
+  fillTaskDropdown(document.weekTimeForm.project.value);
+}
+</script>
+
 <style>
 .not_billable td {
   color: #ff6666;