do api calls on viewContentLoaded
This commit is contained in:
parent
22299c03cd
commit
3d273f041e
|
@ -6,11 +6,12 @@ angular
|
||||||
vm.bodyClass = '';
|
vm.bodyClass = '';
|
||||||
vm.searchVaultText = null;
|
vm.searchVaultText = null;
|
||||||
vm.version = appSettings.version;
|
vm.version = appSettings.version;
|
||||||
vm.userProfile = authService.getUserProfile();
|
|
||||||
|
|
||||||
$scope.currentYear = new Date().getFullYear();
|
$scope.currentYear = new Date().getFullYear();
|
||||||
|
|
||||||
$scope.$on('$viewContentLoaded', function () {
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
|
vm.userProfile = authService.getUserProfile();
|
||||||
|
|
||||||
if ($.AdminLTE) {
|
if ($.AdminLTE) {
|
||||||
if ($.AdminLTE.layout) {
|
if ($.AdminLTE.layout) {
|
||||||
$.AdminLTE.layout.fix();
|
$.AdminLTE.layout.fix();
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
|
|
||||||
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService, toastr) {
|
.controller('organizationPeopleController', function ($scope, $state, $uibModal, cryptoService, apiService, toastr) {
|
||||||
$scope.users = [];
|
$scope.users = [];
|
||||||
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
loadList();
|
loadList();
|
||||||
|
});
|
||||||
|
|
||||||
$scope.confirm = function (user) {
|
$scope.confirm = function (user) {
|
||||||
apiService.users.getPublicKey({ id: user.userId }, function (userKey) {
|
apiService.users.getPublicKey({ id: user.userId }, function (userKey) {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
email: null
|
email: null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
apiService.accounts.getProfile({}, function (user) {
|
apiService.accounts.getProfile({}, function (user) {
|
||||||
$scope.model = {
|
$scope.model = {
|
||||||
profile: {
|
profile: {
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
$scope.model.organizations = orgs;
|
$scope.model.organizations = orgs;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$scope.generalSave = function () {
|
$scope.generalSave = function () {
|
||||||
$scope.generalPromise = apiService.accounts.putProfile({}, $scope.model.profile, function (profile) {
|
$scope.generalPromise = apiService.accounts.putProfile({}, $scope.model.profile, function (profile) {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
$scope.folders = [];
|
$scope.folders = [];
|
||||||
|
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
|
$scope.$on('$viewContentLoaded', function () {
|
||||||
apiService.ciphers.list({}, function (ciphers) {
|
apiService.ciphers.list({}, function (ciphers) {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
$scope.folders = decFolders;
|
$scope.folders = decFolders;
|
||||||
$scope.logins = decLogins;
|
$scope.logins = decLogins;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$scope.folderSort = function (item) {
|
$scope.folderSort = function (item) {
|
||||||
if (!item.id) {
|
if (!item.id) {
|
||||||
|
|
Loading…
Reference in New Issue