ux change

This commit is contained in:
Daniel Camargo 2013-08-09 12:17:14 -03:00
parent 5fd1d9d61a
commit 38a5f0caa4
3 changed files with 24 additions and 10 deletions

View File

@ -50,10 +50,16 @@
<div class="your-order-label" style="font-weight: bold; display: none;">(we've chosen the most popular order, but you can order anything you want)</div>
<div class="divider"></div>
<div ng-show="!order.cart.hasItems()" class="order-begin">
Begin by clicking on anything from our curated menu on the left!
</div>
<div ng-show="order.info.deliveryMinDiff" class="delivery-minimum-error">
Add $<span class="delivery-min-diff">{{order.info.deliveryMinDiff}}</span> from menu to meet delivery minimum.
</div>
<!-- Cart's basket -->
<div>
@ -139,9 +145,9 @@
</div>
<div class="restaurant-payment-div"></div>
<!-- payment and user info -->
<form class="payment-form main-content-readable" ng-show="order.loaded">
<form class="payment-form main-content-readable" ng-show="order.loaded && order.cart.hasItems()">
<div class="restaurant-closed" ng-show="!restaurant.open()">
<div class="restaurant-closed-icon"></div>
@ -158,7 +164,7 @@
</div>
<div ng-show="restaurant._open && order.showForm">
<div ng-show="restaurant._open && order.showForm && order.cart.hasItems()">
<div class="content-item-name"><h1>Your Info</h1></div>
<div class="your-info-label">(enter this once, and we'll save it for next time)</div>
@ -324,10 +330,10 @@
</form>
<div ng-show="restaurant._open" class="button-bottom-wrapper" data-role="footer" data-position="fixed"><button class="button-bottom" ng-click="order.submit();"><div>Get Food</div></button></div>
<div ng-show="restaurant._open && order.cart.hasItems()" class="button-bottom-wrapper" data-role="footer" data-position="fixed"><button class="button-bottom" ng-click="order.submit();"><div>Get Food</div></button></div>
<!-- stored user info -->
<div class="delivery-payment-info main-content-readable" ng-show="restaurant._open && !order.showForm">
<div class="delivery-payment-info main-content-readable" ng-show="restaurant._open && !order.showForm && order.cart.hasItems()">
<div>
<label>Your phone number:&nbsp;</label>

View File

@ -2769,6 +2769,11 @@ strong {
clear: both;
}
.order-begin{
margin: 30px 0 15px 0 !important;
font-size: 15px;
}
/**
* unused blurs

View File

@ -249,13 +249,16 @@ NGApp.controller('restaurant', function ($scope, $http, $routeParams, Restaurant
$scope.order.cart = {};
$scope.order.cart.items = order.cart.items;
$scope.order.cart.add = function( item ){
order.cart.add( item );
return order.cart.add( item );
}
$scope.order.cart.remove = function( item ){
order.cart.remove( item );
return order.cart.remove( item );
}
$scope.order.cart.customizeItem = function(option, item){
order.cart.customizeItem( option, item );
return order.cart.customizeItem( option, item );
}
$scope.order.cart.hasItems = function(){
return order.cart.hasItems();
}
// watch cart changes
$scope.$watch( 'order.cart.items', function( newValue, oldValue, scope ) {
@ -321,7 +324,7 @@ NGApp.controller('restaurant', function ($scope, $http, $routeParams, Restaurant
document.title = $scope.restaurant.name + ' | Food Delivery | Order from ' + ( community.name ? community.name : 'Local') + ' Restaurants | Crunchbutton';
$('.body').css({ 'min-height': $('.restaurant-items').height()});
});