forked from spree/spree
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix properties population when prototype selected and order them by p…
…osition rather then alphabetically. Fixes spree#2389
- Loading branch information
Showing
3 changed files
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<% @prototype_properties.each do |prop| %> | ||
<% @prototype_properties.sort_by{ |prop| -prop[:id] }.each do |prop| %> | ||
$("a.add_fields").click(); | ||
$(".product_property.fields:last input:first").val("<%= prop.name %>"); | ||
$(".product_property.fields:first input:first").val("<%= prop.name %>"); | ||
<% end %> |