Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add "select all" checkbox also in order items table

  • Loading branch information...
commit 2179eac13f807c26f5a6d5cc2bd2057072d58b37 1 parent 4b39ef0
paluh paluh authored
13 oscar/static/oscar/js/oscar/dashboard.js
View
@@ -31,11 +31,16 @@ oscar.dashboard = {
}
},
initTable: function() {
- var table = $('form.order_table table'),
- input = $('<input type="checkbox" />');
- $('th:first', table).append(input);
+ var table = $('form table'),
+ input = $('<input type="checkbox" />').css({
+ 'margin-right': '5px',
+ 'vertical-align': 'top'
+ });
+ $('th:first', table).prepend(input);
$(input).change(function(){
- $('input.selected_order', table).prop("checked", $(this).is(':checked'));
+ $('tr', table).each(function() {
+ $('td:first input', this).prop("checked", $(input).is(':checked'));
+ });
});
}
},
1  oscar/templates/dashboard/orders/order_detail.html
View
@@ -471,4 +471,5 @@ <h3 class="app-ico ico_comment icon">Notes</h3>
{% block onbodyload %}
oscar.dashboard.orders.initTabs();
+oscar.dashboard.orders.initTable();
{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.