Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
bf20564858 | |||
0a083ba8cc | |||
9bd00cdab7 | |||
60e76118e3 |
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
VERSION =1.1
|
VERSION =1.4
|
||||||
BUILD_NUMBER_FILE = build-number.txt
|
BUILD_NUMBER_FILE = build-number.txt
|
||||||
BUILD_NUMBER = $$(cat $(BUILD_NUMBER_FILE))
|
BUILD_NUMBER = $$(cat $(BUILD_NUMBER_FILE))
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
0
|
4
|
||||||
|
@ -250,3 +250,23 @@ body > section {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 } }
|
padding: 0 } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main-buttons {
|
||||||
|
border-top: solid 2px $accent1;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
border: $accent2 solid thin;
|
||||||
|
border-radius: 5px;
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0.1rem 0.3rem; } } }
|
||||||
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
<title>What I am Doing</title>
|
<title>What I am Doing</title>
|
||||||
<link rel="stylesheet" href="css/personal-display.css" type="text/css">
|
<link rel="stylesheet" href="css/personal-display.css" type="text/css">
|
||||||
<link href='//fonts.googleapis.com/css?family=Play|Advent+Pro' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Play|Advent+Pro' rel='stylesheet' type='text/css'>
|
||||||
@ -20,6 +21,7 @@
|
|||||||
<script src="js/personal-display.js" type="text/javascript" defer></script>
|
<script src="js/personal-display.js" type="text/javascript" defer></script>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||||
|
<meta name=version content="1.4">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<section id=current-task>
|
<section id=current-task>
|
||||||
@ -34,6 +36,8 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" class=pause-continue>Pause Monitoring</a></li>
|
<li><a href="#" class=pause-continue>Pause Monitoring</a></li>
|
||||||
<li><a href="#" class=refresh>Refresh Now</a></li>
|
<li><a href="#" class=refresh>Refresh Now</a></li>
|
||||||
|
<li><a href="#" class=show-config>Config</a></li>
|
||||||
|
<li><a href="#" class=toggle-fullscreen>Go Fullscreen</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
<section id=config-dialog>
|
<section id=config-dialog>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
var root = this;
|
var root = this;
|
||||||
|
|
||||||
var PD = root.PersonalDisplay = {};
|
var PD = root.PersonalDisplay = {};
|
||||||
|
PD.version = "1.4"
|
||||||
|
|
||||||
PD.hasHTML5LocalStorage = function() {
|
PD.hasHTML5LocalStorage = function() {
|
||||||
try {
|
try {
|
||||||
@ -338,8 +339,10 @@
|
|||||||
el: $("body"),
|
el: $("body"),
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"click a.refresh" : "refresh"
|
"click a.refresh" : "refresh",
|
||||||
"click a.pause-continue" : "toggleSync" },
|
"click a.pause-continue" : "toggleSync",
|
||||||
|
"click a.show-config" : "showConfig",
|
||||||
|
"click a.toggle-fullscreen" : "toggleFullscreen" },
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
|
|
||||||
@ -371,9 +374,10 @@
|
|||||||
|
|
||||||
// Schedule future refreshes.
|
// Schedule future refreshes.
|
||||||
PD.refreshIntervalId = setInterval(this.refresh, PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
PD.refreshIntervalId = setInterval(this.refresh, PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function() {
|
refresh: function(evt) {
|
||||||
// If the dialog is still open we skip this sync to give the user
|
// If the dialog is still open we skip this sync to give the user
|
||||||
// a chance to finish configuration.
|
// a chance to finish configuration.
|
||||||
if ($("#config-dialog").is(":visible")) { return; }
|
if ($("#config-dialog").is(":visible")) { return; }
|
||||||
@ -496,9 +500,39 @@
|
|||||||
collection.remove(model); }});
|
collection.remove(model); }});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (evt) evt.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleSync: function() {
|
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) {
|
if (PD.refreshIntervalId == null) {
|
||||||
PD.refreshIntervalId = setInterval(this.refresh,
|
PD.refreshIntervalId = setInterval(this.refresh,
|
||||||
PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
PD.refreshPeriod ? PD.refreshPeriod : 15000);
|
||||||
@ -506,7 +540,11 @@
|
|||||||
else {
|
else {
|
||||||
clearInterval(PD.refreshIntervalId);
|
clearInterval(PD.refreshIntervalId);
|
||||||
PD.refreshIntervalId = null;
|
PD.refreshIntervalId = null;
|
||||||
$('.pause-continue').text('Resume Monitoring'); } }
|
$('.pause-continue').text('Resume Monitoring'); }
|
||||||
|
|
||||||
|
|
||||||
|
if (evt) evt.preventDefault();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
PD.main = new PD.Main();
|
PD.main = new PD.Main();
|
||||||
|
Reference in New Issue
Block a user