mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Correct code to match code standards
This commit is contained in:
@ -4,6 +4,3 @@ if(isset($_REQUEST['width']) AND isset($_REQUEST['height'])) {
|
|||||||
$_SESSION['screen_width'] = $_REQUEST['width'];
|
$_SESSION['screen_width'] = $_REQUEST['width'];
|
||||||
$_SESSION['screen_height'] = $_REQUEST['height'];
|
$_SESSION['screen_height'] = $_REQUEST['height'];
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $_SESSION['screen_width'];
|
|
||||||
?>
|
|
||||||
|
@ -37,19 +37,15 @@ else {
|
|||||||
);
|
);
|
||||||
}//end if
|
}//end if
|
||||||
|
|
||||||
if($_SESSION['screen_width'])
|
if($_SESSION['screen_width']) {
|
||||||
{
|
if($_SESSION['screen_width'] >= 800) {
|
||||||
if($_SESSION['screen_width'] >= 800)
|
|
||||||
{
|
|
||||||
$graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1;
|
$graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1;
|
||||||
}else
|
}else {
|
||||||
{
|
|
||||||
$graph_array['width'] = $_SESSION['screen_width'] - 155;
|
$graph_array['width'] = $_SESSION['screen_width'] - 155;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_SESSION['screen_height'])
|
if($_SESSION['screen_height']) {
|
||||||
{
|
|
||||||
$graph_array['height'] = ($_SESSION['screen_height'] - 250)/4;
|
$graph_array['height'] = ($_SESSION['screen_height'] - 250)/4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +137,18 @@ function submitCustomRange(frmdata) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateResolution()
|
||||||
|
{
|
||||||
|
$.post(
|
||||||
|
'ajax_setresolution.php',
|
||||||
|
{width: $(window).width(),height:$(window).height()},
|
||||||
|
function(json) {},
|
||||||
|
'json'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).on('resize', function(){ updateResolution();});
|
||||||
|
|
||||||
$(document).on("click", '.collapse-neighbors', function(event)
|
$(document).on("click", '.collapse-neighbors', function(event)
|
||||||
{
|
{
|
||||||
var caller = $(this);
|
var caller = $(this);
|
||||||
@ -144,11 +156,9 @@ $(document).on("click", '.collapse-neighbors', function(event)
|
|||||||
var list = caller.find('.neighbors-interface-list');
|
var list = caller.find('.neighbors-interface-list');
|
||||||
var continued = caller.find('.neighbors-list-continued');
|
var continued = caller.find('.neighbors-list-continued');
|
||||||
|
|
||||||
if(button.hasClass("glyphicon-plus"))
|
if(button.hasClass("glyphicon-plus")) {
|
||||||
{
|
|
||||||
button.addClass('glyphicon-minus').removeClass('glyphicon-plus');
|
button.addClass('glyphicon-minus').removeClass('glyphicon-plus');
|
||||||
}else
|
}else {
|
||||||
{
|
|
||||||
button.addClass('glyphicon-plus').removeClass('glyphicon-minus');
|
button.addClass('glyphicon-plus').removeClass('glyphicon-minus');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,12 +166,4 @@ $(document).on("click", '.collapse-neighbors', function(event)
|
|||||||
continued.toggle();
|
continued.toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
function updateResolution()
|
|
||||||
{
|
|
||||||
$.post('ajax_setresolution.php', { width: $(window).width() , height:$(window).height() }, function(json) {
|
|
||||||
},'json');
|
|
||||||
}
|
|
||||||
|
|
||||||
$(window).on('resize', function(){ updateResolution();});
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user