Commit 8006ba5d authored by Dries's avatar Dries
Browse files

- Patch #633086 by yoroy, drifter, s.toonen: some visual/UX improvements to the dashboard.

parent 496b3b8c
......@@ -7,10 +7,11 @@
#dashboard div#dashboard_main {
width: 65%;
margin-right: 1%;
}
#dashboard div#dashboard_sidebar {
width: 35%;
width: 33%;
}
#dashboard div.block {
......@@ -18,12 +19,17 @@
}
#dashboard .dashboard-region .block {
border: #ccc 1px solid;
clear: both;
}
#dashboard div.block h2 {
background-color:#e2e1dc;
padding: 3px 5px;
padding: 3px 9px 3px 19px;
float: none;
}
#dashboard .dashboard-region div.block h2 {
background: #E0E0D8;
}
#dashboard div.block div.content {
......@@ -31,26 +37,25 @@
}
#dashboard div.block div.content ul.menu {
margin-left:20px;
margin-left: 20px;
}
#dashboard #disabled-blocks .block, #dashboard .block-placeholder {
background: #e2e1dc;
padding: 6px 4px;
padding: 6px 4px 6px 8px;
margin: 3px 3px 3px 0;
float: left;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
#dashboard .ui-sortable {
border: 3px dashed #ccc;
border: 2px dashed #ccc;
padding: 10px;
}
#dashboard .canvas-content {
background-color: #777;
padding: 10px;
color: #fff;
}
#dashboard .canvas-content a {
......@@ -65,7 +70,6 @@
}
#dashboard .canvas-content a.button {
float: right;
margin: 0 0 0 10px;
color: #5a5a5a;
text-decoration: none;
......@@ -76,15 +80,19 @@
}
#dashboard #disabled-blocks .section {
margin: 0 7em 0 0;
height: 100px;
overflow: auto;
background-color: #E0E0D8;
border: #ccc 1px solid;
padding: 10px;
min-height: 90px;
}
#dashboard #disabled-blocks {
padding: 5px 0;
}
#dashboard div.dragging {
background: #0074BD;
color: #fff;
width: 30%;
}
......@@ -92,7 +100,15 @@
display: inline;
font-weight: normal;
white-space: nowrap;
color: #000;
}
#dashboard #disabled-blocks .block {
background: #444;
color: #fff;
}
#dashboard #disabled-blocks .block:hover {
background: #0074BD;
}
#dashboard #disabled-blocks .block .content, #dashboard .ui-sortable-helper .content {
......@@ -100,7 +116,22 @@
}
#dashboard .ui-sortable .block {
cursor: move;
cursor: move;
}
#dashboard .ui-sortable .block h2 {
background: transparent url(../../misc/draggable.png) no-repeat 0 -35px;
}
#dashboard #disabled-blocks .block:hover h2 {
background: #0074BD url(../../misc/draggable.png) no-repeat 0 -35px;
color: #fff;
}
#dashboard .dashboard-region .ui-sortable .block:hover h2 {
background: #0074BD url(../../misc/draggable.png) no-repeat;
background-position: 3px -32px;
color: #fff;
}
#dashboard .dashboard-region .block-placeholder {
......
......@@ -65,8 +65,8 @@ Drupal.behaviors.dashboard = {
* Helper for enterCustomizeMode; sets up drag-and-drop and close button.
*/
setupDrawer: function () {
$('div.customize .canvas-content').prepend('<a class="button" href="">' + Drupal.t('Done') + '</a>');
$('div.customize .canvas-content input').click(Drupal.behaviors.dashboard.exitCustomizeMode);
$('div.customize .canvas-content').append('<a class="button" href="">' + Drupal.t('Done') + '</a>');
// Initialize drag-and-drop.
var regions = $('#dashboard div.region');
......@@ -76,7 +76,7 @@ Drupal.behaviors.dashboard = {
cursorAt: {top:0},
dropOnEmpty: true,
items: '>div.block, div.disabled-block',
opacity: 0.8,
opacity: 1,
helper: 'block-dragging',
placeholder: 'block-placeholder clearfix',
start: Drupal.behaviors.dashboard.start,
......
......@@ -435,7 +435,7 @@ function theme_dashboard_region($variables) {
*/
function theme_dashboard_disabled_blocks($variables) {
extract($variables);
$output = '<div class="canvas-content"><p>' . t('Drag and drop dashboard blocks to their place. Changes are automatically saved. You can also <a href="@add-block">add a custom block</a>.', array('@add-block' => url('admin/structure/block/add', array('query' => array('destination' => 'admin/dashboard/customize'))))) . '</p>';
$output = '<div class="canvas-content"><p>' . t('Drag and drop these to the columns below. Changes are automatically saved.') . '</p>';
$output .= '<div id="disabled-blocks"><div class="section region disabled-blocks clearfix">';
foreach ($blocks as $block) {
$output .= theme('dashboard_disabled_block', array('block' => $block));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment