Small fixes for 2.0.1

Fix for going back from deleted credentials

Use method
This commit is contained in:
brantje 2017-02-06 11:59:03 +01:00
parent 7326967c21
commit 9c35282f89
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
7 changed files with 19 additions and 13 deletions

View file

@ -292,7 +292,10 @@ class CredentialController extends ApiController {
'', $this->userId, Activity::TYPE_ITEM_ACTION);
$this->sharingService->unshareCredential($credential->getGuid());
foreach ($this->credentialRevisionService->getRevisions($credential->getId()) as $revision) {
$this->credentialRevisionService->deleteRevision($revision['id'], $this->userId);
$id = $revision->getId();
if(isset($id)){
$this->credentialRevisionService->deleteRevision($id, $this->userId);
}
}
}

View file

@ -195,6 +195,7 @@
};
var settingsLoaded = function () {
$scope.settings = SettingsService.getSettings();
};
@ -399,6 +400,9 @@
});
$scope.clearState = function () {
$scope.delete_time = 0;
};
$scope.downloadFile = function (credential, file) {
var callback = function (result) {

View file

@ -141,7 +141,7 @@
});
};
$scope.cancel = function () {
$scope.cancelRevision = function () {
$location.path('/vault/' + $routeParams.vault_id);
$scope.storedCredential = null;
SettingsService.setSetting('revision_credential', null);

File diff suppressed because one or more lines are too long

View file

@ -1,15 +1,14 @@
<div id="controls">
<div class="actions creatable">
<div class="breadcrumb">
<div class="crumb svg ui-droppable" data-dir="/">
<div class="crumb svg ui-droppable">
<a ng-click="logout()"><i class="fa fa-home"></i></a>
</div>
<div class="crumb svg" data-dir="/Test">
<a ng-click="cancel()">{{active_vault.name}}</a>
<div class="crumb svg">
<a ng-click="cancelRevision()">{{active_vault.name}}</a>
</div>
<div class="crumb svg last" data-dir="/Test">
<a ng-if="storedCredential.credential_id">{{ 'showing.revisions' | translate}} "{{storedCredential.label}}"</a>
<div class="crumb svg last">
<a ng-if="storedCredential.credential_id">{{ 'showing.revisions' | translate}} "{{revision.credential_data.label}}"</a>
</div>
</div>
</div>

View file

@ -36,7 +36,7 @@
secret="'true'"></span>
</td>
<td>
<a class="link" ng-href="#/vault/{{active_vault.vault_id}}/edit/{{result.credential_id}}" tooltip="'Edit credential'"><i class="fa fa-edit"></i></a>
<a class="link" ng-href="#/vault/{{active_vault.vault_id}}/edit/{{result.guid}}" tooltip="'Edit credential'"><i class="fa fa-edit"></i></a>
</td>
</tr>
</tbody>

View file

@ -5,7 +5,7 @@
<div class="crumb svg ui-droppable" data-dir="/">
<a><i class="fa fa-home"></i></a>
</div>
<div class="crumb svg last">
<div class="crumb svg last" ng-click="clearState()">
<a>{{active_vault.name}}</a>
</div>
</div>