clean up state a bit, use 1 less call to daemon check by using global . When selecting a layout, set img width to 100%

This commit is contained in:
Isaac Connor 2017-07-12 12:49:01 -04:00
parent 0adc14da4e
commit 22e957ba46
5 changed files with 18 additions and 12 deletions

View File

@ -285,4 +285,16 @@ function getNavBarHTML() {
<?php
return( ob_get_clean() );
} // end function getNavBarHTML()
function xhtmlFooter() {
global $skin;
if ( canEdit('System') ) {
include("skins/$skin/views/state.php");
?>
<?php
}
?>
</body></html>
<?php
} // end xhtmlFooter
?>

View File

@ -290,11 +290,5 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
</tfoot>
</table>
</div>
</form>
<?php
if ( canEdit('System') ) {
include("skins/$skin/views/state.php");
}
?>
</body>
</html>
</form>
<?php xhtmlFooter() ?>

View File

@ -405,5 +405,4 @@ if ( canEdit( 'Events' ) ) {
</form>
</div>
</div>
</body>
</html>
<?php xhtmlFooter() ?>

View File

@ -130,7 +130,7 @@ function selectLayout( element ) {
} else if ( streamImg.nodeName == 'APPLET' || streamImg.nodeName == 'OBJECT' ) {
// APPLET's and OBJECTS need to be re-initialized
}
streamImg.style.width = '';
streamImg.style.width = '100%';
}
var zonesSVG = $('zones'+monitor.id);
if ( zonesSVG ) {

View File

@ -40,7 +40,8 @@ if ( !canEdit( 'System' ) ) {
<label for="runState" class="col-sm-3 control-label">Change State</label>
<div class="col-sm-9">
<select id="runState" name="runState" class="form-control">
<?php if ( daemonCheck() ) { ?>
<?php
if ( $running ) { ?>
<option value="stop" selected="selected"><?php echo translate('Stop') ?></option>
<option value="restart"><?php echo translate('Restart') ?></option>
<?php } else { ?>