diff --git a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js
index fcbfd0bd..c943e3ad 100644
--- a/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js
+++ b/docs-web/src/main/webapp/src/app/docs/controller/document/DocumentViewContent.js
@@ -20,7 +20,15 @@ angular.module('docs').controller('DocumentViewContent', function ($scope, $root
forceHelperSize: true,
forcePlaceholderSize: true,
tolerance: 'pointer',
+ start: function() {
+ $(this).addClass('currently-dragging');
+ },
stop: function () {
+ var _this = this;
+ setTimeout(function(){
+ $(_this).removeClass('currently-dragging');
+ }, 300);
+
// Send new positions to server
$scope.$apply(function () {
Restangular.one('file').post('reorder', {
@@ -45,8 +53,10 @@ angular.module('docs').controller('DocumentViewContent', function ($scope, $root
/**
* Navigate to the selected file.
*/
- $scope.openFile = function (file) {
- $state.go('document.view.content.file', { id: $stateParams.id, fileId: file.id })
+ $scope.openFile = function (file, $event) {
+ if ($($event.target).parents('.currently-dragging').length === 0) {
+ $state.go('document.view.content.file', {id: $stateParams.id, fileId: file.id})
+ }
};
/**
diff --git a/docs-web/src/main/webapp/src/partial/docs/document.view.content.html b/docs-web/src/main/webapp/src/partial/docs/document.view.content.html
index d91e5795..d04301b0 100644
--- a/docs-web/src/main/webapp/src/partial/docs/document.view.content.html
+++ b/docs-web/src/main/webapp/src/partial/docs/document.view.content.html
@@ -70,7 +70,7 @@
-
+
@@ -148,12 +148,12 @@