From e749e6cf3e158e7c4cbaa50fc9e9b62d3db159d7 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Fri, 16 Jan 2009 06:45:25 +0000 Subject: Added drop target style, other minor admin dashboard style updates. --- themes/admin_default/js/ui.init.js | 41 ++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'themes/admin_default/js/ui.init.js') 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() } + }); + } }); -- cgit v1.2.3