Merge pull request #2323 from aignatov-bio/ai-sci-4255-disable-column-manage-button-in-edit-mode

Disable column manage button in edit mode [SCI-4255]
This commit is contained in:
Alex Kriuchykhin 2020-01-16 16:37:29 +01:00 committed by GitHub
commit 4a96fa2648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

View file

@ -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);

View file

@ -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 {

View file

@ -137,6 +137,11 @@
&.btn-primary {
background: $color-alto;
&:hover {
border: $border-tertiary;
color: $color-silver-chalice;
}
}
&.btn-secondary,

View file

@ -55,7 +55,7 @@
<div class="repository-cog dropdown">
<button id="repository-acitons-dropdown"
class="btn btn-default"
class="btn btn-secondary"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
@ -121,14 +121,14 @@
<% if can_manage_repository_rows?(@repository) %>
<span id="editDeleteCopy" data-toggle="buttons" style="display:none">
<%if @display_edit_button %>
<button type="button" class="btn btn-default editAdd" id="editRepositoryRecord" onclick="onClickEdit()" disabled>
<button type="button" class="btn btn-light editAdd" id="editRepositoryRecord" onclick="onClickEdit()" disabled>
<span class="fas fa-pencil-alt"></span>
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
</button>
<% end %>
<%if @display_delete_button %>
<button type="button" class="btn btn-default"
<button type="button" class="btn btn-light"
id="deleteRepositoryRecordsButton" onclick="onClickDelete()" disabled>
<span class="fas fa-trash"></span>
<span class="hidden-xs-custom"><%= t'repositories.delete_record' %></span>
@ -137,7 +137,7 @@
<% end %>
<%if @display_duplicate_button %>
<button type="button" class="btn btn-default copyRow" id="copyRepositoryRecords" onclick="onClickCopyRepositoryRecords()" disabled>
<button type="button" class="btn btn-light copyRow" id="copyRepositoryRecords" onclick="onClickCopyRepositoryRecords()" disabled>
<span class="fas fa-copy"></span>
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
</button>
@ -149,7 +149,7 @@
<span class="fas fa-save"></span>
<%= t("repositories.save_record") %>
</button>
<button type="button" class="btn btn-default" id="cancelSave">
<button type="button" class="btn btn-light" id="cancelSave">
<span class="fas fa-times-circle"></span>
<%= t("repositories.cancel_save") %>
</button>