Skip to content
This repository

Orders table cosmetics #184

Closed
wants to merge 1 commit into from

2 participants

paluh David Winterbottom
paluh
paluh commented May 22, 2012

No description provided.

David Winterbottom codeinthehole closed this May 23, 2012
David Winterbottom
Owner

Have merged manually. I adjusted the JS very slightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 22, 2012
paluh "Select all" checkbox in order's table 2438dec
This page is out of date. Refresh to see the latest.
10  oscar/static/oscar/js/oscar/dashboard.js
@@ -55,6 +55,16 @@ oscar.dashboard = {
55 55
             });
56 56
         }
57 57
     },
  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
+    },
58 68
     search: {
59 69
         init: function() {
60 70
             var searchForm = $(".orders_search"),
1  oscar/templates/dashboard/orders/order_list.html
@@ -131,5 +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 135
 oscar.dashboard.search.init();
135 136
 {% endblock onbodyload %}
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.