fixed trashbin-navigation behaviour

Signed-off-by: fnuesse <felix.nuesse@t-online.de>
This commit is contained in:
fnuesse 2018-11-04 10:20:05 +01:00
parent 9e88107e11
commit cb4def26ea
No known key found for this signature in database
GPG key ID: 2089A3431243E819
3 changed files with 17 additions and 2 deletions

View file

@ -380,9 +380,11 @@
case "strength_low": $scope.filterStrength(0,1); break;
case "expired": $scope.filterExpired(); break;
case "all": $scope.filterAll(); break;
}
$scope.delete_time=0;
$rootScope.$broadcast('release_trashbin', $scope.delete_time);
});
@ -403,7 +405,15 @@
$scope.filterAll = function(){
$scope.selectedtags=[];
$scope.filterOptions.filterText="";
$scope.filtered_credentials=$scope.filterHidden($scope.active_vault.credentials);
var creds_filtered=[];
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
if($scope.active_vault.credentials[i].delete_time>0){
creds_filtered.push($scope.active_vault.credentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(creds_filtered);
};
$scope.filterStrength = function(strength_min, strength_max){

View file

@ -152,6 +152,10 @@
$scope.available_tags = TagService.getTags();
}, true);
$scope.$on('release_trashbin', function(event, args) {
$scope.delete_time=args;
});
$scope.toggleDeleteTime = function () {
if ($scope.delete_time > 0) {
$scope.delete_time = 0;

View file

@ -49,6 +49,7 @@
a {
&.active{
//border-left: 3px solid #0082c9;
background-image: var(--icon-delete-e9322d);
}
background-color: #fff !important;
opacity: 1 !important;