diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-05-22 16:13:37 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-05-22 16:13:37 +0000 |
commit | 0451351f5127d17e3fbb0084659538c683a19333 (patch) | |
tree | ccbe48e49467305e269d76925eff9987c32b5dbb | |
parent | 11c8a84f49f4812e08885120253f2175cf4b7724 (diff) |
Set a minimum distance (10px) that the cursor has to move inorder for
the draggable functionality to be activated
-rw-r--r-- | modules/organize/js/organize.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js index 6ae2d4eb..073b4216 100644 --- a/modules/organize/js/organize.js +++ b/modules/organize/js/organize.js @@ -14,6 +14,7 @@ var draggable = { handle: ".gMicroThumbContainer.ui-selected", revert: true, zindex: 2000, + distance: 10, helper: function(event, ui) { if (!$(event.currentTarget).hasClass("ui-selected")) { $(event.currentTarget).addClass("ui-selected"); @@ -241,14 +242,10 @@ function drawerHandleButtonsClick(event) { data: $(form).serialize(), dataType: "json", success: function (data, textStatus) { - if (data.task) { - // @todo if task is sent then create a progress bar and run the task - } else { - $("#pane-"+currentTab).children("form").replaceWith(data.form); - if (data.message) { - $("#pane-"+currentTab + " form").before("<div class=\"gSuccess\">" + data.message +"</div>"); - } - } + $("#pane-"+currentTab).children("form").replaceWith(data.form); + if (data.message) { + $("#gMessage").empty().append("<div class='gSuccess'>" + data.message + "</div>"); + } }, type: "POST", url: url |