1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-21 05:31:42 +00:00

Reordering files

This commit is contained in:
jendib
2013-08-03 20:19:02 +02:00
parent ae853cf789
commit c0e7e34373
8 changed files with 124 additions and 7 deletions

View File

@@ -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')
});
});
}
};