Fix small visual bugs

This commit is contained in:
aignatov-bio 2020-01-23 13:12:58 +01:00
parent 9e4ae525e6
commit 4395a7cc6b
9 changed files with 45 additions and 18 deletions

View file

@ -8,7 +8,7 @@ $.fn.dataTable.render.editRowName = function(formId, cell) {
let text = $cell.find('a').first().text();
$cell.html(`
<div class="sci-input-container text-field">
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
form="${formId}"
type="text"
@ -49,7 +49,7 @@ $.fn.dataTable.render.editRepositoryTextValue = function(formId, columnId, cell)
let text = $cell.text();
$cell.html(`
<div class="sci-input-container text-field">
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
form="${formId}"
type="text"
@ -141,7 +141,7 @@ $.fn.dataTable.render.editRepositoryNumberValue = function(formId, columnId, cel
if (!number) number = '';
$cell.html(`
<div class="sci-input-container text-field">
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
form="${formId}"
type="text"

View file

@ -5,7 +5,7 @@ GLOBAL_CONSTANTS DateTimeHelper
$.fn.dataTable.render.newRowName = function(formId, $cell) {
$cell.html(`
<div class="sci-input-container text-field">
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
form="${formId}"
type="text"
@ -39,7 +39,7 @@ $.fn.dataTable.render.newRepositoryAssetValue = function(formId, columnId, $cell
$.fn.dataTable.render.newRepositoryTextValue = function(formId, columnId, $cell) {
$cell.html(`
<div class="sci-input-container text-field">
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
form="${formId}"
type="text"
@ -68,7 +68,7 @@ $.fn.dataTable.render.newRepositoryNumberValue = function(formId, columnId, $cel
let decimals = $header.data('metadata-decimals');
$cell.html(`
<div class="sci-input-container text-field">
<div class="sci-input-container text-field error-icon">
<input class="sci-input-field"
form="${formId}"
type="text"
@ -104,7 +104,3 @@ $.fn.dataTable.render.newRepositoryDateRangeValue = function(formId, columnId, $
$.fn.dataTable.render.newRepositoryTimeRangeValue = function(formId, columnId, $cell) {
DateTimeHelper.initDateTimeRangeEditMode(formId, columnId, $cell, 'timeonly', 'RepositoryTimeRangeValue');
};
$.fn.dataTable.render.newRepositoryCheckboxValue = function(formId, columnId) {
return '';
};

View file

@ -448,6 +448,11 @@ var RepositoryDatatable = (function(global) {
return "<a href='" + row.recordInfoUrl + "'"
+ "class='record-info-link'>" + data + '</a>';
}
}, {
// Added on column
targets: 4,
class: 'added-on',
visible: true
}, {
targets: '_all',
render: function(data) {

View file

@ -259,9 +259,12 @@
width: 200px;
.file-upload-button {
align-items: center;
background-color: $color-white;
border: solid 1px;
border-radius: 3px;
border: $border-default;
border-radius: $border-radius-default;
cursor: pointer;
display: flex;
height: 34px;
line-height: 32px;
position: relative;
@ -272,7 +275,11 @@
}
label {
color: $color-silver-chalice;
cursor: pointer;
display: inline-block;
margin-bottom: 0;
white-space: nowrap;
}
&:hover {

View file

@ -62,6 +62,11 @@
}
}
// Added on
.added-on {
white-space: nowrap;
}
// Checklists
.checklist-dropdown {
.dropdown-menu {

View file

@ -36,7 +36,6 @@ input[type="checkbox"].sci-checkbox {
line-height: calc(var(--sci-checkbox-size) - 2px);
position: absolute;
text-align: center;
top: 1px;
transition: .2s;
width: var(--sci-checkbox-size);
}
@ -54,6 +53,18 @@ input[type="checkbox"].sci-checkbox {
}
}
&:indeterminate + .sci-checkbox-label {
&::after {
content: '';
background: $color-volcano;
height: calc(var(--sci-checkbox-size) - 6px);
left: 3px;
position: absolute;
top: 3px;
width: calc(var(--sci-checkbox-size) - 6px);
}
}
&:disabled + .sci-checkbox-label {
&::before {
background: $color-alto;

View file

@ -64,7 +64,7 @@
&.error {
&::after {
@include font-awesome;
bottom: 0;
top: 0;
line-height: 36px;
position: absolute;
right: 5px;
@ -106,8 +106,8 @@
}
}
.success-icon,
.error-icon {
&.success-icon,
&.error-icon {
.sci-input-field {
padding: 0 30px 0 10px;
}

View file

@ -49,8 +49,10 @@ module RepositoryDatatableHelper
"<span class='circle-icon disabled'>&nbsp;</span>"
end
elsif record.assigned_my_modules_count.positive?
tooltip = "#{record.assigned_my_modules_count} tasks,&#10;#{record.assigned_experiments_count} " \
"experiments,&#10;#{record.assigned_projects_count} projects"
tooltip = t('repositories.table.assigned_tooltip',
tasks: record.assigned_my_modules_count,
experiments: record.assigned_experiments_count,
projects: record.assigned_projects_count)
"<div class='assign-counter-container' title='#{tooltip}'>"\
"<span class='assign-counter has-assigned'>#{record.assigned_my_modules_count}</span></div>"

View file

@ -1051,6 +1051,7 @@ en:
table:
id: 'ID'
assigned: "Assigned"
assigned_tooltip: "%{tasks} tasks in &#10;%{experiments} experiments,&#10;%{projects} projects"
row_name: "Name"
added_on: "Added on"
added_by: "Added by"