diff options
author | Chad Kieffer <chad@2tbsp.com> | 2009-01-16 06:45:25 +0000 |
---|---|---|
committer | Chad Kieffer <chad@2tbsp.com> | 2009-01-16 06:45:25 +0000 |
commit | e749e6cf3e158e7c4cbaa50fc9e9b62d3db159d7 (patch) | |
tree | 47d233a539b094261d2c6d2834b027eb0d4c7b84 /themes/admin_default/js/ui.init.js | |
parent | 622da5f3cdf7ccb979334e42e115f0538c8dd00b (diff) |
Added drop target style, other minor admin dashboard style updates.
Diffstat (limited to 'themes/admin_default/js/ui.init.js')
-rw-r--r-- | themes/admin_default/js/ui.init.js | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/themes/admin_default/js/ui.init.js b/themes/admin_default/js/ui.init.js index 68c6398d..da01c96e 100644 --- a/themes/admin_default/js/ui.init.js +++ b/themes/admin_default/js/ui.init.js @@ -31,23 +31,26 @@ $(document).ready(function(){ }}); // Sortable dashboard blocks - $("#gContent").sortable({ - connectWith: ["#gSidebar"], - cursor: "move", - opacity: 0.7, - placeholder: "gBlock", - update: function(){ - console.log($(this).sortable("serialize")); - } - }); - $("#gSidebar").sortable({ - connectWith: ["#gContent"], - containment: "document", - cursor: "move", - opacity: 0.7, - placeholder: "gBlock", - update: function(){ - console.log($(this).sortable("serialize")); - } - }); + if ($(".ui-dialog-titlebar-close").length) { + $(".gBlock *:first").addClass("gDraggable"); + $("#gContent").sortable({ + connectWith: ["#gSidebar"], + cursor: "move", + handle: $("div:first"), + opacity: 0.6, + placeholder: "gDropTarget", + update: function() { console.log($(this).sortable("serialize")); } + // @todo stop: function() { .ajax() } + }); + $("#gSidebar").sortable({ + connectWith: ["#gContent"], + containment: "document", + cursor: "move", + handle: $("div:first"), + opacity: 0.6, + placeholder: "gDropTarget", + update: function() { console.log($(this).sortable("serialize")); } + // @todo stop: function() { .ajax() } + }); + } }); |