performance improvments
This commit is contained in:
parent
c5238f96db
commit
71514d81ee
31
include/views/default/seven/frontend/home.phtml
Normal file
31
include/views/default/seven/frontend/home.phtml
Normal file
@ -0,0 +1,31 @@
|
||||
<div class="top-pad"></div>
|
||||
|
||||
<div class="restaurants-bubble-wrap">
|
||||
<div class="bubble-tail bubble-tail-green bubble-animated">
|
||||
<div class="text" ng-switch="pushMessage">
|
||||
<span class="small" ng-switch-when="1">Push one of those restaurants down there.</span>
|
||||
<span ng-switch-when="2">The RESTAURANTS.</span>
|
||||
<span ng-switch-when="3">The AWESOME restaurants.</span>
|
||||
<span class="single-line" ng-switch-when="4">Down there.</span>
|
||||
<span class="single-line" ng-switch-when="5">NOT me!!</span>
|
||||
<span class="single-line" ng-switch-when="6">@#%*@%&!</span>
|
||||
<span class="single-line" ng-switch-when="7">...</span>
|
||||
<span class="single-line" ng-switch-when="8">....</span>
|
||||
<span class="single-line" ng-switch-when="9">.....</span>
|
||||
<span class="single-line" ng-switch-when="10">......</span>
|
||||
<span class="single-line" ng-switch-when="11">.......</span>
|
||||
<span class="single-line" ng-switch-when="12">........</span>
|
||||
<span class="single-line" ng-switch-when="13">I quit.</span>
|
||||
<span class="single-line" ng-switch-when="14"><i class="fa fa-suitcase"></i> <i class="fa fa-suitcase"></i> <i class="fa fa-suitcase"></i></span>
|
||||
<span ng-switch-default>Push a button.<br>Get food. </span>
|
||||
</div>
|
||||
<div class="bubble-tail-spacer"></div>
|
||||
</div>
|
||||
<div class="restaurants-orange" ng-instant="pushMessage = (pushMessage > 13 ? 0 : (pushMessage + 1))" instant-pass-thru></div>
|
||||
<div class="divider"></div>
|
||||
<div class="restaurants-tagline">
|
||||
<h1>Order the top local delivery food.</h1>
|
||||
<h2>Choose one of these awesome restaurants</h2>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
@ -250,7 +250,6 @@ NGApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $l
|
||||
|
||||
// global route change items
|
||||
NGApp.controller('AppController', function ($scope, $route, $http, $routeParams, $rootScope, $location, $window, AccountService, MainNavigationService, AccountSignOut, CartService, ReferralService, LocationService, PhoneGapService ) {
|
||||
|
||||
// define external pointers
|
||||
App.rootScope = $rootScope;
|
||||
App.location = $location;
|
||||
@ -263,6 +262,8 @@ NGApp.controller('AppController', function ($scope, $route, $http, $routeParams,
|
||||
$rootScope.signout = AccountSignOut;
|
||||
$rootScope.isPhoneGap = App.isPhoneGap;
|
||||
$rootScope.server = App.server;
|
||||
|
||||
$rootScope.animationClass = '';
|
||||
|
||||
$rootScope.debug = function() {
|
||||
return ( App.config && App.config.user && App.config.user.debug );
|
||||
@ -412,7 +413,7 @@ NGApp.controller('AppController', function ($scope, $route, $http, $routeParams,
|
||||
|
||||
App.parallax.bg = null;
|
||||
|
||||
App.setTop();
|
||||
App.scrollTop($rootScope.scrollTop);
|
||||
$rootScope.scrollTop = 0;
|
||||
|
||||
});
|
||||
@ -486,22 +487,34 @@ App.toggleMenu = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* scroll to the top of the page
|
||||
*/
|
||||
/*
|
||||
App.setTop = function() {
|
||||
$('html, body, .snap-content-inner').scrollTop(0);
|
||||
setTimeout(function() {
|
||||
$('html, body, .snap-content-inner').scrollTop(0);
|
||||
},13);
|
||||
|
||||
|
||||
/*
|
||||
$('#ng-view').css('-webkit-transform','translate3d(0,0,0)');
|
||||
setTimeout(function() {
|
||||
$('#ng-view').css('-webkit-transform','');
|
||||
},1000);
|
||||
*/
|
||||
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* scroll to the top of the page
|
||||
*/
|
||||
App.scrollTop = function(top) {
|
||||
setTimeout(function() {
|
||||
if (!top) {
|
||||
setTimeout(function() {
|
||||
$('html, body, .snap-content-inner').scrollTop(0);
|
||||
},10);
|
||||
}
|
||||
$('html, body, .snap-content-inner').animate({scrollTop: top || 0}, 10, $.easing.easeInOutQuart ? 'easeInOutQuart' : null);
|
||||
},3);
|
||||
};
|
||||
|
||||
@ -78,7 +78,7 @@ NGApp.controller('HomeCtrl', function ($scope, $http, $location, RestaurantsServ
|
||||
} else {
|
||||
$location.path('/location');
|
||||
}
|
||||
}
|
||||
}
|
||||
$location.replace();
|
||||
});
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ NGApp.factory( 'PhoneGapService', function( $route, $rootScope ){
|
||||
service.routeChanged = function( route ){
|
||||
|
||||
if( App.isPhoneGap && !App.splashHidden && ( !route || route == 'home' ) ){
|
||||
navigator.splashscreen.show();
|
||||
//navigator.splashscreen.show();
|
||||
} else {
|
||||
setTimeout( function(){
|
||||
navigator.splashscreen.hide();
|
||||
|
||||
@ -259,7 +259,7 @@ NGApp.factory('LocationService', function ($location, $rootScope, RestaurantsSer
|
||||
if ( parseInt( service.position.locs.length ) > 0 ) {
|
||||
service.restaurantsService.list(
|
||||
// success - has restaurants
|
||||
function () { App.go( '/food-delivery', 'push' ); },
|
||||
function () { App.go( '/food-delivery'); },
|
||||
// no restaurant
|
||||
function () {}
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user