Reorganised product form
Inline vriant editing

- variant edit form appears inline in the variant table
- variant action URLs fixed
Moved variant table rows to their own partial
Editing variants for product

- product accepts_nested-attributes_for variants
- merged variant partial and variant form partial (not happy with this as a final result)
- remove variants list from HTML unless suer can admin variants
- simplified variants/edit.js.erb to just hide/show the form for each variant
- reverted variants/edit.html.erb, so everything works again if you go to the old route for editing variants
Improved variant editing

- add variants
- variants can be opened for editing
- when variant fields are updated, also update corresponding elements so the fields will be correct when the edit section is closed again
- modified link_to_add_field helper method to handle elements other than tr (in this case, we're using tbody as a wrapper for each variant)
-
Improved browser title for product editing page
Manage properties from product form

- product form fieldset for properties (invisible until toggled by properties button)
- _propduct_properties partial (largely duplicates product_properties/index.html, but I'm keeping the latter around for now)
- set up properties in product controller
- added id passthrough to link_to_add_fields helper method, and specify id in select.js.erb, so we don't add fields to other parts of the form
- adjusted link_to_delete in _product_property_fields partial to specify URL
- removed unused _properties_form partial
- moved variants code from product form to partials _variants and master_variant_fields
Adjusted layout for product form

- more consistent HTML for inline toolbars
- tweaked column widths for variants
- moved Manage Variants button to product details section (not sure about this, may move it back)
- moved images section to a partial
Moved Stock and SEO fields to own partials
Removed links from product tabs
JS improvements

- moved option_types to own partial
- moved variants table to own partial
- separate JS method for adding variants
- reorder variants
- show delete/active variants
- improved new variant JS
Update variants table when option types change

- product_slug data in product edit view
- updateOptionTypes() and updateVaraintsTable() functions in admin.js.erb
- update method in products controller checks for XHR request (there's probably a better way to do this)
- index method in variants controller returns variants table
- cosmetic improvements to variants table
Mark variants for deletion

- variants table style and layout improvements
- mark variants for deletion when product form is submitted instead of deleting immediately
Reorganised product form
Inline vriant editing

- variant edit form appears inline in the variant table
- variant action URLs fixed
Moved variant table rows to their own partial
Editing variants for product

- product accepts_nested-attributes_for variants
- merged variant partial and variant form partial (not happy with this as a final result)
- remove variants list from HTML unless suer can admin variants
- simplified variants/edit.js.erb to just hide/show the form for each variant
- reverted variants/edit.html.erb, so everything works again if you go to the old route for editing variants
Improved variant editing

- add variants
- variants can be opened for editing
- when variant fields are updated, also update corresponding elements so the fields will be correct when the edit section is closed again
- modified link_to_add_field helper method to handle elements other than tr (in this case, we're using tbody as a wrapper for each variant)
-
Manage properties from product form

- product form fieldset for properties (invisible until toggled by properties button)
- _propduct_properties partial (largely duplicates product_properties/index.html, but I'm keeping the latter around for now)
- set up properties in product controller
- added id passthrough to link_to_add_fields helper method, and specify id in select.js.erb, so we don't add fields to other parts of the form
- adjusted link_to_delete in _product_property_fields partial to specify URL
- removed unused _properties_form partial
- moved variants code from product form to partials _variants and master_variant_fields
Adjusted layout for product form

- more consistent HTML for inline toolbars
- tweaked column widths for variants
- moved Manage Variants button to product details section (not sure about this, may move it back)
- moved images section to a partial