caboose-store 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjMzNTUwOTI2MTg4ZTliMTUyNDZmYjg3NDQ2M2I2OTM1NjAzOGJiMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDA5ZWNkNjA4N2RjZmZlNDcyMDdjOTk3NDYzNTIzN2RhYWMxZTM5ZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjkyOTA2YzZjMWViYTAzNGYxYTE0MThhMGE0MjhhMDNiOWNiNTNhZjM1NzI5
|
10
|
+
MGIyMGMzMmJhMjUyYmY5YjkzOTg4ZTE0OTc1NWI1MmNiNzkyODJhYjYzNWNm
|
11
|
+
NzI0OWZhZTYyZGYyMzAyZTIxYzJjMTdlYzMzMmY5NWI1YTY3OTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDQwMWNkODgwZTY4Njc5YTQyODE1MTc3ZDUxMGFmYzFlM2I4YWFhZTZlZjUy
|
14
|
+
Njg0YzdlZjBlODIwMGE1YWRmYjAyYjdiMDcyNzU0N2ZjYmI3MTE1ODBhMjM4
|
15
|
+
YzZmNDY4Zjk2MjI0N2FiNjI3ZTg3OGI4Y2RmNzgxMjZlYzBkYWY=
|
@@ -17,54 +17,65 @@ v = @variant
|
|
17
17
|
|
18
18
|
<p style='font-size: 75%;'><a href='/admin/products/<%= p.id %>/variant-cols'>Edit visible columns</a></p>
|
19
19
|
|
20
|
-
<div id='message'
|
20
|
+
<div id='message'><%
|
21
|
+
# Make sure we're not trying to highlight a deleted variant
|
22
|
+
if @highlight_variant_id
|
23
|
+
v = Variant.where(:id => @highlight_variant_id).first
|
24
|
+
if v.nil?
|
25
|
+
%><p class='note error'>The variant you want to highlight is not in the database.</p><%
|
26
|
+
elsif v.status == 'Deleted'
|
27
|
+
%><p class='note error'>The variant you want to highlight has been deleted.</p><%
|
28
|
+
end
|
29
|
+
end
|
30
|
+
%></div>
|
21
31
|
|
22
32
|
<div id='variants_wrapper'>
|
23
33
|
<table id='variants'>
|
24
|
-
<tr>
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
</tr>
|
34
|
+
<tr>
|
35
|
+
<% if @cols['option1' ] && p.option1 %><th valign='bottom'><%= p.option1 %></th><% end %>
|
36
|
+
<% if @cols['option2' ] && p.option2 %><th valign='bottom'><%= p.option2 %></th><% end %>
|
37
|
+
<% if @cols['option3' ] && p.option3 %><th valign='bottom'><%= p.option3 %></th><% end %>
|
38
|
+
<% if @cols['status' ] == true %><th valign='bottom'>Status </th><% end %>
|
39
|
+
<% if @cols['alternate_id' ] == true %><th valign='bottom'>Alternate ID </th><% end %>
|
40
|
+
<% if @cols['barcode' ] == true %><th valign='bottom'>Barcode </th><% end %>
|
41
|
+
<% if @cols['price' ] == true %><th valign='bottom'>Price </th><% end %>
|
42
|
+
<% if @cols['quantity_in_stock' ] == true %><th valign='bottom'>Quantity </th><% end %>
|
43
|
+
<% if @cols['weight' ] == true %><th valign='bottom'>Weight </th><% end %>
|
44
|
+
<% if @cols['length' ] == true %><th valign='bottom'>Length </th><% end %>
|
45
|
+
<% if @cols['width' ] == true %><th valign='bottom'>Width </th><% end %>
|
46
|
+
<% if @cols['height' ] == true %><th valign='bottom'>Height </th><% end %>
|
47
|
+
<% if @cols['cylinder' ] == true %><th valign='bottom'>Cylinder </th><% end %>
|
48
|
+
<% if @cols['requires_shipping' ] == true %><th valign='bottom'>Requires Shipping </th><% end %>
|
49
|
+
<% if @cols['allow_backorder' ] == true %><th valign='bottom'>Allow Backorder </th><% end %>
|
50
|
+
<% if @cols['taxable' ] == true %><th valign='bottom'>Taxable </th><% end %>
|
51
|
+
<th> </th>
|
52
|
+
<th> </th>
|
53
|
+
</tr>
|
44
54
|
<% Caboose.log p.variants.where(:status => ['Active', 'Inactive']).first %>
|
45
55
|
<% p.variants.where(:status => ['Active', 'Inactive']).each do |v| %>
|
46
|
-
<tr <% if @highlight_variant_id && v.id == @highlight_variant_id %>class='highlight'<% end %>>
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
</tr>
|
56
|
+
<tr <% if @highlight_variant_id && v.id == @highlight_variant_id %>class='highlight'<% end %>>
|
57
|
+
<% if @cols['option1' ] && p.option1 %><td><div id='variant_<%= v.id %>_option1' ></div></td><% end %>
|
58
|
+
<% if @cols['option2' ] && p.option2 %><td><div id='variant_<%= v.id %>_option2' ></div></td><% end %>
|
59
|
+
<% if @cols['option3' ] && p.option3 %><td><div id='variant_<%= v.id %>_option3' ></div></td><% end %>
|
60
|
+
<% if @cols['status' ] == true %><td><div id='variant_<%= v.id %>_status' ></div></td><% end %>
|
61
|
+
<% if @cols['alternate_id' ] == true %><td><div id='variant_<%= v.id %>_alternate_id' ></div></td><% end %>
|
62
|
+
<% if @cols['barcode' ] == true %><td><div id='variant_<%= v.id %>_barcode' ></div></td><% end %>
|
63
|
+
<% if @cols['price' ] == true %><td><div id='variant_<%= v.id %>_price' ></div></td><% end %>
|
64
|
+
<% if @cols['quantity_in_stock' ] == true %><td><div id='variant_<%= v.id %>_quantity_in_stock' ></div></td><% end %>
|
65
|
+
<% if @cols['weight' ] == true %><td><div id='variant_<%= v.id %>_weight' ></div></td><% end %>
|
66
|
+
<% if @cols['length' ] == true %><td><div id='variant_<%= v.id %>_length' ></div></td><% end %>
|
67
|
+
<% if @cols['width' ] == true %><td><div id='variant_<%= v.id %>_width' ></div></td><% end %>
|
68
|
+
<% if @cols['height' ] == true %><td><div id='variant_<%= v.id %>_height' ></div></td><% end %>
|
69
|
+
<% if @cols['cylinder' ] == true %><td><div id='variant_<%= v.id %>_cylinder' ></div></td><% end %>
|
70
|
+
<% if @cols['requires_shipping' ] == true %><td><div id='variant_<%= v.id %>_requires_shipping' ></div></td><% end %>
|
71
|
+
<% if @cols['allow_backorder' ] == true %><td><div id='variant_<%= v.id %>_allow_backorder' ></div></td><% end %>
|
72
|
+
<% if @cols['taxable' ] == true %><td><div id='variant_<%= v.id %>_taxable' ></div></td><% end %>
|
73
|
+
<td class='edit'><a href='/admin/products/<%= p.id %>/variants/<%= v.id %>/edit'>Edit</a></td>
|
74
|
+
<td class='delete'><a href='#' onclick='delete_variant(<%= v.id %>);'>Delete</a></td>
|
75
|
+
</tr>
|
66
76
|
<% end %>
|
67
77
|
</table>
|
78
|
+
|
68
79
|
</div>
|
69
80
|
<p><input type='button' value='New Variant' onclick="add_variant(<%= p.id %>);" /></p>
|
70
81
|
|
@@ -106,11 +117,7 @@ $(document).ready(function() {
|
|
106
117
|
<% if @cols['allow_backorder' ] == true %>{ name: 'allow_backorder' , nice_name: 'Allow backorder' , type: 'checkbox' , align: 'center', value: <%= raw Caboose.json(v.allow_backorder ) %>, width: 50, fixed_placeholder: false } <% end %>
|
107
118
|
]
|
108
119
|
});
|
109
|
-
<% end %>
|
110
|
-
|
111
|
-
<% if @highlight_variant_id %>
|
112
|
-
$("#variant_<%= @highlight_variant_id %>_row").highlight();
|
113
|
-
<% end %>
|
120
|
+
<% end %>
|
114
121
|
});
|
115
122
|
|
116
123
|
var modal = false;
|