Permalink
Browse files

"$msg"

  • Loading branch information...
robengel
robengel committed Jul 14, 2011
1 parent b730f0d commit 6e55a025da8a375c9c06b48e317cc2fd17cb8f6e
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -32,6 +32,7 @@ function Report() {
Report.prototype = new LogItem();
/* Global Variables */
+var menuOpen = false;
var places = [];
var clickedPosition;
var selectedPlace;
@@ -193,6 +194,10 @@ $(document).ready(function () {
createReport();
return false;
});
+
+ $(document).click(function(e){
+ closeMenu(e);
+ });
});
function createPlaceFromAddress() {
@@ -430,7 +435,7 @@ function showLog(place_id) {
}
if (noTasksAndReports)
- $('#logs').append('<li>No tasks or reports for this place...</li>');
+ $('#logs').append('<li>No tasks or reports</li>');
try {
$('#logs').listview("refresh");
@@ -537,7 +542,7 @@ function populateTasksForReport(selectedId) {
function switchViews() {
- $("#switch-view-button").val(views[selectedView]);
+ $("#switch-view-button").html(views[selectedView]);
switch (selectedView) {
case (requestView):
selectedView = reportView;
@@ -563,7 +568,7 @@ function pageResize() {
}
-
+ $("#menu").css("right", $(window).width() - (22 + $("#menu-button").position().left + $("#menu-button").width()) );
$('#map_canvas, #dim').height(page_height);
}
@@ -622,4 +627,24 @@ function refreshGps() {
if (gpsDenied)
return;
initiateGeolocation();
+}
+
+function showMenu(){
+ if (menuOpen)
+ return closeMenu();
+ menuOpen = true;
+ $("#menu-button").addClass("menu-button");
+ $(".open-menu").show();
+ $(".closed-menu").hide();
+ $("#menu").css("bottom", $(window).height() - $("#footer").position().top - 1);
+ $("#menu").css("right", $(window).width() - (22 + $("#menu-button").position().left + $("#menu-button").width()) );
+}
+
+function closeMenu(e){
+ if (!menuOpen || (e && e.target.id == "menu-button"))
+ return;
+ menuOpen = false;
+ $("#menu-button").removeClass("menu-button");
+ $(".open-menu").hide();
+ $(".closed-menu").show();
}
@@ -93,7 +93,7 @@ html, body {
.footer {
position: relative;
- height: 50px;
+ min-width: 310px;
}
.content {
@@ -256,4 +256,40 @@ select {
input[type='range'] {
width: 95%;
height: 40px;
+}
+
+#footer > div{
+ float: left;
+}
+
+#menu > div, #footer > div{
+ border-right: 1px solid white;
+ padding: 10px 10px;
+ font-size: smaller;
+ font-family: Helvetica, Arial, sans-serif;
+ font-weight: bold;
+}
+
+
+#footer > div:active{
+ color: #9cf;
+}
+
+
+.menu-button{
+ text-shadow: none;
+ color: #2A2A2A;
+ background: white;
+}
+
+#menu{
+ border: 1px solid #2A2A2A;
+ position: absolute;
+ background: white;
+ border-bottom: none;
+ z-index: 5;
+}
+
+.open-menu{
+ display: none;
}
@@ -25,12 +25,19 @@
<h1 class='ui-title' style="margin-left: 0px;margin-right: 0px;">GeoCam Cover</h1>
</div>
<div id="map_canvas"></div>
+ <div class="open-menu" id="menu">
+ <div>Hello World</div>
+ <div>Blah Blah Blah</div>
+ </div>
<div id="footer" class="footer ui-bar-a ui-header">
- <input type='button' onclick="return showPage('#address-form');" id="show-address-button" class='button ui-btn-left'
- value="Add Address"/>
- <input id="switch-view-button" class="button ui-btn-right" type='button' onclick="return switchViews();"
- value='Report View'/>
- </div>
+ <div onclick="return showPage('#address-form');" id="show-address-button">Search By Location</div>
+ <div onclick="return switchViews();" id="switch-view-button">Report View</div>
+ <div id="menu-button" onclick="showMenu();">
+ More
+ <img class="closed-menu" src="{{ MEDIA_URL }}images/moreArrow.png"/>
+ <img class="open-menu" src="{{ MEDIA_URL }}images/moreArrowBlack.png"/>
+ </div>
+ </div>
</div>
<div class="mobile-page" id="address-form">

0 comments on commit 6e55a02

Please sign in to comment.