Commits

Mikela Clemmons  committed 83868a9

added js to make clear button work

  • Participants
  • Parent commits 8fb699d
  • Branches invoice_manager

Comments (0)

Files changed (2)

File timepiece/static/timepiece/js/clear_form.js

+jQuery(function($){
+    $(document).ready(function() {
+        form_list = $('input#id_date_form_clear_btn');
+        if (form_list.length > 0){
+            form_list.click(function() {
+                $("ul#ledger-date-fieldlist input[type='text']").each(function() {
+                    $(this).val('');
+                });
+            });
+        }
+    });
+});

File timepiece/templates/timepiece/time-sheet/base.html

 {% extends "timepiece/base.html" %}
 {% load timepiece_tags %}
+{% block javascript %}{{ block.super }}
+	<script src="{{ STATIC_URL }}timepiece/js/clear_form.js" type="text/javascript"></script>
+{% endblock %}
 {% block css %}{{ block.super }}
-<style>
-tr.overlapping {
-    background-color: #ff0000;
-}
-</style>
+  <style>
+  tr.overlapping {
+      background-color: #ff0000;
+  }
+  </style>
 {% endblock %}
 {% block sub_navigation %}
     <ul class='header-actions-left'>