mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
Bugfix, TODO
This commit is contained in:
parent
3345f3def6
commit
e0bccf7121
@ -1 +1,2 @@
|
|||||||
- Server side reordering files
|
- Server side reordering files
|
||||||
|
- GET /app/stats to display general data (server/client)
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@ -44,7 +44,7 @@ App.controller('Document', function($scope, $state, Restangular) {
|
|||||||
})
|
})
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
$scope.documents = data.documents;
|
$scope.documents = data.documents;
|
||||||
$scope.totalDocuments = data.total;
|
$scope.totalDocuments = data.total; // TODO This is not really the total number of documents
|
||||||
$scope.numPages = Math.ceil(data.total / $scope.limit);
|
$scope.numPages = Math.ceil(data.total / $scope.limit);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -59,6 +59,7 @@ App.controller('DocumentEdit', function($scope, $q, $http, $state, $stateParams,
|
|||||||
$state.transitionTo('document.view', { id: $stateParams.id });
|
$state.transitionTo('document.view', { id: $stateParams.id });
|
||||||
} else {
|
} else {
|
||||||
$scope.document = {};
|
$scope.document = {};
|
||||||
|
$scope.newFiles = [];
|
||||||
$scope.loadDocuments();
|
$scope.loadDocuments();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,6 +101,7 @@ App.controller('DocumentEdit', function($scope, $q, $http, $state, $stateParams,
|
|||||||
sendFile(key).then(then);
|
sendFile(key).then(then);
|
||||||
} else {
|
} else {
|
||||||
$scope.fileIsUploading = false;
|
$scope.fileIsUploading = false;
|
||||||
|
$scope.fileProgress = 0;
|
||||||
navigateNext();
|
navigateNext();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,7 @@ App.controller('Tag', function($scope, $dialog, $state, Tag, Restangular) {
|
|||||||
$scope.addTag = function() {
|
$scope.addTag = function() {
|
||||||
var name = $scope.tag.name;
|
var name = $scope.tag.name;
|
||||||
$scope.tag.name = '';
|
$scope.tag.name = '';
|
||||||
|
// TODO Check if the tag don't already exists
|
||||||
Restangular.one('tag').put({ name: name }).then(function(data) {
|
Restangular.one('tag').put({ name: name }).then(function(data) {
|
||||||
$scope.tags.push({ id: data.id, name: name });
|
$scope.tags.push({ id: data.id, name: name });
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user