mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Disable column manage button in edit mode
This commit is contained in:
parent
33fe956cf3
commit
b7fe8b71c1
4 changed files with 13 additions and 10 deletions
|
@ -48,6 +48,7 @@ var RepositoryDatatable = (function(global) {
|
||||||
if (currentMode === 'viewMode') {
|
if (currentMode === 'viewMode') {
|
||||||
$(TABLE_WRAPPER_ID).removeClass('editing');
|
$(TABLE_WRAPPER_ID).removeClass('editing');
|
||||||
$('#saveCancel').hide();
|
$('#saveCancel').hide();
|
||||||
|
$('.manage-repo-column-index').prop('disabled', false);
|
||||||
$('#addRepositoryRecord').prop('disabled', false);
|
$('#addRepositoryRecord').prop('disabled', false);
|
||||||
$('.dataTables_length select').prop('disabled', false);
|
$('.dataTables_length select').prop('disabled', false);
|
||||||
$('#repository-acitons-dropdown').prop('disabled', false);
|
$('#repository-acitons-dropdown').prop('disabled', false);
|
||||||
|
@ -80,6 +81,7 @@ var RepositoryDatatable = (function(global) {
|
||||||
$(TABLE_WRAPPER_ID).addClass('editing');
|
$(TABLE_WRAPPER_ID).addClass('editing');
|
||||||
$('#editDeleteCopy').hide();
|
$('#editDeleteCopy').hide();
|
||||||
$('#saveCancel').show();
|
$('#saveCancel').show();
|
||||||
|
$('.manage-repo-column-index').prop('disabled', true);
|
||||||
$('#repository-acitons-dropdown').prop('disabled', true);
|
$('#repository-acitons-dropdown').prop('disabled', true);
|
||||||
$('.dataTables_length select').prop('disabled', true);
|
$('.dataTables_length select').prop('disabled', true);
|
||||||
$('#addRepositoryRecord').prop('disabled', true);
|
$('#addRepositoryRecord').prop('disabled', true);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
.repository-show {
|
.repository-show {
|
||||||
animation-timing-function: $timing-function-sharp;
|
animation-timing-function: $timing-function-sharp;
|
||||||
height: calc(100vh - 51px);
|
height: calc(100vh - 66px);
|
||||||
left: var(--repository-sidebar-margin);
|
left: var(--repository-sidebar-margin);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
|
@ -363,10 +363,6 @@
|
||||||
.view-only-label {
|
.view-only-label {
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-button {
|
.sidebar-button {
|
||||||
|
|
|
@ -137,6 +137,11 @@
|
||||||
|
|
||||||
&.btn-primary {
|
&.btn-primary {
|
||||||
background: $color-alto;
|
background: $color-alto;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: $border-tertiary;
|
||||||
|
color: $color-silver-chalice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.btn-secondary,
|
&.btn-secondary,
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
<div class="repository-cog dropdown">
|
<div class="repository-cog dropdown">
|
||||||
<button id="repository-acitons-dropdown"
|
<button id="repository-acitons-dropdown"
|
||||||
class="btn btn-default"
|
class="btn btn-secondary"
|
||||||
type="button"
|
type="button"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
|
@ -121,14 +121,14 @@
|
||||||
<% if can_manage_repository_rows?(@repository) %>
|
<% if can_manage_repository_rows?(@repository) %>
|
||||||
<span id="editDeleteCopy" data-toggle="buttons" style="display:none">
|
<span id="editDeleteCopy" data-toggle="buttons" style="display:none">
|
||||||
<%if @display_edit_button %>
|
<%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="fas fa-pencil-alt"></span>
|
||||||
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
|
<span class="hidden-xs-custom"><%= t("repositories.edit_record") %></span>
|
||||||
</button>
|
</button>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%if @display_delete_button %>
|
<%if @display_delete_button %>
|
||||||
<button type="button" class="btn btn-default"
|
<button type="button" class="btn btn-light"
|
||||||
id="deleteRepositoryRecordsButton" onclick="onClickDelete()" disabled>
|
id="deleteRepositoryRecordsButton" onclick="onClickDelete()" disabled>
|
||||||
<span class="fas fa-trash"></span>
|
<span class="fas fa-trash"></span>
|
||||||
<span class="hidden-xs-custom"><%= t'repositories.delete_record' %></span>
|
<span class="hidden-xs-custom"><%= t'repositories.delete_record' %></span>
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%if @display_duplicate_button %>
|
<%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="fas fa-copy"></span>
|
||||||
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
|
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
<span class="fas fa-save"></span>
|
<span class="fas fa-save"></span>
|
||||||
<%= t("repositories.save_record") %>
|
<%= t("repositories.save_record") %>
|
||||||
</button>
|
</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>
|
<span class="fas fa-times-circle"></span>
|
||||||
<%= t("repositories.cancel_save") %>
|
<%= t("repositories.cancel_save") %>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in a new issue