mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	GUAC-1293: Focus files on click. Download or change directory on double-click.
This commit is contained in:
		| @@ -145,7 +145,7 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser( | ||||
|                 // Change current directory when directories are clicked | ||||
|                 if ($scope.isDirectory(file)) { | ||||
|                     element.addClass('directory'); | ||||
|                     element.on('click', function changeDirectory() { | ||||
|                     element.on('dblclick', function changeDirectory() { | ||||
|                         $scope.changeDirectory(file); | ||||
|                     }); | ||||
|                 } | ||||
| @@ -153,11 +153,17 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser( | ||||
|                 // Initiate downloads when normal files are clicked | ||||
|                 else if ($scope.isNormalFile(file)) { | ||||
|                     element.addClass('normal-file'); | ||||
|                     element.on('click', function downloadFile() { | ||||
|                     element.on('dblclick', function downloadFile() { | ||||
|                         $scope.downloadFile(file); | ||||
|                     }); | ||||
|                 } | ||||
|  | ||||
|                 // Mark file as focused upon click | ||||
|                 element.on('click', function focusFile() { | ||||
|                     element.parent().children().removeClass('focused'); | ||||
|                     element.addClass('focused'); | ||||
|                 }); | ||||
|  | ||||
|                 return element; | ||||
|  | ||||
|             }; | ||||
|   | ||||
| @@ -29,6 +29,12 @@ | ||||
|  | ||||
| .file-browser .list-item .caption { | ||||
|     white-space: nowrap; | ||||
|     border: 1px solid transparent; | ||||
| } | ||||
|  | ||||
| .file-browser .list-item.focused .caption { | ||||
|     border: 1px dotted rgba(0, 0, 0, 0.5); | ||||
|     background: rgba(204, 221, 170, 0.5); | ||||
| } | ||||
|  | ||||
| /* Directory / file icons */ | ||||
|   | ||||
| @@ -23,7 +23,7 @@ | ||||
|  | ||||
|     <!-- Parent directory --> | ||||
|     <div class="list-item directory previous" ng-show="filesystem.currentDirectory.parent"> | ||||
|         <div class="caption" ng-click="changeDirectory(filesystem.currentDirectory.parent)"> | ||||
|         <div class="caption" ng-dblclick="changeDirectory(filesystem.currentDirectory.parent)"> | ||||
|             <div class="icon"></div>.. | ||||
|         </div> | ||||
|     </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user