Opción de configurar pedido más clara

This commit is contained in:
Juan Ferrer Toribio 2015-09-30 08:45:42 +02:00
parent 4aa9d206b4
commit a17a92b5eb
6 changed files with 32 additions and 18 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.224-deb8) stable; urgency=low hedera-web (1.225-deb8) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -2,10 +2,11 @@
<div id="form" class="basket"> <div id="form" class="basket">
<div class="box"> <div class="box">
<div class="header"> <div class="header">
<h1><t>ShoppingBasket</t></h1> <h1><t>Basket</t></h1>
<div class="action-bar"> <div class="action-bar">
<button on-click="onConfigureClick" title="_ConfigureOrder"> <button on-click="onConfigureClick" title="_ConfigureOrder">
<img class="config" src="image/dark/preferences.svg" alt=""/> <img class="config" src="image/dark/preferences.svg" alt=""/>
<t>ConfigureOrder</t>
</button> </button>
<button on-click="onCatalogClick"> <button on-click="onCatalogClick">
<img src="image/dark/menu.svg" alt=""/> <img src="image/dark/menu.svg" alt=""/>

View File

@ -165,6 +165,14 @@ Vn.Catalog = new Class
Htk.Toast.showError (_('YouMustBeLoggedIn')); Htk.Toast.showError (_('YouMustBeLoggedIn'));
} }
,onConfigClick: function ()
{
if (!Vn.Url.getQuery ('guest'))
this.hash.set ({'form': 'ecomerce/checkout'});
else
Htk.Toast.showError (_('YouMustBeLoggedIn'));
}
,nameRenderer: function (renderer, form) ,nameRenderer: function (renderer, form)
{ {
renderer.subtitle = form.get ('producer'); renderer.subtitle = form.get ('producer');

View File

@ -86,7 +86,7 @@
height: 1.8em; height: 1.8em;
} }
/* Menu */ /* Right panel */
.catalog div.menu .catalog div.menu
{ {
@ -99,7 +99,8 @@
background-color: white; background-color: white;
box-shadow: 0 0.2em 0.2em #AAA; box-shadow: 0 0.2em 0.2em #AAA;
} }
button.basket button.basket,
button.configure
{ {
width: 100%; width: 100%;
height: 3em; height: 3em;
@ -107,14 +108,23 @@ button.basket
text-align: center; text-align: center;
background-color: #00BCD4; background-color: #00BCD4;
border-radius: 0; border-radius: 0;
display: inline-block;
width: 50%;
margin: 0;
padding: 0;
} }
button.basket:hover button.basket:hover
{ {
background-color: #0AB; background-color: #0AB;
} }
button.configure
/* Realms */ {
background-color: #0097A7;
}
button.configure:hover
{
background-color: #00838F;
}
.realms-box .realms-box
{ {
box-shadow: 0 0 0.4em #AAA; box-shadow: 0 0 0.4em #AAA;
@ -138,9 +148,6 @@ button.basket:hover
{ {
opacity: 0.85; opacity: 0.85;
} }
/* Types */
.types-box .types-box
{ {
position: absolute; position: absolute;

View File

@ -109,7 +109,9 @@
</div> </div>
<div id="menu" class="menu" on-click="onMenuClick"> <div id="menu" class="menu" on-click="onMenuClick">
<button class="basket" on-click="onBasketClick"> <button class="basket" on-click="onBasketClick">
<t>ShoppingBasket</t> <t>Basket</t>
</button><button class="configure" on-click="onConfigClick">
<t>Configuration</t>
</button> </button>
<htk-repeater <htk-repeater
model="realms-model" model="realms-model"

View File

@ -65,21 +65,17 @@ Vn.Checkout = new Class
return; return;
if (this.$('order-form').numRows > 0) if (this.$('order-form').numRows > 0)
{
Htk.Toast.showMessage (_('OrderUpdated')); Htk.Toast.showMessage (_('OrderUpdated'));
window.history.back();
}
else else
{
Htk.Toast.showMessage (_('OrderStarted')); Htk.Toast.showMessage (_('OrderStarted'));
this.hash.set ({'form': 'ecomerce/catalog'});
} this.hash.set ({'form': 'ecomerce/catalog'});
} }
,onCancelClick: function () ,onCancelClick: function ()
{ {
if (this.$('order-form').numRows > 0) if (this.$('order-form').numRows > 0)
this.hash.set ({'form': 'ecomerce/basket'}); window.history.back();
else else
this.hash.set ({'form': 'ecomerce/orders'}); this.hash.set ({'form': 'ecomerce/orders'});
} }