Skip to content

Commit

Permalink
Merge pull request #25 from Jellyfishboy/feature/stock-filter
Browse files Browse the repository at this point in the history
Refactored to be more dry for soca asset.
  • Loading branch information
Jellyfishboy committed Jul 26, 2016
2 parents b4f7bdb + 54c7e4e commit 28e7a23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions app/assets/javascripts/trado.ready.js
Expand Up @@ -6,9 +6,11 @@ ready = function()
soca.animation.colourCaveat();
soca.animation.sidebarExtension();

soca.filter.tableRowTarget();
soca.filter.products();
soca.filter.orders();
soca.index.tableRowTarget();
soca.index.sort('#sort-product');
soca.index.filter('#filter-product-category');
soca.index.filter('#filter-stock');
soca.index.filter('#filter-order-delivery');

soca.misc.taxField();
soca.misc.multiSelect();
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/orders/index.html.erb
Expand Up @@ -7,7 +7,7 @@
<h2 class="widget widget-header">Orders</h2>
</div>
<div class="widget-controls">
<select class="form-select" id="filter-order">
<select class="form-select" id="filter-order-delivery">
<option class="filter" data-filter="all">Show all</option>
<option class="filter" data-filter=".order-dispatched">Dispatched</option>
<option class="filter" data-filter=".order-pending">Pending</option>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/products/stock/index.html.erb
Expand Up @@ -7,7 +7,7 @@
<h2 class="widget widget-header">Stock management</h2>
</div>
<div class="widget-controls">
<select class="form-select" id="filter-order">
<select class="form-select" id="filter-stock">
<option class="filter" data-filter="all">Show all</option>
<option class="filter" data-filter=".stock-low">Low</option>
</select>
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/admin/soca.js

Large diffs are not rendered by default.

0 comments on commit 28e7a23

Please sign in to comment.