diff options
Diffstat (limited to 'modules/organize/js/organize.js')
-rw-r--r-- | modules/organize/js/organize.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index 7a70ea5e..0f8f7fa1 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -43,11 +43,6 @@ } else if (ui.offset.top < top + 20) { $("#gMicroThumbPanel").get(0).scrollTop = Math.max(0, $("#gMicroThumbPanel").get(0).scrollTop - 100); } - }, - // @todo delete this method when drop is implemented - stop: function(event, ui) { - $(".ui-state-selected").show(); - $(".gMicroThumbGridCell").css("borderStyle", "none"); } }, @@ -69,10 +64,15 @@ tolerance: "pointer", greedy: true, drop: function(event, ui) { - $.organize.do_drop({ - url: move_url.replace("__TARGET_ID__", $(event.target).attr("ref")), - source: $(ui.helper).children("img") - }); + if ($(event.target).hasClass("gViewOnly")) { + $(".ui-state-selected").show(); + $(".gMicroThumbGridCell").css("borderStyle", "none"); + } else { + $.organize.do_drop({ + url: move_url.replace("__TARGET_ID__", $(event.target).attr("ref")), + source: $(ui.helper).children("img") + }); + } } }, @@ -200,6 +200,10 @@ if ($(event.currentTarget).hasClass("gBranchSelected")) { return; } + var parent = $(event.currentTarget).parents(".gOrganizeBranch"); + if ($(parent).hasClass("gViewOnly")) { + return; + } $("#gMicroThumbPanel").selectable("destroy"); var id = $(event.currentTarget).attr("ref"); $(".gBranchSelected").removeClass("gBranchSelected"); |