@@ -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()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.communities-show {
|
.communities-show {
|
||||||
.button.disabled, .button[disabled] {
|
.button.disabled,
|
||||||
|
.button[disabled] {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.document-form {
|
.document-form {
|
||||||
|
|
||||||
.document .file-name {
|
.document .file-name {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-bar-placeholder {
|
.progress-bar-placeholder {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.document .loading-bar.errors {
|
.document .loading-bar.errors {
|
||||||
margin-top: $line-height * 2;
|
margin-top: $line-height * 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.document {
|
.document {
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
@@ -24,7 +28,7 @@
|
|||||||
background-color: $light-gray;
|
background-color: $light-gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.document_ajax_attachment[type=file]{
|
.js-document-attachment {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -312,10 +312,6 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-max-width {
|
|
||||||
max-width: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button.float-right ~ .button.float-right {
|
.button.float-right ~ .button.float-right {
|
||||||
margin: 0 $line-height / 2;
|
margin: 0 $line-height / 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -769,7 +769,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.document-form{
|
.document-form {
|
||||||
max-width: 75rem;
|
max-width: 75rem;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<div class="off-canvas-content" data-off-canvas-content>
|
<div class="off-canvas-content" data-off-canvas-content>
|
||||||
<%= render 'layouts/admin_header' %>
|
<%= render 'layouts/admin_header' %>
|
||||||
|
|
||||||
<div class="no-margin-top row no-max-width collapse" data-equalizer>
|
<div class="no-margin-top row expanded collapse" data-equalizer>
|
||||||
<div class="small-12 medium-3 column" data-equalizer-watch>
|
<div class="small-12 medium-3 column" data-equalizer-watch>
|
||||||
|
|
||||||
<div class="show-for-small-only">
|
<div class="show-for-small-only">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="no-margin-top row no-max-width collapse">
|
<main class="no-margin-top row expanded collapse">
|
||||||
<div class="small-12 medium-3 column">
|
<div class="small-12 medium-3 column">
|
||||||
<%= render "/management/menu" %>
|
<%= render "/management/menu" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user