GUAC-1172: Move file transfer manager to corner of client display.

This commit is contained in:
Michael Jumper
2015-07-03 16:16:55 -07:00
parent 6816314797
commit e6886f7bbf
12 changed files with 147 additions and 127 deletions

View File

@@ -409,17 +409,6 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
$scope.page.title = name;
});
// Show file transfer section of menu if new file transfers have started
$scope.$watch('client.uploads.length + client.downloads.length', function transfersChanged(count, oldCount) {
// Show menu and scroll file transfer into view
if (count > oldCount) {
$scope.menu.shown = true;
$scope.menu.fileTransferMarker.scrollIntoView();
}
});
// Show status dialog when connection status changes
$scope.$watch('client.clientState.connectionState', function clientStateChanged(connectionState) {
@@ -655,6 +644,24 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
};
/**
* Determines whether the attached client has associated file transfers,
* regardless of those file transfers' state.
*
* @returns {Boolean}
* true if there are any file transfers associated with the
* attached client, false otherise.
*/
$scope.hasTransfers = function hasTransfers() {
// There are no file transfers if there is no client
if (!$scope.client)
return false;
return !!($scope.client.uploads.length || $scope.client.downloads.length);
};
// Clean up when view destroyed
$scope.$on('$destroy', function clientViewDestroyed() {