mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
Closes #223: open document after creation
This commit is contained in:
parent
f9b61546ab
commit
9b1456e1a7
@ -115,22 +115,10 @@ angular.module('docs').controller('DocumentEdit', function($rootScope, $scope, $
|
||||
|
||||
// When all files upload are over, attach orphan files and move on
|
||||
var navigateNext = function() {
|
||||
attachOrphanFiles(data).then(function(resolve) {
|
||||
if ($scope.isEdit()) {
|
||||
// Go back to the edited document
|
||||
$scope.pageDocuments();
|
||||
$state.go('document.view', { id: $stateParams.id });
|
||||
} else {
|
||||
// Reset the scope and stay here
|
||||
var fileUploadCount = _.size($scope.newFiles) + resolve.length;
|
||||
$scope.alerts.unshift({
|
||||
type: 'success',
|
||||
msg: $translate.instant('document.edit.document_added', { count: fileUploadCount })
|
||||
});
|
||||
|
||||
$scope.resetForm();
|
||||
$scope.loadDocuments();
|
||||
}
|
||||
attachOrphanFiles(data).then(function() {
|
||||
// Open the edited/created document
|
||||
$scope.pageDocuments();
|
||||
$state.go('document.view', { id: data.id });
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -146,7 +146,6 @@
|
||||
"edit": {
|
||||
"document_edited_with_errors": "Document successfully edited but some files cannot be uploaded",
|
||||
"document_added_with_errors": "Document successfully added but some files cannot be uploaded",
|
||||
"document_added": "Document successfully added (with {{ count }} file{{ count > 1 ? 's' : '' }})",
|
||||
"quota_reached": "Quota reached",
|
||||
"primary_metadata": "Primary metadata",
|
||||
"title_placeholder": "A name given to the resource",
|
||||
|
Loading…
Reference in New Issue
Block a user