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 * Fix broken themes
* Re Add the custom language recognition system after recode * Re Add the custom language recognition system after recode
* Remove all old and unneeded dependencies * 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 ) * 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 project = $( '#file-manager a[data-type="root"]' ).attr( 'data-path' );
let path = await _this.open_file_selector( project, {type: "directory"}, 1, {} ); let path = await _this.open_file_selector( project, {type: "directory"}, 1, {} );
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
if( items.length ) { if( items.length ) {
@ -1845,20 +1846,23 @@
if( limit > 0 && _this.selected.length >= limit ) { if( limit > 0 && _this.selected.length >= limit ) {
for( i = _this.selected.length;i--; ) { $( ".file-manager-selected" ).removeClass( "file-manager-selected" );
$( `[data-path='${_this.selected[i]}']` ).css( "background", "" );
}
_this.selected = []; _this.selected = [];
_this.selected.push( path ); _this.selected.push( path );
$( `[data-path='${path}']` ).addClass( "file-manager-selected" );
} else if( limit === -1 ) {
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
} else { } else {
if( selected ) { if( selected ) {
_this.selected.splice( i, 1 ); _this.selected.splice( i, 1 );
$( ".file-manager-selected" ).removeClass( "file-manager-selected" );
} else { } else {
_this.selected.push( path ); _this.selected.push( path );
$( `[data-path='${path}']` ).addClass( "file-manager-selected" );
} }
} }

View File

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