Updated styles for selected files in file picker

This commit is contained in:
xevidos 2020-02-23 23:14:36 -05:00
parent f80c926f85
commit 5dd46b32a3
3 changed files with 17 additions and 4 deletions

View file

@ -66,6 +66,7 @@ Task List:
* Fix broken themes
* Re Add the custom language recognition system after recode
* Remove all old and unneeded dependencies
* Seperate Upload filemanager instance from main filemanager instance
* Update all current components to use more current standards ( async await and .then in favor over callbacks )

View file

@ -213,6 +213,7 @@
let project = $( '#file-manager a[data-type="root"]' ).attr( 'data-path' );
let path = await _this.open_file_selector( project, {type: "directory"}, 1, {} );
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
if( items.length ) {
@ -1845,20 +1846,23 @@
if( limit > 0 && _this.selected.length >= limit ) {
for( i = _this.selected.length;i--; ) {
$( `[data-path='${_this.selected[i]}']` ).css( "background", "" );
}
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
_this.selected = [];
_this.selected.push( path );
$( `[data-path='${path}']` ).addClass( "file-manager-selected" );
} else if( limit === -1 ) {
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
} else {
if( selected ) {
_this.selected.splice( i, 1 );
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
} else {
_this.selected.push( path );
$( `[data-path='${path}']` ).addClass( "file-manager-selected" );
}
}

View file

@ -76,6 +76,14 @@
cursor: pointer;
color: #fff;
}
.file-manager-selected {
background-color: #4a4a4a;
}
.file-manager-selected:hover {
background-color: #4a4a4a !important;
}
/* CONTEXT MENU */
#context-menu {