From 8069ab64f28dd4f53acaed1aed15a85c12de7b22 Mon Sep 17 00:00:00 2001 From: arzynik Date: Wed, 24 Jul 2013 19:11:23 -0700 Subject: [PATCH] fixed a couple mobile issues --- .../default/crunchbutton/layout/html.bottom.phtml | 4 ++-- www/assets/css/style.css | 2 +- www/assets/js/app.js | 7 +++---- www/assets/js/services.navigation.js | 13 ++++++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/views/default/crunchbutton/layout/html.bottom.phtml b/include/views/default/crunchbutton/layout/html.bottom.phtml index 10edd082f..e477d7d87 100644 --- a/include/views/default/crunchbutton/layout/html.bottom.phtml +++ b/include/views/default/crunchbutton/layout/html.bottom.phtml @@ -21,6 +21,7 @@ if (App){
    +
  • Restaurants
  • Change Location
  • Order History
  • Help
  • @@ -47,11 +48,10 @@ if (App){
    - - + diff --git a/www/assets/css/style.css b/www/assets/css/style.css index b2b1db2e0..b7d03955b 100644 --- a/www/assets/css/style.css +++ b/www/assets/css/style.css @@ -1005,7 +1005,7 @@ html[xmlns] .clearfix { } .nav-back { - display: none; + } .meal-item-tag, .meal-item-tag-closed { diff --git a/www/assets/js/app.js b/www/assets/js/app.js index dbe934941..9092a26e6 100644 --- a/www/assets/js/app.js +++ b/www/assets/js/app.js @@ -514,6 +514,7 @@ $(function() { $(window).resize(function() { snapperCheck(); }); + App.snap = snapper; $.totalStorage.ls(App.localStorage); @@ -521,7 +522,6 @@ $(function() { App._init = true; App.NGinit(); - App.test.init(); $(document).on('touchclick', '.delivery-toggle-delivery', function(e) { @@ -654,8 +654,6 @@ $(function() { e.preventDefault(); }); */ - - } $('.dish-item').tap(function() { @@ -787,7 +785,8 @@ $(function() { focused = focused.get(0); if (focused.tagName == 'SELECT' || focused.tagName == 'INPUT' || focused.tagName == 'TEXTAREA') { - $('[data-position="fixed"]').hide(); + // @todo: fix this so it hides + //$('[data-position="fixed"]').hide(); } else { $('[data-position="fixed"]').show(); } diff --git a/www/assets/js/services.navigation.js b/www/assets/js/services.navigation.js index 3be5b2444..b03e92e5e 100644 --- a/www/assets/js/services.navigation.js +++ b/www/assets/js/services.navigation.js @@ -14,22 +14,25 @@ NGApp.factory( 'MainNavigationService', function( $http, $location, AccountServi service.link = function( path ){ $location.path( path || '/' ); + App.snap.close(); } service.signin = function(){ service.modal.signinOpen(); } - service.control = function(){ + service.control = function() { switch (service.page) { - case 'location': + case 'restaurant': service.buttons.location = false; - service.buttons.menu = true; + service.buttons.back = true; + service.buttons.menu = false; break; default: - service.buttons.location = true; - service.buttons.menu = false; + service.buttons.back = false; + service.buttons.location = false; + service.buttons.menu = true; break; } }