renames js class
This commit is contained in:
@@ -6,7 +6,7 @@ App.Documentable =
|
|||||||
|
|
||||||
initializeDirectUploads: ->
|
initializeDirectUploads: ->
|
||||||
|
|
||||||
$('input.document_ajax_attachment[type=file]').fileupload
|
$('input.js-document-attachment[type=file]').fileupload
|
||||||
|
|
||||||
paramName: "document[attachment]"
|
paramName: "document[attachment]"
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ App.Documentable =
|
|||||||
return
|
return
|
||||||
|
|
||||||
initializeInterface: ->
|
initializeInterface: ->
|
||||||
input_files = $('input.document_ajax_attachment[type=file]')
|
input_files = $('input.js-document-attachment[type=file]')
|
||||||
|
|
||||||
$.each input_files, (index, file) ->
|
$.each input_files, (index, file) ->
|
||||||
wrapper = $(file).parent()
|
wrapper = $(file).parent()
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
background-color: $light-gray;
|
background-color: $light-gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.document_ajax_attachment[type=file]{
|
.js-document-attachment {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ module DocumentsHelper
|
|||||||
def render_attachment(document, index)
|
def render_attachment(document, index)
|
||||||
html = file_field_tag :attachment,
|
html = file_field_tag :attachment,
|
||||||
accept: accepted_content_types_extensions(document.documentable_type.constantize),
|
accept: accepted_content_types_extensions(document.documentable_type.constantize),
|
||||||
class: 'document_ajax_attachment',
|
class: 'js-document-attachment',
|
||||||
data: {
|
data: {
|
||||||
url: document_direct_upload_url(document),
|
url: document_direct_upload_url(document),
|
||||||
cached_attachment_input_field: document_nested_field_id(document, index, :cached_attachment),
|
cached_attachment_input_field: document_nested_field_id(document, index, :cached_attachment),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<%= file_field_tag :attachment,
|
<%= file_field_tag :attachment,
|
||||||
accept: accepted_content_types_extensions(document.documentable.class),
|
accept: accepted_content_types_extensions(document.documentable.class),
|
||||||
label: false,
|
label: false,
|
||||||
class: 'document_ajax_attachment',
|
class: 'js-document-attachment',
|
||||||
data: {
|
data: {
|
||||||
url: upload_documents_url(documentable_type: document.documentable_type, documentable_id: document.documentable_id),
|
url: upload_documents_url(documentable_type: document.documentable_type, documentable_id: document.documentable_id),
|
||||||
cached_attachment_input_field: "document_cached_attachment",
|
cached_attachment_input_field: "document_cached_attachment",
|
||||||
|
|||||||
Reference in New Issue
Block a user