Some renaming and cleaning
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
App.Imageable =
|
||||
|
||||
initialize: ->
|
||||
inputFiles = $('input.direct_upload_image_attachment[type=file]')
|
||||
inputFiles = $('input.js-document-attachment[type=file]')
|
||||
|
||||
$.each inputFiles, (index, input) ->
|
||||
App.Imageable.initializeDirectUploadInput(input)
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
background-color: $light-gray;
|
||||
}
|
||||
|
||||
input.direct_upload_image_attachment[type=file],
|
||||
.js-document-attachment{
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
background-color: $light-gray;
|
||||
}
|
||||
|
||||
input.direct_upload_image_attachment[type=file],
|
||||
input.direct_upload_document_attachment[type=file] {
|
||||
.js-image-attachment{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ module ImagesHelper
|
||||
def render_image_attachment(image)
|
||||
html = file_field_tag :attachment,
|
||||
accept: imageable_accepted_content_types_extensions,
|
||||
class: 'direct_upload_image_attachment',
|
||||
class: 'js-document-attachment',
|
||||
data: {
|
||||
url: image_direct_upload_url(image),
|
||||
cached_attachment_input_field: image_nested_field_id(image, :cached_attachment),
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<%= f.file_field :attachment,
|
||||
accept: imageable_accepted_content_types_extensions,
|
||||
label: false,
|
||||
class: 'direct_upload_image_attachment',
|
||||
class: 'js-document-attachment',
|
||||
data: {
|
||||
url: direct_uploads_url("direct_upload[resource_type]": @image.imageable_type,
|
||||
"direct_upload[resource_id]": @image.imageable_id,
|
||||
|
||||
Reference in New Issue
Block a user