Updates for a treatment specific drawer

This commit is contained in:
John Costik
2014-08-09 21:41:16 -04:00
parent dc89499c41
commit 95d45bd624
4 changed files with 46 additions and 1 deletions
+2 -1
View File
@@ -10,4 +10,5 @@ static/bower_components/
.*.sw?
.vagrant
/iisnode
/iisnode
/web.config
+20
View File
@@ -17,6 +17,26 @@
#drawer i {
opacity: 0.6;
}
#treatmentDrawer {
background-color: #666;
border-left: 1px solid #999;
box-shadow: inset 4px 4px 5px 0px rgba(50, 50, 50, 0.75);
color: #eee;
display: none;
font-size: 16px;
height: calc(100% - 45px);
overflow-y: auto;
position: absolute;
margin-top: 45px;
right: -200px;
width: 400px;
top: 0;
z-index: 1;
}
#treatmentDrawer i {
opacity: 0.6;
}
#about {
margin-top: 1em;
}
+6
View File
@@ -103,6 +103,12 @@
</form>
</div>
<div id="treatmentDrawer">
<form id="settings-form">
</form>
</div>
<div class="audio alarms">
<audio src="/audio/alarm.mp3" preload="auto" loop="true" class="alarm mp3" type="audio/mp3"></audio>
<audio src="/audio/alarm2.mp3" preload="auto" loop="true" class="urgent alarm2 mp3" type="audio/mp3"></audio>
+18
View File
@@ -1,4 +1,5 @@
var drawerIsOpen = false;
var treatmentDrawerIsOpen = false;
var browserStorage = $.localStorage;
var defaultSettings = {
"units": "mg/dl",
@@ -132,6 +133,7 @@ function closeDrawer(callback) {
});
drawerIsOpen = false;
}
function openDrawer() {
drawerIsOpen = true;
$("#container").animate({marginLeft: "-200px"}, 300);
@@ -140,6 +142,22 @@ function openDrawer() {
$("#drawer").animate({right: "0"}, 300);
}
function closeTreatmentDrawer(callback) {
$("#container").animate({marginLeft: "0px"}, 500, callback);
$("#chartContainer").animate({marginLeft: "0px"}, 500);
$("#treatmentDrawer").animate({right: "-200px"}, 500, function() {
$("#treatmentDrawer").css("display", "none");
});
treatmentDrawerIsOpen = false;
}
function openTreatmentDrawer() {
treatmentDrawerIsOpen = true;
$("#container").animate({marginLeft: "-200px"}, 500);
$("#chartContainer").animate({marginLeft: "-200px"}, 500);
$("#treatmentDrawer").css("display", "block");
$("#treatmentDrawer").animate({right: "0"}, 500);
}
function closeNotification() {
var notify = $("#notification");