mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-11 14:45:59 +08:00
Prevent editing 2 items
This commit is contained in:
parent
54c78cf4d1
commit
38eaf19dde
5 changed files with 89 additions and 54 deletions
|
|
@ -48,6 +48,7 @@ var RepositoryDatatable = (function(global) {
|
|||
// Enable/disable edit button
|
||||
function updateButtons() {
|
||||
if (currentMode === 'viewMode') {
|
||||
$(TABLE_WRAPPER).removeClass('editing')
|
||||
$('#saveCancel').hide();
|
||||
$('#editDeleteCopy').show();
|
||||
$('#addRepositoryRecord').prop('disabled', false);
|
||||
|
|
@ -76,6 +77,7 @@ var RepositoryDatatable = (function(global) {
|
|||
$('#unassignRepositoryRecords').prop('disabled', false);
|
||||
}
|
||||
} else if (currentMode === 'editMode') {
|
||||
$(TABLE_WRAPPER).addClass('editing')
|
||||
$('#editDeleteCopy').hide();
|
||||
$('#saveCancel').show();
|
||||
$('#repository-acitons-dropdown').prop('disabled', true);
|
||||
|
|
@ -534,6 +536,7 @@ var RepositoryDatatable = (function(global) {
|
|||
visible: true,
|
||||
searchable: false,
|
||||
orderable: true,
|
||||
className: 'assigned-column',
|
||||
sWidth: '1%',
|
||||
render: function(data) {
|
||||
let content = data;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
@import "my_modules/protocols/*";
|
||||
@import "my_modules/results/*";
|
||||
@import "protocols/*";
|
||||
@import "repository/*";
|
||||
@import "repository_columns/*";
|
||||
@import "settings/*";
|
||||
@import "shared/*";
|
||||
@import "themes/*";
|
||||
|
|
|
|||
|
|
@ -39,38 +39,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.repository-table {
|
||||
margin-top: 20px;
|
||||
|
||||
// Datatables generated name
|
||||
.dataTables_length {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
}
|
||||
|
||||
// hack only for firefox
|
||||
@-moz-document url-prefix() {
|
||||
input.form-control[type="file"] {
|
||||
font-size: 13px;
|
||||
height: auto;
|
||||
padding: 3px 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.repository-status-value-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.dropdown-selector-container {
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.repository-cog {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,54 @@
|
|||
@import "constants";
|
||||
|
||||
.repository-table {
|
||||
margin-top: 20px;
|
||||
|
||||
// Datatables generated name
|
||||
.dataTables_length {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
}
|
||||
|
||||
// hack only for firefox
|
||||
@-moz-document url-prefix() {
|
||||
input.form-control[type="file"] {
|
||||
font-size: 13px;
|
||||
height: auto;
|
||||
padding: 3px 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.repository-status-value-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.dropdown-selector-container {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
|
||||
// Cells
|
||||
|
||||
|
||||
// Assigned
|
||||
|
||||
.assigned-column {
|
||||
.repository-row-edit-icon {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.circle-icon {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
// Checklists
|
||||
.checklist-dropdown {
|
||||
.dropdown-menu {
|
||||
|
|
@ -27,4 +73,42 @@
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
||||
tbody {
|
||||
tr:hover {
|
||||
background-color: $color-concrete;
|
||||
|
||||
.assigned-column {
|
||||
.repository-row-edit-icon {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.circle-icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editing {
|
||||
border: 1px solid;
|
||||
}
|
||||
}
|
||||
|
||||
&.editing {
|
||||
tbody {
|
||||
tr:hover {
|
||||
.assigned-column {
|
||||
.repository-row-edit-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.circle-icon {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,28 +83,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.repository-table {
|
||||
tbody {
|
||||
tr:hover {
|
||||
background-color: $color-concrete;
|
||||
}
|
||||
|
||||
.editing {
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.repository-row-edit-icon {
|
||||
opacity: 0;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
tr:hover .repository-row-edit-icon {
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.new-input-file-field-div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue