mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
Added tooltips
Fixed Placeholder message
This commit is contained in:
parent
ea00040fd0
commit
0321c0f152
@ -28,7 +28,7 @@ if (!$_SESSION['authenticated']) {
|
||||
$type = mres($_POST['type']);
|
||||
|
||||
if ($type == 'placeholder') {
|
||||
$output = 'Please add a Widget to get started';
|
||||
$output = "<span style='text-align:left;'><br><h3>Click on Edit-Dashboard to add Widgets</h3><br><h4><strong>Remember:</strong> You can only move & rezise widgets when you're in <strong>Edit-Mode</strong>.</h4><span>";
|
||||
$status = 'ok';
|
||||
$title = 'Placeholder';
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ foreach (dbFetchRows('SELECT user_widget_id,users_widgets.widget_id,title,widget
|
||||
$data[] = $items;
|
||||
}
|
||||
if (empty($data)) {
|
||||
$data[] = array('user_widget_id'=>'0','widget_id'=>1,'title'=>'Add a widget','widget'=>'placeholder','col'=>1,'row'=>1,'size_x'=>2,'size_y'=>2,'refresh'=>60);
|
||||
$data[] = array('user_widget_id'=>'0','widget_id'=>1,'title'=>'Add a widget','widget'=>'placeholder','col'=>1,'row'=>1,'size_x'=>6,'size_y'=>2,'refresh'=>60);
|
||||
}
|
||||
$data = serialize(json_encode($data));
|
||||
$dash_config = unserialize(stripslashes($data));
|
||||
@ -445,10 +445,10 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg
|
||||
dom = '<li id="'+data.user_widget_id+'" data-type="'+data.widget+'" data-settings="0">'+
|
||||
'<header class="widget_header"><span id="widget_title_'+data.user_widget_id+'">'+data.title+
|
||||
'</span>'+
|
||||
'<strong class="fade-edit pull-right">'+
|
||||
'<a href="#" class="fa fa-pencil-square-o edit-widget" data-widget-id="'+data.user_widget_id+'" aria-label="Settings"> </a> '+
|
||||
'<a href="#" class="text-danger fa fa-times close-widget" data-widget-id="'+data.user_widget_id+'" aria-label="Close"> </a> '+
|
||||
'</strong>'+
|
||||
'<span class="fade-edit pull-right">'+
|
||||
'<a href="javascript:return false;" class="fa fa-pencil-square-o edit-widget" data-widget-id="'+data.user_widget_id+'" aria-label="Settings" data-toggle="tooltip" data-placement="top" title="Settings"> </a> '+
|
||||
'<a href="javascript:return false;" class="text-danger fa fa-times close-widget" data-widget-id="'+data.user_widget_id+'" aria-label="Close" data-toggle="tooltip" data-placement="top" title="Remove"> </a> '+
|
||||
'</span>'+
|
||||
'</header>'+
|
||||
'<div class="widget_body" id="widget_body_'+data.user_widget_id+'" style="height: 100%; width:100%;">'+data.widget+'</div>'+
|
||||
'\<script\>var timeout'+data.user_widget_id+' = grab_data('+data.user_widget_id+','+data.refresh+',\''+data.widget+'\');\<\/script\>'+
|
||||
@ -461,6 +461,7 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg
|
||||
if (gridster_state == 0) {
|
||||
$('.fade-edit').fadeOut(0);
|
||||
}
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
}
|
||||
|
||||
function widget_settings(data) {
|
||||
|
Loading…
Reference in New Issue
Block a user