summaryrefslogtreecommitdiff
path: root/modules/organize/js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize/js')
-rw-r--r--modules/organize/js/organize.js26
1 files changed, 19 insertions, 7 deletions
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js
index 6a2cc0d6..8f4fe9ed 100644
--- a/modules/organize/js/organize.js
+++ b/modules/organize/js/organize.js
@@ -103,7 +103,25 @@ function retrieve_micro_thumbs() {
$(this).removeClass("ui-selected");
}
});
- $(".gMicroThumbContainer").draggable({
+ $(".gMicroThumbContainer").mousemove(function(event) {
+ if ($("#gDragHelper").length > 0 && $(this).attr("id") != "gPlaceHolder") {
+ if (event.pageX < this.offsetLeft + this.offsetWidth / 2) {
+ $(this).before($("#gPlaceHolder"));
+ } else {
+ $(this).after($("#gPlaceHolder"));
+ }
+ var container = $("#gMicroThumbPanel").get(0);
+ var scrollHeight = container.scrollHeight;
+ var scrollTop = container.scrollTop;
+ var height = $(container).height();
+ if (event.pageY > height + scrollTop) {
+ container.scrollTop = this.offsetTop;
+ } else if (event.pageY < scrollTop) {
+ container.scrollTop -= height;
+ }
+ }
+ });
+ $(".gMicroThumbContainer").draggable({
cancel: ".gMicroThumbContainer:not(.ui-selected)",
handle: ".gMicroThumbContainer.ui-selected",
zindex: 2000,
@@ -151,12 +169,6 @@ function retrieve_micro_thumbs() {
$("#gPlaceHolder").remove();
}
});
- $(".gMicroThumbContainer").droppable( {
- tolerance: "pointer",
- over: function(event, ui) {
- $(this).after($("#gPlaceHolder"));
- }
- });
$("#gMicroThumbPanel").droppable( {
tolerance: "pointer",
drop: function(event, ui) {