Skip to content

Commit

Permalink
Add overlib link css class for changing background color - Update Url…
Browse files Browse the repository at this point in the history
….php (#10300)

* Update Url.php

Ad css class to onmouserover event and overlib, easyer to change color of background ex.: for a dark theme vs bg color hardcoded

* Update styles.css

* Update Url.php

* Update librenmsv1.blade.php
  • Loading branch information
ckforum authored and murrant committed Jun 4, 2019
1 parent 1c1b07f commit cafe057
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LibreNMS/Util/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public static function lazyGraphTag($args)

public static function overlibLink($url, $text, $contents, $class = null)
{
$contents = "<div style=\'background-color: #FFFFFF;\'>" . $contents . '</div>';
$contents = "<div class=\'overlib-contents\'>" . $contents . '</div>';
$contents = str_replace('"', "\'", $contents);
if ($class === null) {
$output = '<a href="' . $url . '"';
Expand Down
4 changes: 4 additions & 0 deletions html/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,10 @@ tr.search:nth-child(odd) {
font-weight: bold;
}

.overlib-contents {
background-color: #fff;
}

.minigraph-image {
margin: 2px;
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/librenmsv1.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<link href="{{ asset('css/select2.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('css/select2-bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('css/query-builder.default.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset(LibreNMS\Config::get('stylesheet', 'css/styles.css')) }}?ver=20190123" rel="stylesheet" type="text/css" />
<link href="{{ asset(LibreNMS\Config::get('stylesheet', 'css/styles.css')) }}?ver=20190603" rel="stylesheet" type="text/css" />
<link href="{{ asset('css/' . LibreNMS\Config::get('site_style', 'light') . '.css?ver=632417642') }}" rel="stylesheet" type="text/css" />
@foreach(LibreNMS\Config::get('webui.custom_css', []) as $custom_css)
<link href="{{ $custom_css }}" rel="stylesheet" type="text/css" />
Expand Down

0 comments on commit cafe057

Please sign in to comment.