From b291547bae21001bb6845f2dfbc4cae04bb49b79 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 20 Sep 2017 19:07:08 +0200 Subject: [PATCH 1/3] replaces unnecessary css class --- app/assets/stylesheets/layout.scss | 4 ---- app/views/layouts/admin.html.erb | 2 +- app/views/layouts/management.html.erb | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 7e41026f1..9ecf74442 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -312,10 +312,6 @@ a { } } -.no-max-width { - max-width: none; -} - .button.float-right ~ .button.float-right { margin: 0 $line-height / 2; } diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index c618de6c4..c0e36ba0e 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -30,7 +30,7 @@
<%= render 'layouts/admin_header' %> -
+
diff --git a/app/views/layouts/management.html.erb b/app/views/layouts/management.html.erb index 21367d8ab..f92bc8dfc 100644 --- a/app/views/layouts/management.html.erb +++ b/app/views/layouts/management.html.erb @@ -45,7 +45,7 @@
-
+
<%= render "/management/menu" %>
From 6642d47f4c737e40bc3777fa14be4e7c14c33d20 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 20 Sep 2017 19:26:43 +0200 Subject: [PATCH 2/3] fixes scss lint errors --- app/assets/stylesheets/community.scss | 3 ++- app/assets/stylesheets/datepicker_overrides.scss | 12 ++++++------ app/assets/stylesheets/documentable.scss | 4 ++++ app/assets/stylesheets/participation.scss | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/community.scss b/app/assets/stylesheets/community.scss index 0dddf4cdb..c06d5c5d2 100644 --- a/app/assets/stylesheets/community.scss +++ b/app/assets/stylesheets/community.scss @@ -1,5 +1,6 @@ .communities-show { - .button.disabled, .button[disabled] { + .button.disabled, + .button[disabled] { pointer-events: none; } diff --git a/app/assets/stylesheets/datepicker_overrides.scss b/app/assets/stylesheets/datepicker_overrides.scss index 79414ad99..190784d15 100644 --- a/app/assets/stylesheets/datepicker_overrides.scss +++ b/app/assets/stylesheets/datepicker_overrides.scss @@ -44,18 +44,18 @@ position: absolute; top: 4px; width: rem-calc(30); - + &:hover { - text-decoration: none; + text-decoration: none; } } - + .ui-datepicker-prev::after { - content: '\62'; + content: '\62'; } - + .ui-datepicker-next::after { - content: '\63'; + content: '\63'; } table { diff --git a/app/assets/stylesheets/documentable.scss b/app/assets/stylesheets/documentable.scss index 2aa015a14..e4b23f5dc 100644 --- a/app/assets/stylesheets/documentable.scss +++ b/app/assets/stylesheets/documentable.scss @@ -3,18 +3,22 @@ } .document-form { + .document .file-name { margin-top: 0; } + .progress-bar-placeholder { margin-bottom: 15px; } + .document .loading-bar.errors { margin-top: $line-height * 2; } } .document { + .button { font-weight: normal; } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 8c6fc5415..3d90ee128 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -251,7 +251,7 @@ .spending-proposal-form, .document-form, .topic-new, -.topic-form { +.topic-form { .icon-debates, .icon-proposals, @@ -769,7 +769,7 @@ display: none; } -.document-form{ +.document-form { max-width: 75rem; margin-left: auto; margin-right: auto; From b43e4642927d856856cce85fe970eddbab8d3d03 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 20 Sep 2017 19:27:11 +0200 Subject: [PATCH 3/3] renames js class --- app/assets/javascripts/documentable.js.coffee | 4 ++-- app/assets/stylesheets/documentable.scss | 2 +- app/helpers/documents_helper.rb | 2 +- app/views/documents/_plain_fields.html.erb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/documentable.js.coffee b/app/assets/javascripts/documentable.js.coffee index 8683ce5e2..4c354e5a6 100644 --- a/app/assets/javascripts/documentable.js.coffee +++ b/app/assets/javascripts/documentable.js.coffee @@ -6,7 +6,7 @@ App.Documentable = initializeDirectUploads: -> - $('input.document_ajax_attachment[type=file]').fileupload + $('input.js-document-attachment[type=file]').fileupload paramName: "document[attachment]" @@ -38,7 +38,7 @@ App.Documentable = return initializeInterface: -> - input_files = $('input.document_ajax_attachment[type=file]') + input_files = $('input.js-document-attachment[type=file]') $.each input_files, (index, file) -> wrapper = $(file).parent() diff --git a/app/assets/stylesheets/documentable.scss b/app/assets/stylesheets/documentable.scss index e4b23f5dc..70629bb27 100644 --- a/app/assets/stylesheets/documentable.scss +++ b/app/assets/stylesheets/documentable.scss @@ -28,7 +28,7 @@ background-color: $light-gray; } - input.document_ajax_attachment[type=file]{ + .js-document-attachment { display: none; } diff --git a/app/helpers/documents_helper.rb b/app/helpers/documents_helper.rb index 72ebbf021..cc39f7857 100644 --- a/app/helpers/documents_helper.rb +++ b/app/helpers/documents_helper.rb @@ -54,7 +54,7 @@ module DocumentsHelper def render_attachment(document, index) html = file_field_tag :attachment, accept: accepted_content_types_extensions(document.documentable_type.constantize), - class: 'document_ajax_attachment', + class: 'js-document-attachment', data: { url: document_direct_upload_url(document), cached_attachment_input_field: document_nested_field_id(document, index, :cached_attachment), diff --git a/app/views/documents/_plain_fields.html.erb b/app/views/documents/_plain_fields.html.erb index e45a5c238..c911a4e7f 100644 --- a/app/views/documents/_plain_fields.html.erb +++ b/app/views/documents/_plain_fields.html.erb @@ -13,7 +13,7 @@ <%= file_field_tag :attachment, accept: accepted_content_types_extensions(document.documentable.class), label: false, - class: 'document_ajax_attachment', + class: 'js-document-attachment', data: { url: upload_documents_url(documentable_type: document.documentable_type, documentable_id: document.documentable_id), cached_attachment_input_field: "document_cached_attachment",