mirror of
https://github.com/getrebuild/rebuild.git
synced 2025-02-27 15:54:40 +08:00
highlight edit chart
This commit is contained in:
parent
506061a312
commit
147b3a08cf
4 changed files with 13 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
.rb-offcanvas-menu .rb-top-header .rb-navbar-header .rb-toggle-left-sidebar:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.rb-top-header .rb-navbar-header .navbar-brand {
|
||||
.rb-top-header .rb-navbar-header {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
height: 100%;
|
||||
padding: 20px 25px;
|
||||
}
|
||||
.chart-box.high {
|
||||
outline: 2px solid #4285f4;
|
||||
}
|
||||
|
||||
.chart-box .chart-body {
|
||||
height: 100%;
|
||||
|
|
|
@ -57,7 +57,6 @@ $(document).ready(() => {
|
|||
render_option()
|
||||
})
|
||||
|
||||
$('.navbar-brand').removeAttr('href')
|
||||
$('.rb-toggle-left-sidebar').attr('title', '完成').off('click').on('click', () => {
|
||||
let cfg = build_config()
|
||||
if (!!!cfg){
|
||||
|
@ -70,8 +69,8 @@ $(document).ready(() => {
|
|||
let dash = $urlp('dashid') || ''
|
||||
$.post(rb.baseUrl + '/dashboard/chart-save?dashid=' + dash, JSON.stringify(_data), function(res){
|
||||
if (res.error_code == 0){
|
||||
window.__chartId = res.data.id
|
||||
location.href = !!dash ? ('home?d=' + dash) : 'home'
|
||||
// window.__chartId = res.data.id
|
||||
location.href = (!!dash ? ('home?d=' + dash) : 'home') + '#' + res.data.id
|
||||
} else rb.notice(res.error_msg, 'danger')
|
||||
})
|
||||
|
||||
|
|
|
@ -26,6 +26,13 @@ $(document).ready(function(){
|
|||
render_dashboard(d[2])
|
||||
$('.dash-list h4').text(d[1])
|
||||
|
||||
if (location.hash){
|
||||
let high = $('#chart-' + location.hash.substr(1) + ' > .chart-box').addClass('high')
|
||||
high.on('mouseleave', ()=>{
|
||||
high.removeClass('high')
|
||||
})
|
||||
}
|
||||
|
||||
// 仅开放一个仪表盘
|
||||
if (dashid_self) $('.J_dash-new').remove()
|
||||
else $('.J_dash-edit').remove()
|
||||
|
|
Loading…
Reference in a new issue