diff --git a/build-number.txt b/build-number.txt index d00491f..b8626c4 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -1 +4 diff --git a/src/www/index.html b/src/www/index.html index 458a0ff..42c4837 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -37,6 +37,7 @@
  • Pause Monitoring
  • Refresh Now
  • Config
  • +
  • Go Fullscreen
  • diff --git a/src/www/js/personal-display.js b/src/www/js/personal-display.js index 3476dda..a10c3be 100644 --- a/src/www/js/personal-display.js +++ b/src/www/js/personal-display.js @@ -341,7 +341,8 @@ events: { "click a.refresh" : "refresh", "click a.pause-continue" : "toggleSync", - "click a.show-config" : "showConfig" }, + "click a.show-config" : "showConfig", + "click a.toggle-fullscreen" : "toggleFullscreen" }, initialize: function() { @@ -373,6 +374,7 @@ // Schedule future refreshes. PD.refreshIntervalId = setInterval(this.refresh, PD.refreshPeriod ? PD.refreshPeriod : 15000); + }, refresh: function(evt) { @@ -504,6 +506,32 @@ showConfig: function() { PD.configDialog.show(); }, + toggleFullscreen: function(evt) { + var $button = $(evt.target); + if ($button.text() == "Go Fullscreen") { + + if (document.documentElement.requestFullscreen) { + document.documentElement.requestFullscreen(); } + else if (document.documentElement.webkitRequestFullscreen) { + document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } + else if (document.documentElement.mozRequestFullScreen) { + document.documentElement.mozRequestFullScreen(); } + else { alert ("Not supported by this browser."); } + + $button.text("Leave Fullscreen"); } + + else { + + if (document.exitFullscreen) { + document.exitFullscreen(); } + else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); } + else if (document.mozCancelFullscreen) { + document.documentElement.mozCancelFullscreen(); } + else { alert ("Not supported by this browser."); } + + $button.text("Go Fullscreen"); } }, + toggleSync: function(evt) { if (PD.refreshIntervalId == null) { PD.refreshIntervalId = setInterval(this.refresh,