partial #1886 - when a user is outside of delivery range, LET them continue after prompt

This commit is contained in:
Daniel Camargo 2013-11-20 20:32:18 -02:00
parent fb0b3c5ff7
commit e2948b36af
4 changed files with 26 additions and 2 deletions

View File

@ -410,3 +410,17 @@
</li>
</ul>
</div>
<div class="address-out-of-range-warning order-warning modal zoom-anim-dialog small-container mfp-hide">
<h1>Woops!</h1>
<p>The address <strong>{{order.form.address}}</strong> is out of delivery range, or you have entered an invalid address.<br/><br/>Please check your address, or order takeout.</p>
<ul>
<li>
<div ng-click="addressOutOfRangePlaceAnyway();">Place Order Anyway</div>
</li>
<li>
<div ng-click="addressLetMeChangeIt();">Modify Address</div>
</li>
</ul>
</div>

View File

@ -257,6 +257,9 @@ html[xmlns] .clearfix {
.order-warning, .order-warning h1{
font-size: 14px !important;
}
.order-warning p{
font-size: 12px;
}
.order-warning strong {
font-weight: bold;
}
@ -264,12 +267,13 @@ html[xmlns] .clearfix {
margin-top: 10px;
}
.order-warning ul li {
color: #d74924;
cursor: pointer;
margin: 10px 0;
text-decoration: underline;
font-size: 12px;
}
.show-more-restaurants {
color: #FFF;
font-size: 15px;

View File

@ -574,6 +574,11 @@ NGApp.controller('RestaurantCtrl', function ($scope, $http, $routeParams, $rootS
// Give time to close the modal.
setTimeout( function(){ order.submit( true );; }, 300 );
}
$scope.addressOutOfRangePlaceAnyway = function(){
$rootScope.closePopup();
// Give time to close the modal.
setTimeout( function(){ order.submit( true );; }, 300 );
}
$scope.giftCardCreditPayment = function(){
$rootScope.closePopup();

View File

@ -505,7 +505,8 @@ NGApp.factory('OrderService', function ($http, $location, $rootScope, $filter, A
distance = service.location.km2Miles( distance );
if (!service.restaurant.deliveryHere(distance)) {
App.alert('Sorry, you are out of delivery range or have an invalid address. <br>Please check your address, or order takeout.');
App.busy.unBusy();
App.dialog.show( '.address-out-of-range-warning' );
App.busy.unBusy();