From b7fe8b71c1407126a8a2e5c15174cc56bd47bcf6 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 16 Jan 2020 15:59:57 +0100 Subject: [PATCH] Disable column manage button in edit mode --- .../javascripts/repositories/repository_datatable.js | 2 ++ app/assets/stylesheets/repositories.scss | 6 +----- .../stylesheets/shared_styles/elements/buttons.scss | 5 +++++ app/views/repositories/show.html.erb | 10 +++++----- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 770210543..0de487669 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -48,6 +48,7 @@ var RepositoryDatatable = (function(global) { if (currentMode === 'viewMode') { $(TABLE_WRAPPER_ID).removeClass('editing'); $('#saveCancel').hide(); + $('.manage-repo-column-index').prop('disabled', false); $('#addRepositoryRecord').prop('disabled', false); $('.dataTables_length select').prop('disabled', false); $('#repository-acitons-dropdown').prop('disabled', false); @@ -80,6 +81,7 @@ var RepositoryDatatable = (function(global) { $(TABLE_WRAPPER_ID).addClass('editing'); $('#editDeleteCopy').hide(); $('#saveCancel').show(); + $('.manage-repo-column-index').prop('disabled', true); $('#repository-acitons-dropdown').prop('disabled', true); $('.dataTables_length select').prop('disabled', true); $('#addRepositoryRecord').prop('disabled', true); diff --git a/app/assets/stylesheets/repositories.scss b/app/assets/stylesheets/repositories.scss index 7f76c270c..946c89f8f 100644 --- a/app/assets/stylesheets/repositories.scss +++ b/app/assets/stylesheets/repositories.scss @@ -9,7 +9,7 @@ .repository-show { animation-timing-function: $timing-function-sharp; - height: calc(100vh - 51px); + height: calc(100vh - 66px); left: var(--repository-sidebar-margin); margin: 0; padding: 0 32px; @@ -363,10 +363,6 @@ .view-only-label { opacity: .6; } - - .btn { - border: 0; - } } .sidebar-button { diff --git a/app/assets/stylesheets/shared_styles/elements/buttons.scss b/app/assets/stylesheets/shared_styles/elements/buttons.scss index 16410fb83..38bf3a2c6 100644 --- a/app/assets/stylesheets/shared_styles/elements/buttons.scss +++ b/app/assets/stylesheets/shared_styles/elements/buttons.scss @@ -137,6 +137,11 @@ &.btn-primary { background: $color-alto; + + &:hover { + border: $border-tertiary; + color: $color-silver-chalice; + } } &.btn-secondary, diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 4164e90d9..8caf7cf0d 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -55,7 +55,7 @@