Skip to content

Commit

Permalink
* block: optimize dashboard UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Apr 30, 2024
1 parent 6b90c99 commit d4f4b39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions module/block/css/dashboard.ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ body {padding-bottom: 20px;}
#dashboard .list-block .panel-body {padding: 0; overflow: hidden;}

#dashboard .dtable.shadow {box-shadow: unset;}
#dashboard .dashboard-block-header {padding-left: 16px;}
#dashboard .has-content .dashboard-block-title {width: 0; overflow: hidden; opacity: 0; height: 1em;}

#upgradeModal .modal-body {padding: 0;}
#upgradeModal .modal-dialog, #upgradeModal .modal-content {max-height: 100vh;}
Expand Down
2 changes: 1 addition & 1 deletion module/block/js/dashboard.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function resetBlocks(dashboard, data, block)
{
if(!result) return;
const url = zui.formatString(data.url, block);
$.ajaxSubmit({url: url, method: 'GET', onSuccess: () => loadComponent('#dashboard')});
$.ajaxSubmit({url: url, load: false, method: 'GET', onSuccess: () => loadComponent('#dashboard')});
});
}

Expand Down
2 changes: 1 addition & 1 deletion module/block/ui/dashboard.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
{
$block->color = isset($block->params->color) ? $block->params->color : null;
$block->fetch = $block->blockLink;
unset($block->title);
}

$blocks = json_decode(json_encode($blocks), true);
Expand All @@ -36,6 +35,7 @@
set::onlyLoadVisible(false),
set::blocks(array_values($blocks)),
set::blockMenu(array('items' => $blockMenuItems)),
set::emptyBlockContent(array('html' => '<div class="panel rounded bg-canvas panel-block shadow"><div class="panel-heading border-b h-12"></div></div>')),
set::onClickMenu(jsRaw('handleClickBlockMenu')),
set::onLayoutChange(jsRaw('handleLayoutChange'))
);
Expand Down

0 comments on commit d4f4b39

Please sign in to comment.