#1101 (gift card changes)

Changed the place where the gift card is shown - desktop version.
This commit is contained in:
Daniel Camargo 2013-05-07 12:46:43 -03:00
parent 85b69ef394
commit 146e8a8aad
5 changed files with 39 additions and 8 deletions

View File

@ -8,9 +8,6 @@
<h1><%= restaurant.name %></h1>
</div>
<div class="restaurant-gift">
<h1>You have a <%= (App.config.ab && App.config.ab.dollarSign == 'show') ? '$' : '' %><span class="restaurant-gift-value"></span> gift card!</h1>
</div>
<% if (restaurant.message) { %>
<div class="restaurant-message">
<%= restaurant.message %>

View File

@ -22,6 +22,7 @@
<div class="signin-user"></div>
<div class="signin-icon"></div>
</div>
<div class="gift-card-message"></div>
</div>
</div>
<div class="body">

View File

@ -2931,7 +2931,29 @@ strong {
display: block;
max-width: 400px;
}
.gift-card-message{
color: #FFF;
display: none;
font-size: 13px;
text-shadow: 1px 1px 0px rgba(0,0,0,.72);
float: right;
margin-top: 12px;
margin-right: -12px;
box-shadow: -1px 1px 5px rgba(0,0,0,.2);
border-radius: 3px;
border: 1px solid #ac2903;
color: #FFF;
padding:7px 8px;
text-align: center;
background-color: #f24812;
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(255, 89, 31)), to(rgb(230, 55, 6)));
background-image: -webkit-linear-gradient(top, rgb(255, 89, 31), rgb(230, 55, 6));
background-image: -moz-linear-gradient(top, rgb(255, 89, 31), rgb(230, 55, 6));
background-image: -o-linear-gradient(top, rgb(255, 89, 31), rgb(230, 55, 6));
background-image: -ms-linear-gradient(top, rgb(255, 89, 31), rgb(230, 55, 6));
background-image: linear-gradient(top, rgb(255, 89, 31), rgb(230, 55, 6));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ff591f', EndColorStr='#e63706');
}
.order-restaurant{
cursor: pointer;
}

View File

@ -116,8 +116,11 @@ App.render = function(template, data) {
};
App.showPage = function(params) {
// switch here for AB testing
// Hides the gift card message
App.credit.hide();
// switch here for AB testing
App.currentPage = params.page;
if (params.title) {
document.title = params.title;

View File

@ -21,13 +21,21 @@ App.credit.getCredit = function( complete ){
}
}
App.credit.hide = function(){
$( '.gift-card-message' ).hide();
}
App.credit.show = function(){
var gift = App.credit.restaurant[App.restaurant.id];
if( parseFloat( gift ) ){
$( '.restaurant-gift-value' ).html( gift );
$( '.restaurant-gift' ).show();
var text = 'You have a '+ ( ( App.config.ab && App.config.ab.dollarSign == 'show') ? '$' : '' ) + App.ceil( gift ).toFixed( 2 ) + ' gift card!';
$( '.gift-card-message' ).html( text );
$( '.gift-card-message' ).css( 'opacity', 0 );
$( '.gift-card-message' ).show();
$( '.gift-card-message' ).animate( { 'opacity' : 1 }, 100 );
} else {
$( '.restaurant-gift' ).hide();
$( '.gift-card-message' ).hide();
}
}