mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +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
|
// Change current directory when directories are clicked
|
||||||
if ($scope.isDirectory(file)) {
|
if ($scope.isDirectory(file)) {
|
||||||
element.addClass('directory');
|
element.addClass('directory');
|
||||||
element.on('click', function changeDirectory() {
|
element.on('dblclick', function changeDirectory() {
|
||||||
$scope.changeDirectory(file);
|
$scope.changeDirectory(file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -153,11 +153,17 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser(
|
|||||||
// Initiate downloads when normal files are clicked
|
// Initiate downloads when normal files are clicked
|
||||||
else if ($scope.isNormalFile(file)) {
|
else if ($scope.isNormalFile(file)) {
|
||||||
element.addClass('normal-file');
|
element.addClass('normal-file');
|
||||||
element.on('click', function downloadFile() {
|
element.on('dblclick', function downloadFile() {
|
||||||
$scope.downloadFile(file);
|
$scope.downloadFile(file);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mark file as focused upon click
|
||||||
|
element.on('click', function focusFile() {
|
||||||
|
element.parent().children().removeClass('focused');
|
||||||
|
element.addClass('focused');
|
||||||
|
});
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@@ -29,6 +29,12 @@
|
|||||||
|
|
||||||
.file-browser .list-item .caption {
|
.file-browser .list-item .caption {
|
||||||
white-space: nowrap;
|
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 */
|
/* Directory / file icons */
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<!-- Parent directory -->
|
<!-- Parent directory -->
|
||||||
<div class="list-item directory previous" ng-show="filesystem.currentDirectory.parent">
|
<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 class="icon"></div>..
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user