Sha256: 2f628869d20bb3f9e62e9ce82bb8bfc86f9ddbc891c467d324ce83acd994822a
Contents?: true
Size: 586 Bytes
Versions: 13
Compression:
Stored size: 586 Bytes
Contents
$ -> # work around the nested form ugliness $("form input:file").parents('.fields').hide() # deleting a picture $(".product_pictures .actions .delete").on "click", -> $("#delete_picture_" + $(this).attr("data-action-id")).trigger "click" $(this).parent().parent().hide "fast" false # making picutures sortable $(".product_pictures").sortable(update: (e, ui) -> orders = {} $(".product_pictures li").each (index, el) -> orders[index] = $(el).attr("data-id") $("#product_pictures_order").attr "value", $.toJSON(orders) ).disableSelection()
Version data entries
13 entries across 13 versions & 1 rubygems