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
|
// When all files upload are over, attach orphan files and move on
|
||||||
var navigateNext = function() {
|
var navigateNext = function() {
|
||||||
attachOrphanFiles(data).then(function(resolve) {
|
attachOrphanFiles(data).then(function() {
|
||||||
if ($scope.isEdit()) {
|
// Open the edited/created document
|
||||||
// Go back to the edited document
|
$scope.pageDocuments();
|
||||||
$scope.pageDocuments();
|
$state.go('document.view', { id: data.id });
|
||||||
$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();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -146,7 +146,6 @@
|
|||||||
"edit": {
|
"edit": {
|
||||||
"document_edited_with_errors": "Document successfully edited but some files cannot be uploaded",
|
"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_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",
|
"quota_reached": "Quota reached",
|
||||||
"primary_metadata": "Primary metadata",
|
"primary_metadata": "Primary metadata",
|
||||||
"title_placeholder": "A name given to the resource",
|
"title_placeholder": "A name given to the resource",
|
||||||
|
Loading…
Reference in New Issue
Block a user