Directory auto-complete.

This commit is contained in:
Phill Luby
2014-11-16 19:30:49 +00:00
parent ead09395d9
commit 46ec72412a
4 changed files with 59 additions and 4 deletions

View File

@@ -777,6 +777,19 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
return folderList($scope.folders);
};
$scope.directoryList = [];
$scope.$watch('currentFolder.Path', function (newvalue) {
$http.get(
urlbase + '/autocomplete/directory',
{
params: { current: newvalue }
}
).success(function (data) {
$scope.directoryList = data;
});
});
$scope.editFolder = function (deviceCfg) {
$scope.currentFolder = angular.copy(deviceCfg);
$scope.currentFolder.selectedDevices = {};