Sha256: f8928cb924cb585e28061a0ad9ab7352e1decdcc469c1e34194b88375cc376f0
Contents?: true
Size: 861 Bytes
Versions: 11
Compression:
Stored size: 861 Bytes
Contents
Locomotive.Views.Shared ||= {} class Locomotive.Views.Shared.BulkDeleteView extends Backbone.View el: '.main' events: 'change .list-main-checkbox': 'tickOrUntickAll' 'change .item input[type=checkbox]': 'tickOrUntick' tickOrUntickAll: (event) -> @$('.item input[type=checkbox]').prop('checked', event.target.checked) @refreshBulkDestroyFormState() tickOrUntick: (event) -> @$('.list-main-checkbox').prop('checked', false) @refreshBulkDestroyFormState() refreshBulkDestroyFormState: -> ids = [] @$('.item input[type=checkbox]:checked').each(() -> ids.push($(this).val())) @$('.bulk-destroy-action input[name=ids]').val(ids.join(',')) if @$('.item input[type=checkbox]:checked').size() > 0 @$('.bulk-destroy-action').removeClass('hidden') else @$('.bulk-destroy-action').addClass('hidden')
Version data entries
11 entries across 11 versions & 1 rubygems