Skip to content
This repository
Browse code

Slight rearrangement of order JS for checkboxes

  • Loading branch information...
commit 7e23835eccd9dad6ea2b78f14e5cbca62ac1b99b 1 parent 2438dec
David Winterbottom authored
18  oscar/static/oscar/js/oscar/dashboard.js
@@ -29,6 +29,14 @@ oscar.dashboard = {
29 29
             if (location.hash) {
30 30
                 $('.nav-tabs a[href=' + location.hash + ']').tab('show');
31 31
             }
  32
+        },
  33
+        initTable: function() {
  34
+            var table = $('form.order_table table'),
  35
+                input = $('<input type="checkbox" />');
  36
+            $('th:first', table).append(input);
  37
+            $(input).change(function(){
  38
+                $('input.selected_order', table).prop("checked", $(this).is(':checked'));
  39
+            });
32 40
         }
33 41
     },
34 42
     promotions: {
@@ -55,16 +63,6 @@ oscar.dashboard = {
55 63
             });
56 64
         }
57 65
     },
58  
-    orderTable: {
59  
-        init: function() {
60  
-            var table = $('form.order_table table');
61  
-            var input = $('<input type="checkbox" />');
62  
-            $('th:first', table).append(input);
63  
-            $(input).change(function(){
64  
-                $('input.selected_order', table).prop("checked", $(this).is(':checked'));
65  
-            });
66  
-        }
67  
-    },
68 66
     search: {
69 67
         init: function() {
70 68
             var searchForm = $(".orders_search"),
2  oscar/templates/dashboard/orders/order_list.html
@@ -131,6 +131,6 @@ <h3 class="app-ico ico_logout icon">Download</h3>
131 131
 {% endblock dashboard_content %}
132 132
 
133 133
 {% block onbodyload %}
134  
-oscar.dashboard.orderTable.init();
  134
+oscar.dashboard.orders.initTable();
135 135
 oscar.dashboard.search.init();
136 136
 {% endblock onbodyload %}

0 notes on commit 7e23835

Please sign in to comment.
Something went wrong with that request. Please try again.