diff --git a/include/controllers/default/crunchbutton/api/build/index.php b/include/controllers/default/crunchbutton/api/build/index.php new file mode 100644 index 000000000..83db0e806 --- /dev/null +++ b/include/controllers/default/crunchbutton/api/build/index.php @@ -0,0 +1,51 @@ +dirs->view.'default/crunchbutton/frontend') as $fileInfo) { + if (!$fileInfo->isDot()) { + $files[] = 'view/'.$fileInfo->getBasename('.phtml').'.html'; + } + } + + // images + $exclude = [ + '/admin', + '/social', + '/mprinter', + '/micro', + '/giftcard', + '/food', + '/datepicker', + '/compat', + '/admin' + ]; + $path = c::config()->dirs->www.'assets/images'; + $dir = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS); + $fs = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::SELF_FIRST); + + foreach ($fs as $fileInfo) { + $p = str_replace($path,'',$fileInfo->getPath()); + if ($fileInfo->isFile() && ((!$p && substr($fileInfo->getBasename(),0,1) != '.') || ($p && !in_array($p, $exclude)))) { + $files[] = str_replace('//','/','images/'.$p.'/'.$fileInfo->getBasename()); + } + } + + // audio + $files[] = 'audio/crunch.mp3'; + $files[] = 'audio/crunch.ogg'; + + // javascript + $files[] = 'js/bundle.js'; + + // css + $files[] = 'css/bundle.css'; + + echo json_encode($files); + } +} diff --git a/include/controllers/default/crunchbutton/api/views/index.php b/include/controllers/default/crunchbutton/api/views/index.php deleted file mode 100644 index bf8b10533..000000000 --- a/include/controllers/default/crunchbutton/api/views/index.php +++ /dev/null @@ -1,14 +0,0 @@ -dirs->view.'default/crunchbutton/frontend') as $fileInfo) { - if (!$fileInfo->isDot()) { - $files[] = $fileInfo->getBasename('.phtml'); - } - } - - echo json_encode($files); - } -} diff --git a/include/views/default/crunchbutton/layout/html.body.phtml b/include/views/default/crunchbutton/layout/html.body.phtml index 8dfc380fa..7c18c7c21 100644 --- a/include/views/default/crunchbutton/layout/html.body.phtml +++ b/include/views/default/crunchbutton/layout/html.body.phtml @@ -96,8 +96,3 @@
- - \ No newline at end of file diff --git a/include/views/default/crunchbutton/layout/html.bottom.phtml b/include/views/default/crunchbutton/layout/html.bottom.phtml index 7b4fa2cb0..d581952f6 100644 --- a/include/views/default/crunchbutton/layout/html.bottom.phtml +++ b/include/views/default/crunchbutton/layout/html.bottom.phtml @@ -18,7 +18,7 @@ if ($this->community) { ?> if (c::config()->bundle) : ?> @@ -45,7 +45,7 @@ var _gmtServer = ''; foreach (new DirectoryIterator(c::config()->dirs->view.'default/crunchbutton/frontend') as $fileInfo) : ?> if (!$fileInfo->isDot()) : ?> - endif ; ?> diff --git a/www/assets/css/style.css b/www/assets/css/style.css index e8349ddef..db70da96d 100644 --- a/www/assets/css/style.css +++ b/www/assets/css/style.css @@ -17,7 +17,7 @@ body { font-size: 14px; } .bg { - background: #f5f5f5 url(/assets/images/groovepaper.png); + background: #f5f5f5 url(../images/groovepaper.png); } .pacman-loading{ display: none; @@ -30,7 +30,7 @@ body { } .nav { - background: url(/assets/images/nav-web.png); + background: url(../images/nav-web.png); height: 68px; background-size: 68px; box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.15); @@ -116,7 +116,7 @@ body { .logo-img { width: 299px; height: 37px; - background: url(/assets/images/logo-web.png) no-repeat; + background: url(../images/logo-web.png) no-repeat; background-size: 100%; } @@ -268,10 +268,10 @@ b { } .cart-button-add { - background: url(/assets/images/plus.png) no-repeat; + background: url(../images/plus.png) no-repeat; } .cart-button-remove { - background: url(/assets/images/xsign.png) no-repeat; + background: url(../images/xsign.png) no-repeat; margin-right: 4px; } @@ -298,7 +298,7 @@ b { .divider.dots { height: 1px; - background: url(/assets/images/bg_divider.gif); + background: url(../images/bg_divider.gif); opacity: .3; -moz-opacity: .30; filter: alpha(opacity=30); @@ -612,7 +612,7 @@ html[xmlns] .clearfix { content: " "; height: 24px; width: 24px; - background: url(/assets/images/submit-loader.gif) no-repeat; + background: url(../images/submit-loader.gif) no-repeat; display: block; position: absolute; margin-left: 268px; @@ -643,7 +643,7 @@ html[xmlns] .clearfix { .app-busy-loader-icon { margin: 0 auto; - background: url(/assets/images/loader.gif) no-repeat; + background: url(../images/loader.gif) no-repeat; width: 48px; height: 48px; margin-top: 25px; @@ -746,14 +746,14 @@ html[xmlns] .clearfix { } .location-detect-icon { - background: url(/assets/images/locate.png); + background: url(../images/locate.png); background-size: contain; height: 50px; width: 50px; } .location-detect-loader { - background: url(/assets/images/loader-location.gif); + background: url(../images/loader-location.gif); background-size: contain; height: 24px; width: 24px; @@ -766,7 +766,7 @@ html[xmlns] .clearfix { width: 45px; height: 30px; margin: 12px 0 0 10px; - background: url(/assets/images/location.png) no-repeat; + background: url(../images/location.png) no-repeat; background-size: contain; cursor: pointer; } @@ -776,7 +776,7 @@ html[xmlns] .clearfix { width: 45px; height: 30px; margin: 12px 0 0 10px; - background: url(/assets/images/menu.png) no-repeat; + background: url(../images/menu.png) no-repeat; background-size: contain; cursor: pointer; } @@ -979,7 +979,7 @@ html[xmlns] .clearfix { } .icon-pencil{ - background: url(/assets/images/pencil.png); + background: url(../images/pencil.png); display: inline-block; margin: 0 0 0 5px; height: 16px; @@ -1312,22 +1312,22 @@ html[xmlns] .clearfix { } .nav { box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.35); - background: url(/assets/images/nav.png); + background: url(../images/nav.png); height: 44px; background-size: 44px; } .ios7 .nav { - background: url(/assets/images/nav-ios7.png); + background: url(../images/nav-ios7.png); background-size: 54px; padding-top: 10px; } .bg { - background: #f5f5f5 url(/assets/images/crisp_paper_ruffles-mobile.png); + background: #f5f5f5 url(../images/crisp_paper_ruffles-mobile.png); } .logo-img { width: 168px; height: 23px; - background: url(/assets/images/logo.png) no-repeat; + background: url(../images/logo.png) no-repeat; background-size: 100%; margin-left: -84px; position: absolute; @@ -1524,7 +1524,7 @@ html[xmlns] .clearfix { position: absolute; top: 8px; left: 8px; - background: url(/assets/images/back.png) no-repeat; + background: url(../images/back.png) no-repeat; width: 51px; height: 31px; background-size: contain; @@ -1535,7 +1535,7 @@ html[xmlns] .clearfix { white-space: nowrap; } .cart-summary-icon { - background: url(/assets/images/cart.png) no-repeat; + background: url(../images/cart.png) no-repeat; height: 25px; width: 30px; margin: 5px 18px 0 10px; @@ -1600,7 +1600,7 @@ html[xmlns] .clearfix { .cart-button-add span { display: block; - background: url(/assets/images/plus2.png) no-repeat; + background: url(../images/plus2.png) no-repeat; height: 17px; width: 18px; background-size: contain; @@ -1610,7 +1610,7 @@ html[xmlns] .clearfix { } .cart-button-remove span { display: block; - background: url(/assets/images/xsign2.png) no-repeat; + background: url(../images/xsign2.png) no-repeat; width: 23px; height: 23px; background-size: contain; @@ -1677,7 +1677,7 @@ html[xmlns] .clearfix { } .pacman-loading{ - background: url(/assets/images/pacman.gif) no-repeat; + background: url(../images/pacman.gif) no-repeat; height: 24px; position: absolute; width: 24px; @@ -1698,7 +1698,7 @@ html[xmlns] .clearfix { position: absolute; top: 9px; left: -2px; - background: url(/assets/images/back.png) no-repeat; + background: url(../images/back.png) no-repeat; width: 51px; height: 31px; float: left; @@ -1708,7 +1708,7 @@ html[xmlns] .clearfix { } .signin-icon { - background: url(/assets/images/sign-in-icon.png) no-repeat !important; + background: url(../images/sign-in-icon.png) no-repeat !important; background-size: contain !important; cursor: pointer !important; float: right !important; @@ -1788,7 +1788,7 @@ html[xmlns] .clearfix { display: block; } .giftcard-badge{ - background: url(/assets/images/giftcard-badge.png) no-repeat; + background: url(../images/giftcard-badge.png) no-repeat; background-size: contain; width: 50px; height: 50px; @@ -1809,7 +1809,7 @@ html[xmlns] .clearfix { text-align: center; } .giftcard-badge-tooltip{ - background: #f5f5f5 url(/assets/images/groovepaper.png); + background: #f5f5f5 url(../images/groovepaper.png); border: 1px solid #999; border-radius: 3px; color:#666; @@ -1854,7 +1854,7 @@ html[xmlns] .clearfix { width: 45px; height: 30px; margin: 12px 0 0 10px; - background: url(/assets/images/location.png) no-repeat; + background: url(../images/location.png) no-repeat; background-size: contain; cursor: pointer; } @@ -1862,7 +1862,7 @@ html[xmlns] .clearfix { width: 45px; height: 30px; margin: 12px 0 0 10px; - background: url(/assets/images/menu.png) no-repeat; + background: url(../images/menu.png) no-repeat; background-size: contain; cursor: pointer; } @@ -2218,7 +2218,7 @@ html[xmlns] .clearfix { width: 60px; } .signin-icon { - background: url(/assets/images/sign-in.png) no-repeat; + background: url(../images/sign-in.png) no-repeat; background-size: contain; cursor: pointer; float: right; @@ -2226,7 +2226,7 @@ html[xmlns] .clearfix { width: 98px; } .signout-icon { - background: url(/assets/images/sign-out.png) no-repeat; + background: url(../images/sign-out.png) no-repeat; background-size: contain; cursor: pointer; float: right; @@ -2234,7 +2234,7 @@ html[xmlns] .clearfix { width: 110px; } .signin-user{ - background: url(/assets/images/sign-in-icon.png) no-repeat; + background: url(../images/sign-in-icon.png) no-repeat; background-size: contain; cursor: pointer; float: right; @@ -2378,7 +2378,7 @@ html[xmlns] .clearfix { } .tooltip-help-content{ - background: #f5f5f5 url(/assets/images/groovepaper.png); + background: #f5f5f5 url(../images/groovepaper.png); border: 1px solid #999; border-radius: 3px; color:#666; diff --git a/www/assets/css/styles.revised.css b/www/assets/css/styles.revised.css index f055aea37..d0f324403 100644 --- a/www/assets/css/styles.revised.css +++ b/www/assets/css/styles.revised.css @@ -391,6 +391,9 @@ html { .hidden-phone { display: none; } + .snap-content { + box-shadow: 0 0 10px 3px rgba(0,0,0,.2); + } } @media (min-width: 769px) { .visible-desktop { @@ -405,13 +408,6 @@ html { - -.snap-content { - box-shadow: 0 0 10px 3px rgba(0,0,0,.2); -} - - - .snap-drawers { background: #3d3731; color: #eee; @@ -527,7 +523,7 @@ html { transform: translate3d(0, 0, 0); } .menu-icon { - background: url(/assets/images/menu.png) no-repeat; + background: url(../images/menu.png) no-repeat; background-size: contain; cursor: pointer; float: left; diff --git a/www/assets/js/app.js b/www/assets/js/app.js index 2dd9e2827..0f5fdb780 100644 --- a/www/assets/js/app.js +++ b/www/assets/js/app.js @@ -149,75 +149,77 @@ NGApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $l .when('/location', { action: 'location', controller: 'location', - templateUrl: 'view/location.html' + templateUrl: 'assets/view/location.html' }) .when('/' + App.restaurants.permalink, { action: 'restaurants', controller: 'restaurants', - templateUrl: 'view/restaurants.html' + templateUrl: 'assets/view/restaurants.html' }) .when('/' + App.restaurants.permalink + '/:id', { action: 'restaurant', controller: 'restaurant', - templateUrl: 'view/restaurant.html' + templateUrl: 'assets/view/restaurant.html' }) .when('/legal', { action: 'legal', controller: 'legal', - templateUrl: 'view/legal.html' + templateUrl: 'assets/view/legal.html' }) .when('/help', { action: 'help', controller: 'help', - templateUrl: 'view/help.html' + templateUrl: 'assets/view/help.html' }) .when('/orders', { action: 'orders', controller: 'orders', - templateUrl: 'view/orders.html' + templateUrl: 'assets/view/orders.html' }) .when('/order/:id', { action: 'order', controller: 'order', - templateUrl: 'view/order.html' + templateUrl: 'assets/view/order.html' }) .when('/cities', { action: 'cities', controller: 'cities', - templateUrl: 'view/cities.html' + templateUrl: 'assets/view/cities.html' }) .when('/giftcard', { action: 'giftcard', controller: 'giftcard', - templateUrl: 'view/home.html' + templateUrl: 'assets/view/home.html' }) .when('/giftcard/:id', { action: 'giftcard', controller: 'giftcard', - templateUrl: 'view/home.html' + templateUrl: 'assets/view/home.html' }) .when('/reset', { action: 'reset', controller: 'reset', - templateUrl: 'view/home.html' + templateUrl: 'assets/view/home.html' }) .when('/reset/:id', { action: 'reset', controller: 'reset', - templateUrl: 'view/home.html' + templateUrl: 'assets/view/home.html' }) .when('/', { action: 'home', controller: 'home', - templateUrl: 'view/home.html' + templateUrl: 'assets/view/home.html' }) .otherwise({ action: 'home.default', controller: 'default', - templateUrl: 'view/home.html' + templateUrl: 'assets/view/home.html' }) ; - $locationProvider.html5Mode(true); + + // only use html5 enabled location stuff if its not in a phonegap container + $locationProvider.html5Mode(!App.isPhoneGap); }]); @@ -341,7 +343,7 @@ App.track = function() { */ App.trackProperty = function(prop, value) { // || App.config.env != 'live' - if (!App.config) { + if (App.config.env != 'live') { return; } @@ -357,7 +359,7 @@ App.trackProperty = function(prop, value) { */ App.identify = function() { if (App.config.env != 'live') { - //return; + return; } if (App.config.user.uuid) { mixpanel.identify(App.config.user.uuid);