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 | |
parent | 622da5f3cdf7ccb979334e42e115f0538c8dd00b (diff) |
Added drop target style, other minor admin dashboard style updates.
-rw-r--r-- | themes/admin_default/css/screen.css | 5 | ||||
-rw-r--r-- | themes/admin_default/js/ui.init.js | 41 | ||||
-rw-r--r-- | themes/default/css/screen.css | 11 |
3 files changed, 35 insertions, 22 deletions
diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index 674c90b2..e1f468c0 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -65,13 +65,12 @@ margin-bottom: 0; } -#gContent .gBlock .ui-dialog-titlebar { - margin: -.8em -.3em 0 -.3em; +.gBlock .ui-dialog-titlebar { + margin: -1em -.4em 0 ; } #gSidebar .gBlock h2 { background: none; - margin: -.9em -.4em 0 -.3em; cursor: move; } 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() } + }); + } }); diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 8963120b..8f8779c1 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -714,6 +714,17 @@ li.gError select { font-size: 0; } +.gDraggable { + cursor: move; +} + +.gDropTarget { + background-color: #cfdeff; + border: 1px dotted #999; + height: 100px; + margin: 1em 0; +} + /* jQuery UI Dialog ~~~~~~~~~~~~~~~~~~~~~~ */ #gDialog { |