Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Slight rearrangement of order JS for checkboxes

  • Loading branch information...
commit 7e23835eccd9dad6ea2b78f14e5cbca62ac1b99b 1 parent 2438dec
@codeinthehole codeinthehole authored
View
18 oscar/static/oscar/js/oscar/dashboard.js
@@ -29,6 +29,14 @@ oscar.dashboard = {
if (location.hash) {
$('.nav-tabs a[href=' + location.hash + ']').tab('show');
}
+ },
+ initTable: function() {
+ var table = $('form.order_table table'),
+ input = $('<input type="checkbox" />');
+ $('th:first', table).append(input);
+ $(input).change(function(){
+ $('input.selected_order', table).prop("checked", $(this).is(':checked'));
+ });
}
},
promotions: {
@@ -55,16 +63,6 @@ oscar.dashboard = {
});
}
},
- orderTable: {
- init: function() {
- var table = $('form.order_table table');
- var input = $('<input type="checkbox" />');
- $('th:first', table).append(input);
- $(input).change(function(){
- $('input.selected_order', table).prop("checked", $(this).is(':checked'));
- });
- }
- },
search: {
init: function() {
var searchForm = $(".orders_search"),
View
2  oscar/templates/dashboard/orders/order_list.html
@@ -131,6 +131,6 @@ <h3 class="app-ico ico_logout icon">Download</h3>
{% endblock dashboard_content %}
{% block onbodyload %}
-oscar.dashboard.orderTable.init();
+oscar.dashboard.orders.initTable();
oscar.dashboard.search.init();
{% endblock onbodyload %}
Please sign in to comment.
Something went wrong with that request. Please try again.