mirror of
https://github.com/sismics/docs.git
synced 2025-12-21 05:31:42 +00:00
Reordering files
This commit is contained in:
@@ -15,8 +15,14 @@ App.controller('DocumentView', function($scope, $state, $stateParams, $dialog, R
|
||||
forcePlaceholderSize: true,
|
||||
tolerance: 'pointer',
|
||||
handle: '.handle',
|
||||
update: function(event, ui) {
|
||||
// TODO Send new positions to server
|
||||
stop: function(e, ui) {
|
||||
// Send new positions to server
|
||||
$scope.$apply(function() {
|
||||
Restangular.one('file').post('reorder', {
|
||||
id: $stateParams.id,
|
||||
order: _.pluck($scope.files, 'id')
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user