mirror of
https://github.com/Cacti/cacti.git
synced 2026-12-04 14:13:30 +09:00
Add a preference for always-visible graph action icons (#8744)
* Add optional always-visible graph action icons * Close visible graph submenus with Escape after Safari mouse clicks * Document graph action display preference (#8744) * Fix refreshed graph action labels and submenu stacking * Refresh realtime action names and repair browser test setup
This commit is contained in:
1 parent
c1e7c75752
commit
14dc5eb7cc
15 files changed
+253
-9
No files matched your search
+8
-3
@@ -400,7 +400,7 @@ function html_graph_area(array &$graph_array, string $no_graphs_message = '', st
|
||||
<div>
|
||||
<div class='graphWrapper' id='wrapper_<?php print $graph['local_graph_id']?>' graph_width='<?php print $graph['width']; ?>' graph_height='<?php print $graph['height']; ?>' title_font_size='<?php print((read_user_setting('custom_fonts') == 'on') ? read_user_setting('title_size') : read_config_option('title_size')); ?>'></div>
|
||||
<?php if (is_realm_allowed(27)) { ?>
|
||||
<div id='dd<?php print $graph['local_graph_id']; ?>' class='noprint graphDrillDown graphDrillDownToggle'>
|
||||
<div id='dd<?php print $graph['local_graph_id']; ?>' class='noprint graphDrillDown <?php print graph_drilldown_display_class(); ?>'>
|
||||
<?php graph_drilldown_icons($graph['local_graph_id'], 'graph_buttons', $tree_id, $branch_id); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -519,7 +519,7 @@ function html_graph_thumbnail_area(array &$graph_array, string $no_graphs_messag
|
||||
<div>
|
||||
<div class='graphWrapper' id='wrapper_<?php print $graph['local_graph_id']?>' graph_width='<?php print read_user_setting('default_width'); ?>' graph_height='<?php print read_user_setting('default_height'); ?>'></div>
|
||||
<?php if (is_realm_allowed(27)) { ?>
|
||||
<div id='dd<?php print $graph['local_graph_id']; ?>' class='noprint graphDrillDown graphDrillDownToggle'>
|
||||
<div id='dd<?php print $graph['local_graph_id']; ?>' class='noprint graphDrillDown <?php print graph_drilldown_display_class(); ?>'>
|
||||
<?php graph_drilldown_icons($graph['local_graph_id'], 'graph_buttons_thumbnails', $tree_id, $branch_id); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -537,6 +537,11 @@ function html_graph_thumbnail_area(array &$graph_array, string $no_graphs_messag
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
/** Return the graph action layout selected by the current user. */
|
||||
function graph_drilldown_display_class() : string {
|
||||
return read_user_setting('graph_actions_display') === 'icons' ? 'graphDrillDownAlways' : 'graphDrillDownToggle';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates and prints HTML for graph drilldown icons.
|
||||
*
|
||||
@@ -2990,7 +2995,7 @@ function html_spikekill_js() : void {
|
||||
}
|
||||
|
||||
spikeKillRequest = null;
|
||||
if (!$.contains(document, anchor[0]) || !anchor.closest('.graphDrillDownToggle').hasClass('open')) {
|
||||
if (!$.contains(document, anchor[0]) || !anchor.closest('.graphDrillDownAlways, .graphDrillDownToggle.open').length) {
|
||||
spikeKillAnchor = null;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user