From dc791741604f6d864bb36386811875f012b40427 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Mon, 27 Jan 2020 14:39:45 +0100 Subject: [PATCH] Make less opacity when editing or adding row --- app/assets/javascripts/repositories/row_editor.js | 2 ++ app/assets/stylesheets/repository/repository_table.scss | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/app/assets/javascripts/repositories/row_editor.js b/app/assets/javascripts/repositories/row_editor.js index 276476ad3..2b282be84 100644 --- a/app/assets/javascripts/repositories/row_editor.js +++ b/app/assets/javascripts/repositories/row_editor.js @@ -128,6 +128,7 @@ var RepositoryDatatableRowEditor = (function() { // First two columns are always present and visible $row.append(rowForm); + $row.addClass('editing'); $row.append($(TABLE_CELL)); $(TABLE.table().node()).find('tbody').prepend($row); @@ -177,6 +178,7 @@ var RepositoryDatatableRowEditor = (function() { `); $row.find('td').first().append(rowForm); + $row.addClass('editing'); TABLE.cells(row.index(), row.columns().eq(0)).every(function() { let $header = $(TABLE.columns(this.index().column).header()); diff --git a/app/assets/stylesheets/repository/repository_table.scss b/app/assets/stylesheets/repository/repository_table.scss index 2853b0d4f..8fb9fa314 100644 --- a/app/assets/stylesheets/repository/repository_table.scss +++ b/app/assets/stylesheets/repository/repository_table.scss @@ -6,6 +6,15 @@ .repository-table { margin-top: 20px; + &.editing { + tbody>tr { + &:not(.editing) { + opacity: .4; + pointer-events: none; + } + } + } + .dataTables_filter { float: right; }