Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfnuesse <felix.nuesse@t-online.de>2018-11-03 14:58:38 +0300
committerfnuesse <felix.nuesse@t-online.de>2018-11-21 19:34:21 +0300
commit730e9541764f311229db6cf2f383271d113cd11e (patch)
tree658b853798b67b9dbbbb9c622fabfb66388e32f0 /js
parent92898d236b45da680326b14ab57f68318826994a (diff)
Added custom initial state to taglist
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/menu.js19
-rw-r--r--js/app/services/vaultservice.js2
2 files changed, 13 insertions, 8 deletions
diff --git a/js/app/controllers/menu.js b/js/app/controllers/menu.js
index ce81ac2b..ce453255 100644
--- a/js/app/controllers/menu.js
+++ b/js/app/controllers/menu.js
@@ -114,17 +114,22 @@
$rootScope.$broadcast('filterSpecial',string);
};
- $scope.tagCollapsibleOpen=true;
+ $scope.collapsedDefaultValue=false;
+ $scope.tagCollapsibleOpen=VaultService.getVaultSetting('vaultTagCollapsedState',$scope.collapsedDefaultValue);
+
$scope.tagCollapsibleClicked = function () {
- if ($scope.tagCollapsibleOpen === true)
- $scope.tagCollapsibleOpen = false;
- else
- $scope.tagCollapsibleOpen = true;
+ if (VaultService.getVaultSetting('vaultTagCollapsedState',$scope.collapsedDefaultValue) === true) {
+ VaultService.setVaultSetting('vaultTagCollapsedState',false);
+ } else {
+ VaultService.setVaultSetting('vaultTagCollapsedState',true);
+ }
};
$scope.tagCollapsibleState = function () {
- return $scope.tagCollapsibleOpen !== false;
-
+ if(VaultService.getVaultSetting('vaultTagCollapsedState',$scope.collapsedDefaultValue)){
+ return '';
+ }
+ return 'open';
};
$rootScope.$on('credentials_loaded', function () {
diff --git a/js/app/services/vaultservice.js b/js/app/services/vaultservice.js
index 4ca35ee6..11ded085 100644
--- a/js/app/services/vaultservice.js
+++ b/js/app/services/vaultservice.js
@@ -66,7 +66,7 @@
return false;
} else {
_activeVault.vault_settings[key] = value;
- _this.updateVault(_activeVault);
+ this.updateVault(_activeVault);
}
},