Sha256: eb3bd5154d1d772a6a0314c406892d2e8373e17686565922f721a90599866b8a
Contents?: true
Size: 1.03 KB
Versions: 60
Compression:
Stored size: 1.03 KB
Contents
$(document).on 's3_file_added', (event, file) -> obj = $(event.target) obj.closest('.error').removeClass('error') obj.parent().siblings('.help-inline,.inline-errors').remove() $(document).on 's3_uploads_complete', (_, uploader) -> uploader.closest('.asset-box-input').find('.filter-attachments').val('') $(document).on 's3_upload_failed', (_, uploader, content) -> uploader.closest('.asset-box-input').find('.filter-attachments').val('') alert("An error occurred while uploading #{content.filename}.\n\nThe returned error message is: '#{content.error_thrown}'\n\nPlease try again.") $(document).on 'click', 'a.attachment-remove', (event) -> event.preventDefault() $attachmentDiv = $(event.target).closest('.attachment') $attachmentDiv.find('input.asset-box-remove').first().val(1) $attachmentDiv.hide() # Correct the attachment count $assetBoxInput = $attachmentDiv.closest('div.asset-box-input') count = parseInt($assetBoxInput.attr('data-attachment-count'), 10) $assetBoxInput.attr('data-attachment-count', count - 1)
Version data entries
60 entries across 60 versions & 1 rubygems