forked from verdnatura/hedera-web
Version alpha del bionic
This commit is contained in:
parent
e81362c549
commit
609c90b06e
|
@ -44,7 +44,7 @@
|
|||
<p>
|
||||
<t>AllFieldsMandatory</t>
|
||||
</p>
|
||||
<button class="button">
|
||||
<button class="flat">
|
||||
<t>Send</t>
|
||||
</button>
|
||||
</form>
|
||||
|
|
|
@ -5,15 +5,7 @@ Vn.Basket = new Class
|
|||
|
||||
,orderId: null
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
// Configuring columns
|
||||
|
||||
this.$('column-amount').renderer = this.amountRender;
|
||||
this.$('column-subtotal').renderer = this.subtotalRender.bind (this);
|
||||
this.$('stems').renderer = this.stemsRender.bind (this);
|
||||
this.$('order-total').func = this.subtotal;
|
||||
}
|
||||
,activate: function () {}
|
||||
|
||||
,onCatalogClick: function ()
|
||||
{
|
||||
|
@ -32,7 +24,7 @@ Vn.Basket = new Class
|
|||
,onCheckoutClick: function ()
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'ecomerce/checkout',
|
||||
'form': 'ecomerce/confirm',
|
||||
'order': this.$('order').value
|
||||
});
|
||||
}
|
||||
|
@ -54,8 +46,15 @@ Vn.Basket = new Class
|
|||
model.set (row, 'amount', newValue * model.get (row, 'grouping'));
|
||||
}
|
||||
|
||||
,featuresRender: function (renderer, form)
|
||||
{
|
||||
renderer.value = form.get ('Medida') +' '+ form.get ('Categoria') +' '+ form.get ('Color');
|
||||
}
|
||||
|
||||
,stemsRender: function (renderer, form)
|
||||
{
|
||||
renderer.value = Vn.Value.format (form.get ('price'), '%.2d€') +' x '+ form.get ('amount');
|
||||
|
||||
if (form.get ('amount') > form.get ('available'))
|
||||
renderer.td.className = 'available-exceeded';
|
||||
else
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
.basket
|
||||
{
|
||||
padding: 1em;
|
||||
min-width: 65em;
|
||||
min-width: 25em;
|
||||
}
|
||||
.basket .box
|
||||
{
|
||||
max-width: 70em;
|
||||
max-width: 45em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.basket .form
|
||||
{
|
||||
padding: 1em;
|
||||
max-width: 20em;
|
||||
margin: 0;
|
||||
background-color: #009688;
|
||||
}
|
||||
|
||||
/* Data */
|
||||
|
||||
.basket td.label
|
||||
.basket .form > p
|
||||
{
|
||||
width: 10em;
|
||||
margin: 0;
|
||||
font-size: 1.4em;
|
||||
color: white;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Rows */
|
||||
|
|
|
@ -25,62 +25,42 @@
|
|||
<img src="image/dark/preferences.svg" alt=""/>
|
||||
<t>ConfigureOrder</t>
|
||||
</button>
|
||||
<button on-click="onCatalogClick">
|
||||
<img src="image/dark/menu.svg" alt=""/>
|
||||
<t>GoToCatalog</t>
|
||||
</button>
|
||||
<button on-click="onCheckoutClick">
|
||||
<img src="image/dark/ok.svg" alt=""/>
|
||||
<t>Checkout</t>
|
||||
</button>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="form">
|
||||
<div class="form-group">
|
||||
<label><t>OrderNumber</t></label>
|
||||
<htk-label column="id" form="order-form"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="total"><t>OrderTotal</t></label>
|
||||
<htk-text format="%.2d€">
|
||||
<db-calc-sum id="order-total" model="order-rows"/>
|
||||
</htk-text>
|
||||
<t>VATNotIncluded</t>
|
||||
</div>
|
||||
</div>
|
||||
<htk-grid>
|
||||
<htk-grid show-header="false">
|
||||
<db-model result-index="1" id="order-rows" updatable="true">
|
||||
CALL item (#warehouse, #date);
|
||||
SELECT m.id, i.grouping, m.amount, available, Article, Categoria,
|
||||
Medida, Tallos, Color, o.Abreviatura, price, fixed, Foto
|
||||
CALL bionic_by_order (@calc);
|
||||
SELECT m.id, m.amount, t.available, a.Article, a.Categoria,
|
||||
a.Medida, a.Tallos, a.Color, o.Abreviatura, m.price2 price, a.Foto
|
||||
FROM order_row_view m
|
||||
INNER JOIN vn2008.Articles a ON a.Id_Article = m.item_id
|
||||
LEFT JOIN vn2008.item_catalog i ON i.item_id = m.item_id
|
||||
LEFT JOIN vn2008.Origen o ON a.id_origen = o.id
|
||||
LEFT JOIN cache.bionic t ON m.warehouse_id = t.warehouse_id AND m.item_id = t.item_id AND t.calc_id = @calc
|
||||
WHERE m.order_id = #order;
|
||||
DROP TEMPORARY TABLE vn2008.item_catalog;
|
||||
<sql-batch property="batch">
|
||||
<item name="warehouse" param="warehouse"/>
|
||||
<item name="date" param="date"/>
|
||||
<item name="order" param="order"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
<htk-column-image column="Foto" directory="catalog" subdir="30x30" show-full="true"/>
|
||||
<htk-column-spin title="_Amount" editable="true" id="column-amount" on-changed="onAmountChange"/>
|
||||
<htk-column-text title="_Pack" column="grouping" format="x%.0d"/>
|
||||
<htk-column-spin title="_Stems" column="amount" id="stems" editable="true"/>
|
||||
<htk-column-spin title="_Avail" column="available"/>
|
||||
<htk-column-text title="_Item" column="Article"/>
|
||||
<htk-column-text title="_Cat" column="Categoria"/>
|
||||
<htk-column-text title="_S1" column="Medida"/>
|
||||
<htk-column-text title="_Stems" column="Tallos"/>
|
||||
<htk-column-text title="_Color" column="Color"/>
|
||||
<htk-column-text title="_Origin" column="Abreviatura"/>
|
||||
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>
|
||||
<htk-column-spin title="_Subtotal" unit="€" digits="2" id="column-subtotal"/>
|
||||
<htk-column-text renderer="featuresRender"/>
|
||||
<htk-column-text title="_Amount" column="amount" renderer="stemsRender"/>
|
||||
<htk-column-spin unit="€" digits="2" renderer="subtotalRender"/>
|
||||
</htk-grid>
|
||||
<div class="form">
|
||||
<p>
|
||||
<t>OrderTotal</t>
|
||||
<htk-text format="%.2d€">
|
||||
<db-calc-sum func="subtotal" model="order-rows"/>
|
||||
</htk-text>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -10,9 +10,8 @@ Vn.Catalog = new Class
|
|||
this.$('items-model').setInfo ('m', 'order_row_view', 'hedera', ['id'], 'id');
|
||||
this.$('items-model').setInfo ('a', 'Articles', 'vn2008', ['Id_Article']);
|
||||
|
||||
this.$('price').renderer = this.priceRenderer;
|
||||
this.$('type-column').renderer = this.typeRenderer.bind (this);
|
||||
this.$('cat').renderer = this.catRenderer;
|
||||
this.popup = new Htk.Popup ();
|
||||
this.popup.setChildNode (this.$('lots-popup'));
|
||||
|
||||
this.$('warehouse').value = 1;
|
||||
this.$('date').value = new Date ();
|
||||
|
@ -147,27 +146,10 @@ Vn.Catalog = new Class
|
|||
Vn.Node.setText (this.$('basket-button'), _('ShoppingBasket'));
|
||||
|
||||
var items = this.$('items-model');
|
||||
items.updatable = true;
|
||||
/* items.updatable = true;
|
||||
items.setDefaultFromColumn ('item_id', 'm', 'Id_Article');
|
||||
items.setDefaultFromValue ('order_id', 'm', orderId);
|
||||
|
||||
var amountCol = new Htk.ColumnSpin
|
||||
({
|
||||
title: 'Amount'
|
||||
,editable: true
|
||||
,renderer: this.amountRender
|
||||
});
|
||||
amountCol.on ('changed', this.amountChanged.bind (this));
|
||||
grid.insertColumn (1, amountCol);
|
||||
|
||||
var stemsCol = new Htk.ColumnSpin
|
||||
({
|
||||
title: 'Stems'
|
||||
,editable: true
|
||||
,column: 'amount'
|
||||
});
|
||||
grid.insertColumn (3, stemsCol);
|
||||
|
||||
*/
|
||||
this.$('warehouse').master = orderForm.getParam ('wh_id');
|
||||
this.$('date').master = orderForm.getParam ('date_send');
|
||||
}
|
||||
|
@ -195,6 +177,11 @@ Vn.Catalog = new Class
|
|||
this.hash.set ({'form': 'ecomerce/checkout'});
|
||||
}
|
||||
|
||||
,featuresRender: function (renderer, form)
|
||||
{
|
||||
renderer.value = form.get ('Medida') +' '+ form.get ('Categoria') +' '+ form.get ('Color');
|
||||
}
|
||||
|
||||
,typeRenderer: function (column, form)
|
||||
{
|
||||
column.href = this.hash.make ({'type': form.get ('tipo_id')}, true);
|
||||
|
@ -232,12 +219,74 @@ Vn.Catalog = new Class
|
|||
}
|
||||
}
|
||||
|
||||
,priceRenderer: function (column, form)
|
||||
,onAddItemClick: function (column, value, row, button)
|
||||
{
|
||||
if (form.get ('fixed'))
|
||||
column.td.className = 'fixed-price';
|
||||
var itemId = this.$('items-model').get (row, 'item_id')
|
||||
|
||||
var batch = this.$('lots-batch');
|
||||
batch.addValue ('item', itemId);
|
||||
batch.changed ();
|
||||
|
||||
this.itemId = itemId;
|
||||
this.onEraseClick ();
|
||||
this.popup.show (button);
|
||||
}
|
||||
|
||||
,onAddLotClick: function (column, value, row, button)
|
||||
{
|
||||
var model = this.$('item-lots');
|
||||
|
||||
var grouping = model.get (row, 'grouping');
|
||||
var warehouse = model.get (row, 'warehouse_id');
|
||||
var rate = model.get (row, 'rate');
|
||||
|
||||
for (var i = 0; i < this.items.length; i++)
|
||||
{
|
||||
var t = this.items[i];
|
||||
if (t.warehouse == warehouse && t.rate == rate)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i >= this.items.length)
|
||||
this.items.push ({
|
||||
warehouse: warehouse,
|
||||
rate: rate,
|
||||
amount: grouping
|
||||
});
|
||||
else
|
||||
column.td.className = 'aprox-price';
|
||||
t.amount += grouping;
|
||||
|
||||
this.$('amount').value += grouping;
|
||||
}
|
||||
|
||||
,onEraseClick: function ()
|
||||
{
|
||||
this.$('amount').value = 0;
|
||||
this.items = [];
|
||||
}
|
||||
|
||||
,onConfirmClick: function ()
|
||||
{
|
||||
if (this.items.length > 0)
|
||||
{
|
||||
var sql = '';
|
||||
var batch = new Sql.Batch ();
|
||||
var query = new Sql.String ({query: 'CALL order_row_new (#warehouse, #item, #rate, #amount);'});
|
||||
|
||||
for (var i = 0; i < this.items.length; i++)
|
||||
{
|
||||
var t = this.items[i];
|
||||
batch.addValue ('warehouse', t.warehouse);
|
||||
batch.addValue ('item', this.itemId);
|
||||
batch.addValue ('rate', t.rate);
|
||||
batch.addValue ('amount', t.amount);
|
||||
sql += query.render (batch);
|
||||
}
|
||||
|
||||
this.conn.execQuery (sql);
|
||||
}
|
||||
|
||||
this.popup.hide ();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
.catalog div.main .box
|
||||
{
|
||||
margin: 0 auto;
|
||||
max-width: 70em;
|
||||
min-width: 55em;
|
||||
max-width: 50em;
|
||||
min-width: 25em;
|
||||
}
|
||||
|
||||
.catalog .footer-message
|
||||
|
@ -212,6 +212,31 @@ button.basket:hover
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
/* Lots popup*/
|
||||
|
||||
div.amount
|
||||
{
|
||||
text-align: center;
|
||||
background-color: #009688;
|
||||
color: white;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
padding: 0.4em;
|
||||
}
|
||||
button.erase
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
button.confirm
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
button.erase > img,
|
||||
button.confirm > img
|
||||
{
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
/* List view */
|
||||
|
||||
.items
|
||||
|
|
|
@ -27,27 +27,56 @@
|
|||
<sql-search-tags param="search"/>
|
||||
</sql-filter-item>
|
||||
</sql-filter>
|
||||
<db-model result-index="1" main-table="m" id="items-model">
|
||||
CALL item (#warehouse, #date);
|
||||
SELECT i.grouping, m.amount, Foto, i.available, Article, Categoria,
|
||||
Medida, Tallos, Color, o.Abreviatura, price, fixed, m.id, Id_Article
|
||||
FROM vn2008.Articles a
|
||||
INNER JOIN vn2008.item_catalog i ON i.item_id = a.Id_Article
|
||||
<db-model result-index="1" id="items-model">
|
||||
CALL bionic_by_type (@calc, #type);
|
||||
SELECT t.warehouse_id, t.item_id, t.available, t.price,
|
||||
a.Foto, a.Article, a.Categoria, a.Medida, a.Tallos, a.Color, o.Abreviatura
|
||||
FROM cache.bionic t
|
||||
JOIN vn2008.Articles a ON a.Id_Article = t.item_id
|
||||
LEFT JOIN vn2008.Origen o ON a.id_origen = o.id
|
||||
LEFT JOIN order_row_view m
|
||||
ON m.item_id = a.Id_Article AND m.order_id = #order
|
||||
WHERE #filter AND available > 0
|
||||
ORDER BY Article, Medida
|
||||
WHERE t.calc_id = @calc AND t.available > 0
|
||||
ORDER BY a.Article, a.Medida
|
||||
LIMIT 400;
|
||||
DROP TEMPORARY TABLE vn2008.item_catalog;
|
||||
<sql-batch property="batch" id="batch">
|
||||
<item name="warehouse" param="warehouse"/>
|
||||
<item name="date" param="date"/>
|
||||
<item name="order" param="order"/>
|
||||
<item name="filter" object="filter"/>
|
||||
<item name="type" param="type"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
<db-model id="item-lots" result-index="1">
|
||||
CALL bionic_by_type (@calc, #type);
|
||||
SELECT warehouse_id, items, grouping, price, rate
|
||||
FROM cache.bionic_lot
|
||||
WHERE calc_id = @calc
|
||||
AND item_id = #item
|
||||
ORDER BY warehouse_id, grouping;
|
||||
<sql-batch property="batch" id="lots-batch" blocked="true">
|
||||
<item name="type" param="type"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
</vn-group>
|
||||
<div id="lots-popup" class="lots-popup">
|
||||
<htk-grid class="lots-grid" model="item-lots" show-header="false">
|
||||
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>
|
||||
<htk-column-text title="_Pack" column="grouping" format="x%.0d"/>
|
||||
<htk-column-button
|
||||
column="id"
|
||||
image="image/add.svg"
|
||||
tip="_Add"
|
||||
on-clicked="onAddLotClick"/>
|
||||
</htk-grid>
|
||||
<div class="amount">
|
||||
<button on-click="onEraseClick" title="_Erase" class="erase">
|
||||
<img
|
||||
src="image/dark/delete.svg"
|
||||
alt="_Erase"/>
|
||||
</button>
|
||||
<htk-text id="amount"/>
|
||||
<button on-click="onConfirmClick" title="_Confirm" class="confirm">
|
||||
<img
|
||||
src="image/dark/ok.svg"
|
||||
alt="_Confirm"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="form" class="catalog">
|
||||
<div class="center">
|
||||
<div class="main">
|
||||
|
@ -63,18 +92,28 @@
|
|||
<input type="text" id="search-entry" on-change="onSearch"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
<htk-grid empty-message="_SelectSubtype" id="items-grid" class="items" model="items-model">
|
||||
<htk-column-image title="*" column="Foto" directory="catalog" subdir="200x200" show-full="true" editable="true"/>
|
||||
<htk-column-text title="_Pack" column="grouping" format="x%.0d"/>
|
||||
<htk-column-spin title="_Aval" column="available"/>
|
||||
<htk-column-image
|
||||
title="*"
|
||||
column="Foto"
|
||||
directory="catalog"
|
||||
subdir="200x200"
|
||||
show-full="true"
|
||||
editable="true"/>
|
||||
<htk-column-text title="_Name" column="Article"/>
|
||||
<htk-column-text title="_Cat" column="Categoria" id="cat"/>
|
||||
<htk-column-text title="_S1" column="Medida"/>
|
||||
<htk-column-text title="_Color" column="Color"/>
|
||||
<htk-column-text title="_Tallos" column="Tallos"/>
|
||||
<htk-column-text title="_Origin" column="Abreviatura"/>
|
||||
<htk-column-spin title="_Price" column="price" digits="2" unit="€" id="price"/>
|
||||
<htk-column-text title="_Cat" renderer="featuresRender"/>
|
||||
<htk-column-spin title="_Aval" column="available"/>
|
||||
<htk-column-text
|
||||
title="_Price"
|
||||
column="price"
|
||||
format="_from %.2d€"/>
|
||||
<htk-column-button
|
||||
column="id"
|
||||
image="image/add.svg"
|
||||
tip="_AddToBasket"
|
||||
on-clicked="onAddItemClick"/>
|
||||
</htk-grid>
|
||||
<p class="footer-message">
|
||||
<t>IndicativePhotos</t>
|
||||
|
@ -94,13 +133,12 @@
|
|||
<div class="types-box">
|
||||
<htk-grid class="types" empty-message="_SelectFamily">
|
||||
<db-model id="types-model" on-status-changed="onTypesReload">
|
||||
SELECT tipo_id, Tipo FROM vn2008.Tipos
|
||||
WHERE reino_id = #realm AND Orden != 0 ORDER BY Orden DESC, Tipo
|
||||
CALL type_list (#realm)
|
||||
<sql-batch property="batch">
|
||||
<item name="realm" param="realm"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
<htk-column-link title="_Subtype" column="Tipo" id="type-column"/>
|
||||
<htk-column-link title="_Subtype" column="Tipo" renderer="typeRenderer"/>
|
||||
</htk-grid>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -113,7 +113,7 @@ Vn.Checkout = new Class
|
|||
|
||||
,onCancelClick: function ()
|
||||
{
|
||||
this.hash.set ({'form': 'ecomerce/orders'});
|
||||
window.history.back();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.checkout
|
||||
{
|
||||
padding: 1em;
|
||||
max-width: 50em;
|
||||
max-width: 40em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.checkout .form
|
||||
|
|
|
@ -5,15 +5,6 @@
|
|||
<vn-param id="order-id">
|
||||
<vn-hash-link key="order"/>
|
||||
</vn-param>
|
||||
<db-form id="order-form" on-status-changed="onStatusChange">
|
||||
<db-model updatable="true">
|
||||
SELECT id, date_send, wh_id, delivery_method_id, agency_id, address_id, note
|
||||
FROM order_view WHERE id = #id
|
||||
<sql-batch property="batch">
|
||||
<item name="id" param="order-id"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
</db-form>
|
||||
<db-form id="defaults" on-iter-changed="onDefaults">
|
||||
<db-model>
|
||||
SELECT address_id, agency_id, delivery_method
|
||||
|
@ -48,7 +39,7 @@
|
|||
step-count="5"
|
||||
step-func="stepFunc"
|
||||
node="assistant-node"/>
|
||||
<div class="htk-assistant" id="assistant-node">
|
||||
<div id="assistant-node">
|
||||
<div id="date-step">
|
||||
<h2 id="date-question"><t>OrderDateDeliveryQuestion</t></h2>
|
||||
<div class="answers">
|
||||
|
@ -96,13 +87,20 @@
|
|||
<h2><t>AgencyQuestion</t></h2>
|
||||
<div class="answers target">
|
||||
<htk-combo id="agency-combo" param="agency" on-changed="onFieldChange">
|
||||
<db-model property="model" id="agencies">
|
||||
<db-model property="model" id="agencies" result-index="1">
|
||||
CALL agency_list_by_date (#date, #address);
|
||||
SELECT a.Id_Agencia, a.description
|
||||
FROM vn2008.Agencias a
|
||||
FROM t_agency t
|
||||
JOIN vn2008.Agencias a ON a.Id_Agencia = t.agency_id
|
||||
JOIN vn2008.Vistas v ON a.Vista = v.vista_id
|
||||
WHERE a.web != FALSE
|
||||
AND v.code = 'AGENCY'
|
||||
ORDER BY a.description
|
||||
ORDER BY a.description;
|
||||
DROP TEMPORARY TABLE t_agency;
|
||||
<sql-batch property="batch">
|
||||
<item name="address" param="address"/>
|
||||
<item name="date" param="date"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
</div>
|
||||
|
@ -137,7 +135,7 @@
|
|||
<htk-text form="agency-combo" column="description"/>
|
||||
</p>
|
||||
<button class="thin" on-click="onConfirmClick">
|
||||
<t>CONFIRM</t>
|
||||
<t>Confirm</t>
|
||||
</button>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
|
@ -156,7 +154,7 @@
|
|||
<t>ReceiveThroughtRoute</t>
|
||||
</p>
|
||||
<button class="thin" on-click="onConfirmClick">
|
||||
<t>CONFIRM</t>
|
||||
<t>Confirm</t>
|
||||
</button>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
|
@ -173,7 +171,7 @@
|
|||
<htk-text form="warehouse-combo" column="description"/>
|
||||
</p>
|
||||
<button class="thin" on-click="onConfirmClick">
|
||||
<t>CONFIRM</t>
|
||||
<t>Confirm</t>
|
||||
</button>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
|
||||
Vn.Confirm = new Class
|
||||
({
|
||||
Extends: Vn.Module
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
this.tpv = new Vn.Tpv (this.conn, this.hash);
|
||||
}
|
||||
|
||||
,onStatusChange: function (form)
|
||||
{
|
||||
if (form.row != -1)
|
||||
this.$('total').value = form.get ('tax_base') + form.get ('vat');
|
||||
else
|
||||
this.$('total').value = null;
|
||||
}
|
||||
|
||||
,disableButtons: function (disable)
|
||||
{
|
||||
this.$('modify').disabled = disable;
|
||||
this.$('confirm').disabled = disable;
|
||||
}
|
||||
|
||||
,onModifyClick: function ()
|
||||
{
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
,onConfirmClick: function ()
|
||||
{
|
||||
// var query = 'CALL order_confirm (#order)';
|
||||
var query = 'SELECT TRUE ok, customer_get_debt() debt';
|
||||
|
||||
var batch = new Sql.Batch ();
|
||||
batch.addParam ('order', this.$('order-id'));
|
||||
|
||||
this.conn.execQuery (query, this.confirmDone.bind (this), batch);
|
||||
}
|
||||
|
||||
,confirmDone: function (resultSet)
|
||||
{
|
||||
var res = resultSet.fetchResult ();
|
||||
|
||||
if (!(res && res.next()))
|
||||
this.goBasket ();
|
||||
|
||||
Vn.Cookie.unset ('order');
|
||||
this.pay = res.get ('debt') > this.$('order-form').get ('credit');
|
||||
|
||||
this.popup = new Htk.Popup ();
|
||||
this.popup.setChildNode (this.$('success-dialog'));
|
||||
this.popup.showCenter ();
|
||||
}
|
||||
|
||||
,onAcceptClick: function ()
|
||||
{
|
||||
this.popup.hide ();
|
||||
|
||||
if (this.pay)
|
||||
this.tpv.pay (this.$('total').value,
|
||||
this.$('order-form').get ('company_id'));
|
||||
else
|
||||
this.hash.set ({'form': 'ecomerce/orders'});
|
||||
}
|
||||
});
|
||||
|
||||
Vn.Tpv = new Class
|
||||
({
|
||||
initialize: function (conn, hash)
|
||||
{
|
||||
this.conn = conn;
|
||||
this.hash = hash;
|
||||
|
||||
var tpvStatus = this.hash.get ('tpv_status');
|
||||
|
||||
if (tpvStatus)
|
||||
{
|
||||
var batch = new Sql.Batch ();
|
||||
batch.addValue ('transaction', this.hash.get ('tpv_order'));
|
||||
batch.addValue ('status', tpvStatus);
|
||||
|
||||
var query = 'CALL transaction_end (#transaction, #status)';
|
||||
|
||||
this.conn.execQuery (query, null, batch);
|
||||
}
|
||||
}
|
||||
|
||||
,pay: function (amount, company)
|
||||
{
|
||||
if (amount > 0)
|
||||
{
|
||||
var query = 'CALL transaction_start (#company, #amount)';
|
||||
|
||||
var batch = new Sql.Batch ();
|
||||
batch.addValue ('company', company);
|
||||
batch.addValue ('amount', parseInt (amount * 100));
|
||||
|
||||
this.conn.execQuery (query,
|
||||
this.onTransactionStart.bind (this), batch);
|
||||
}
|
||||
else if (!isNaN (amount))
|
||||
(new Htk.Toast ()).showError (_('AmountError'));
|
||||
}
|
||||
|
||||
,onTransactionStart: function (resultSet)
|
||||
{
|
||||
var res = resultSet.fetchResult ();
|
||||
|
||||
if (res && res.next ())
|
||||
{
|
||||
var form = document.createElement ('form');
|
||||
form.method = 'post';
|
||||
form.action = res.get ('url');
|
||||
document.body.appendChild (form);
|
||||
|
||||
var fieldsMap =
|
||||
{
|
||||
'Ds_Merchant_Amount': 'amount'
|
||||
,'Ds_Merchant_Order': 'ds_order'
|
||||
,'Ds_Merchant_MerchantCode': 'id'
|
||||
,'Ds_Merchant_Currency': 'currency'
|
||||
,'Ds_Merchant_TransactionType': 'transaction_type'
|
||||
,'Ds_Merchant_Terminal': 'terminal'
|
||||
,'Ds_Merchant_MerchantURL': 'merchant_url'
|
||||
,'Ds_Merchant_MerchantSignature': 'signature'
|
||||
,'Ds_Merchant_UrlOK': null
|
||||
,'Ds_Merchant_UrlKO': null
|
||||
};
|
||||
|
||||
for (var field in fieldsMap)
|
||||
{
|
||||
var input = document.createElement ('input');
|
||||
input.type = 'hidden';
|
||||
input.name = field;
|
||||
form.appendChild (input);
|
||||
|
||||
if (fieldsMap[field])
|
||||
input.value = res.get (fieldsMap[field]);
|
||||
}
|
||||
|
||||
var transactionId = res.get ('ds_order');
|
||||
form['Ds_Merchant_UrlOK'].value = this.makeUrl ('ok', transactionId);
|
||||
form['Ds_Merchant_UrlKO'].value = this.makeUrl ('ko', transactionId);
|
||||
|
||||
form.submit ();
|
||||
}
|
||||
else
|
||||
alert (_('PayError'));
|
||||
}
|
||||
|
||||
,makeUrl: function (status, order)
|
||||
{
|
||||
var path = location.protocol +'//'+ location.host;
|
||||
path += location.port ? ':'+ location.port : '';
|
||||
path += location.pathname;
|
||||
path += location.search ? location.search : '';
|
||||
path += this.hash.make ({
|
||||
'tpv_status': status,
|
||||
'tpv_order': order
|
||||
}, true);
|
||||
|
||||
return path;
|
||||
}
|
||||
});
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
Vn.Shipping = new Class
|
||||
({
|
||||
Extends: Vn.Module
|
||||
|
||||
,activate: function ()
|
||||
{
|
||||
// Loading order
|
||||
|
||||
this.orderId = this.$('order-id');
|
||||
|
||||
if (!this.orderId.value)
|
||||
{
|
||||
var orderId = Vn.Cookie.getInt ('order');
|
||||
|
||||
if (!orderId)
|
||||
{
|
||||
var sql = 'INSERT INTO order_view (date_send) VALUES (CURDATE());'
|
||||
+'SELECT LAST_INSERT_ID();';
|
||||
this.conn.execQuery (sql, this.orderCreated.bind (this));
|
||||
}
|
||||
else
|
||||
this.orderId.value = orderId;
|
||||
}
|
||||
|
||||
this.onDeliveryChange ();
|
||||
}
|
||||
|
||||
,onStatusChange: function (form)
|
||||
{
|
||||
if (this.$('address').value == 0)
|
||||
form.insertRow ();
|
||||
}
|
||||
|
||||
,onOperationsDone: function ()
|
||||
{
|
||||
this.onReturnClick ();
|
||||
}
|
||||
|
||||
,onAcceptClick: function ()
|
||||
{
|
||||
this.$('iter').performOperations ();
|
||||
}
|
||||
|
||||
,onReturnClick: function ()
|
||||
{
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
,goBasket: function ()
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'ecomerce/basket',
|
||||
'order': this.$('order-id').value
|
||||
});
|
||||
}
|
||||
|
||||
,onDeliveryChange: function ()
|
||||
{
|
||||
var showAgencies = false;
|
||||
var showAdresses = false;
|
||||
var showStores = false;
|
||||
var deliveryMethod = parseInt (this.$('delivery').value);
|
||||
|
||||
switch (deliveryMethod)
|
||||
{
|
||||
case 1: // AGENCY
|
||||
var showAgencies = true;
|
||||
var showAdresses = true;
|
||||
break;
|
||||
case 2: // DELIVERY
|
||||
var showAdresses = true;
|
||||
break;
|
||||
case 3: // PICKUP
|
||||
var showStores = true;
|
||||
break;
|
||||
}
|
||||
|
||||
this.$('agencies-div').style.display = showAgencies ? '' : 'none';
|
||||
this.$('addresses-div').style.display = showAdresses ? '' : 'none';
|
||||
this.$('stores-div').style.display = showStores ? '' : 'none';
|
||||
}
|
||||
|
||||
,onConfirmClick: function ()
|
||||
{
|
||||
if (!confirm (_('SureConfirmOrder')))
|
||||
return;
|
||||
|
||||
var query = 'CALL order_confirm (#order)';
|
||||
|
||||
var batch = new Sql.Batch ();
|
||||
batch.addParam ('order', this.$('order-id'));
|
||||
|
||||
this.conn.execQuery (query, this.confirmDone.bind (this), batch);
|
||||
}
|
||||
|
||||
,confirmDone: function (resultSet)
|
||||
{
|
||||
if (resultSet.fetchResult ())
|
||||
{
|
||||
Vn.Cookie.unset ('order');
|
||||
this.hash.set ({'form': 'ecomerce/orders'});
|
||||
|
||||
(new Htk.Toast ()).showMessage (_('OrderConfirmed'));
|
||||
}
|
||||
else
|
||||
this.goBasket ();
|
||||
}
|
||||
|
||||
,onAddAddressClick: function ()
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'account/address',
|
||||
'address': 0
|
||||
});
|
||||
}
|
||||
|
||||
,onEditAddressClick: function (button, form)
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'account/address',
|
||||
'address': form.get ('id')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -1,87 +1,84 @@
|
|||
.shipping
|
||||
.confirm
|
||||
{
|
||||
padding: 1em;
|
||||
}
|
||||
.shipping
|
||||
{
|
||||
max-width: 70em;
|
||||
max-width: 40em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
table.form td.label
|
||||
.confirm h2
|
||||
{
|
||||
width: 30%;
|
||||
padding: 0;
|
||||
font-size: 1.6em;
|
||||
color: black;
|
||||
margin: 0 3em;
|
||||
}
|
||||
|
||||
/* Checkout */
|
||||
|
||||
.checkout .form
|
||||
.confirm .form
|
||||
{
|
||||
margin: 0 auto;
|
||||
max-width: 25em;
|
||||
padding: 3em 4em;
|
||||
color: #555;
|
||||
}
|
||||
.confirm .form p,
|
||||
.confirm .form select,
|
||||
.confirm .form button
|
||||
{
|
||||
font-size: 1.4em;
|
||||
}
|
||||
.confirm .form > div.section
|
||||
{
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
.confirm .form p
|
||||
{
|
||||
margin: .2em 0;
|
||||
}
|
||||
.confirm .form p.small
|
||||
{
|
||||
font-size: 1em;
|
||||
}
|
||||
.button-bar
|
||||
{
|
||||
margin-top: 2em;
|
||||
}
|
||||
.modify-order
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
.confirm-order
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Success dialog */
|
||||
|
||||
.success-dialog
|
||||
{
|
||||
padding: 2em;
|
||||
min-width: 30em;
|
||||
max-width: 35em;
|
||||
}
|
||||
.success-dialog *
|
||||
{
|
||||
font-weight: normal;
|
||||
color: #555;
|
||||
}
|
||||
.success-dialog p,
|
||||
.success-dialog button
|
||||
{
|
||||
font-size: 1.4em;
|
||||
}
|
||||
.success-dialog img
|
||||
{
|
||||
float: left;
|
||||
height: 3em;
|
||||
margin-top: 0;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
.success-dialog p
|
||||
{
|
||||
padding: 0;
|
||||
}
|
||||
.success-dialog > button
|
||||
{
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
/* Form */
|
||||
|
||||
.form-group
|
||||
{
|
||||
padding: 0.4em;
|
||||
}
|
||||
.form-group > label
|
||||
{
|
||||
display: block;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.form-group > input[type=text],
|
||||
.form-group > input[type=password],
|
||||
.form-group > select,
|
||||
.form-group > textarea
|
||||
{
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Delivery method */
|
||||
|
||||
ul.delivery
|
||||
{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding-top: 0.8em;
|
||||
padding-left: 1em;
|
||||
}
|
||||
ul.delivery > li
|
||||
{
|
||||
margin: 0.2em 0;
|
||||
}
|
||||
ul.delivery input
|
||||
{
|
||||
margin-right: 0.4em;
|
||||
}
|
||||
|
||||
/* Addresses */
|
||||
|
||||
div.addresses
|
||||
{
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.addresses > .form
|
||||
{
|
||||
margin: 0 auto;
|
||||
padding: 2em;
|
||||
max-width: 25em;
|
||||
}
|
||||
.address
|
||||
{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.address p
|
||||
{
|
||||
margin: 0.2em 0;
|
||||
}
|
||||
.address .actions
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
|
|
@ -3,148 +3,91 @@
|
|||
<vn-param id="order-id">
|
||||
<vn-hash-link key="order"/>
|
||||
</vn-param>
|
||||
<db-form id="order-form" on-status-changed="onStatusChange">
|
||||
<db-form id="order-form">
|
||||
<db-model updatable="true">
|
||||
SELECT id, delivery_method_id, agency_id, address_id, note
|
||||
FROM order_view WHERE id = #id
|
||||
SELECT o.id, o.date_send, o.delivery_method_id, o.note,
|
||||
ag.description agency, o.company_id, ad.consignee, ad.zip_code,
|
||||
ad.city, ad.name address, c.credit
|
||||
FROM order_view o
|
||||
JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id
|
||||
LEFT JOIN address_view ad ON ad.id = o.address_id
|
||||
JOIN customer_view c
|
||||
WHERE o.id = #order
|
||||
<sql-batch property="batch">
|
||||
<item name="id" param="order-id"/>
|
||||
<item name="order" param="order-id"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
<db-param column="date_send" id="date"/>
|
||||
<db-param column="wh_id" id="warehouse"/>
|
||||
<db-param column="address_id" id="address"/>
|
||||
</db-form>
|
||||
<db-model id="addresses" updatable="true">
|
||||
SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
|
||||
FROM address_view a
|
||||
LEFT JOIN vn2008.province p ON a.province_id = p.province_id
|
||||
JOIN vn2008.Paises c ON c.Id = p.Paises_Id
|
||||
WHERE active != FALSE
|
||||
<db-form id="total-form" on-iter-changed="onStatusChange">
|
||||
<db-model result-index="1">
|
||||
CALL order_get_vat (#order);
|
||||
SELECT SUM(tax_base) tax_base, SUM(vat + surcharge) vat
|
||||
FROM t_order_vat;
|
||||
DROP TEMPORARY TABLE t_order_vat;
|
||||
<sql-batch property="batch">
|
||||
<item name="order" param="order-id"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
</db-form>
|
||||
</vn-group>
|
||||
<div id="form" class="checkout">
|
||||
<div id="form" class="confirm">
|
||||
<div class="box">
|
||||
<div class="header">
|
||||
<h1><t>Checkout</t></h1>
|
||||
<div class="action-bar">
|
||||
<button on-click="goBasket">
|
||||
<img src="image/dark/go-previous.svg" alt=""/>
|
||||
<t>GoBasket</t>
|
||||
<h1><t>OrderSummary</t></h1>
|
||||
</div>
|
||||
<div class="form">
|
||||
<div class="section">
|
||||
<p>
|
||||
<t>Llegada</t>
|
||||
<htk-text format="_%A, %e of %B" form="order-form" column="date_send"/>
|
||||
</p>
|
||||
<p class="small">
|
||||
<t>Agency</t>
|
||||
<htk-text form="order-form" column="agency"/>
|
||||
</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<p>
|
||||
<htk-text form="order-form" column="consignee"/>
|
||||
</p>
|
||||
<p class="small">
|
||||
<htk-text form="order-form" column="address"/>
|
||||
</p>
|
||||
<p class="small">
|
||||
<htk-text form="order-form" column="zip_code"/>,
|
||||
<htk-text form="order-form" column="city"/>
|
||||
</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<p>
|
||||
<t>Total</t> <htk-text id="total" format="%.2d€"/>
|
||||
</p>
|
||||
<p class="small">
|
||||
(<t>TaxBase</t> <htk-text form="total-form" column="tax_base" format="%.2d€"/> +
|
||||
<t>VAT</t> <htk-text form="total-form" column="vat" format="%.2d€"/>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<button on-click="onModifyClick" id="modify" class="thin modify-order">
|
||||
<t>Modify</t>
|
||||
</button>
|
||||
<button on-click="onConfirmClick">
|
||||
<img src="image/dark/ok.svg" alt=""/>
|
||||
<button on-click="onConfirmClick" id="confirm" class="thin confirm-order">
|
||||
<t>Confirm</t>
|
||||
</button>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="form">
|
||||
<div class="form-group">
|
||||
<t>DeliveryMethod</t>
|
||||
<htk-radio-group
|
||||
id="delivery"
|
||||
form="order-form"
|
||||
column="delivery_method_id"
|
||||
on-changed="onDeliveryChange"/>
|
||||
<ul class="delivery">
|
||||
<li>
|
||||
<!-- PICKUP -->
|
||||
<htk-radio radio-group="delivery" value="3"/>
|
||||
<label><t>PickupInStore</t></label>
|
||||
</li>
|
||||
<li>
|
||||
<!-- DELIVERY -->
|
||||
<htk-radio radio-group="delivery" value="2"/>
|
||||
<label><t>HomeDelivery</t></label>
|
||||
</li>
|
||||
<li>
|
||||
<!-- AGENCY -->
|
||||
<htk-radio radio-group="delivery" value="1"/>
|
||||
<label><t>TransportAgency</t></label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="form-group" id="agencies-div">
|
||||
<label><t>ShippingAgency</t></label>
|
||||
<htk-combo form="order-form" column="agency_id">
|
||||
<db-model property="model">
|
||||
SELECT a.Id_Agencia, a.description
|
||||
FROM vn2008.Agencias a
|
||||
JOIN vn2008.Vistas v ON a.Vista = v.vista_id
|
||||
WHERE a.web != FALSE
|
||||
AND v.code = 'AGENCY'
|
||||
ORDER BY a.description
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
</div>
|
||||
<div class="form-group" id="stores-div">
|
||||
<label><t>PickupStore</t></label>
|
||||
<htk-combo form="order-form" column="agency_id">
|
||||
<db-model property="model">
|
||||
SELECT a.Id_Agencia, a.description
|
||||
FROM vn2008.Agencias a
|
||||
JOIN vn2008.Vistas v ON a.Vista = v.vista_id
|
||||
WHERE a.web != FALSE
|
||||
AND v.code = 'PICKUP'
|
||||
ORDER BY a.description
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes"><t>Notes</t></label>
|
||||
<htk-textarea form="order-form" column="note"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="addresses box" id="addresses-div">
|
||||
<div class="header">
|
||||
<h1><t>ShippingAddress</t></h1>
|
||||
<div class="action-bar">
|
||||
<button on-click="onAddAddressClick">
|
||||
<img src="image/dark/add.svg" alt=""/>
|
||||
<t>AddAddress</t>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<htk-radio-group
|
||||
id="default-address"
|
||||
column="address_id"
|
||||
form="order-form"/>
|
||||
<htk-repeater model="addresses" form-id="iter">
|
||||
<div class="address">
|
||||
<h2>
|
||||
<htk-radio
|
||||
form="iter"
|
||||
column="id"
|
||||
radio-group="default-address"
|
||||
tip="_SelectAddress"/>
|
||||
<htk-text form="iter" column="consignee"/>
|
||||
</h2>
|
||||
<p>
|
||||
<htk-text form="iter" column="name"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="iter" column="zip_code"/> -
|
||||
<htk-text form="iter" column="city"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="iter" column="province"/> -
|
||||
<htk-text form="iter" column="country"/>
|
||||
</p>
|
||||
<div class="actions">
|
||||
<htk-button
|
||||
form="iter"
|
||||
column="id"
|
||||
tip="_EditAddress"
|
||||
image="image/edit.svg"
|
||||
on-click="onEditAddressClick"/>
|
||||
</div>
|
||||
</div>
|
||||
</htk-repeater>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="success-dialog" class="success-dialog">
|
||||
<div>
|
||||
<img src="image/ok.svg" alt="_Ok"/>
|
||||
<p><t>OrderPlacedSuccessfully</t></p>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
<button on-click="onAcceptClick" class="thin confirm-order">
|
||||
<t>Accept</t>
|
||||
</button>
|
||||
<div class="clear"/>
|
||||
</div>
|
||||
</vn>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
<div class="box confirmed">
|
||||
<div class="header">
|
||||
<h1><t>ConfirmedOrders</t></h1>
|
||||
<h1><t>LastOrders</t></h1>
|
||||
<div class="action-bar">
|
||||
<div id="balance">
|
||||
<t>PendingBalance:</t>
|
||||
|
@ -60,24 +60,14 @@
|
|||
on-clicked="onShowClick"/>
|
||||
</htk-grid>
|
||||
</div>
|
||||
<form method="post" id="tpv-form">
|
||||
<input type="hidden" name="Ds_Merchant_Amount"/>
|
||||
<input type="hidden" name="Ds_Merchant_Order"/>
|
||||
<input type="hidden" name="Ds_Merchant_MerchantCode"/>
|
||||
<input type="hidden" name="Ds_Merchant_Currency"/>
|
||||
<input type="hidden" name="Ds_Merchant_TransactionType"/>
|
||||
<input type="hidden" name="Ds_Merchant_Terminal"/>
|
||||
<input type="hidden" name="Ds_Merchant_MerchantURL"/>
|
||||
<input type="hidden" name="Ds_Merchant_MerchantSignature"/>
|
||||
<input type="hidden" name="Ds_Merchant_UrlOK"/>
|
||||
<input type="hidden" name="Ds_Merchant_UrlKO"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="balance-popup" class="balance-popup">
|
||||
<htk-grid class="balance-grid" show-header="false">
|
||||
<db-model id="balance">
|
||||
CALL customer_debt ();
|
||||
<db-model id="balance" result-index="1">
|
||||
CALL customer_debt_beta ();
|
||||
SELECT * FROM t_customer_debt;
|
||||
DROP TEMPORARY TABLE t_customer_debt;
|
||||
</db-model>
|
||||
<htk-column-text title="_Company" column="abbreviation"/>
|
||||
<htk-column-spin title="_Pending" column="amount" unit="€" digits="2"/>
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
|
||||
Vn.Shipping = new Class
|
||||
({
|
||||
Extends: Vn.Module
|
||||
|
||||
,onIterChange: function (form)
|
||||
{
|
||||
var showAgencies = false;
|
||||
var showAdresses = false;
|
||||
var showStores = false;
|
||||
var deliveryMethod = parseInt (form.get ('delivery_method_id'));
|
||||
|
||||
switch (deliveryMethod)
|
||||
{
|
||||
case 1: // AGENCY
|
||||
var showAgencies = true;
|
||||
var showAdresses = true;
|
||||
break;
|
||||
case 2: // DELIVERY
|
||||
var showAdresses = true;
|
||||
break;
|
||||
case 3: // PICKUP
|
||||
var showStores = true;
|
||||
break;
|
||||
}
|
||||
|
||||
this.$('conf-div').style.display = showAgencies || showStores ? 'block' : 'none';
|
||||
this.$('agencies-div').style.display = showAgencies ? 'block' : 'none';
|
||||
this.$('addresses-div').style.display = showAdresses ? 'block' : 'none';
|
||||
this.$('stores-div').style.display = showStores ? 'block' : 'none';
|
||||
}
|
||||
|
||||
,onReturnClick: function ()
|
||||
{
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
,onBasketClick: function ()
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'ecomerce/basket',
|
||||
'order': this.$('order').value
|
||||
});
|
||||
}
|
||||
|
||||
,onCatalogClick: function ()
|
||||
{
|
||||
this.hash.set ({'form': 'ecomerce/catalog'});
|
||||
}
|
||||
|
||||
,onAddAddressClick: function ()
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'account/address',
|
||||
'address': 0
|
||||
});
|
||||
}
|
||||
|
||||
,onEditAddressClick: function (button, form)
|
||||
{
|
||||
this.hash.set ({
|
||||
'form': 'account/address',
|
||||
'address': form.get ('id')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
.shipping
|
||||
{
|
||||
padding: 1em;
|
||||
}
|
||||
.shipping
|
||||
{
|
||||
max-width: 70em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
table.form td.label
|
||||
{
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.shipping .form
|
||||
{
|
||||
max-width: 25em;
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
div.hide
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Addresses */
|
||||
|
||||
div.addresses
|
||||
{
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.addresses > .form
|
||||
{
|
||||
margin: 0 auto;
|
||||
padding: 2em;
|
||||
max-width: 25em;
|
||||
}
|
||||
.address
|
||||
{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.address p
|
||||
{
|
||||
margin: 0.2em 0;
|
||||
}
|
||||
.address .actions
|
||||
{
|
||||
text-align: right;
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
<vn>
|
||||
<vn-group>
|
||||
<vn-param id="order">
|
||||
<vn-hash-link key="order"/>
|
||||
</vn-param>
|
||||
<db-form id="order-form" on-iter-changed="onIterChange">
|
||||
<db-model updatable="true">
|
||||
SELECT id, delivery_method_id, agency_id, address_id
|
||||
FROM order_view WHERE id = #id
|
||||
<sql-batch property="batch">
|
||||
<item name="id" param="order"/>
|
||||
</sql-batch>
|
||||
</db-model>
|
||||
</db-form>
|
||||
<db-model id="addresses" updatable="true">
|
||||
SELECT a.id, a.consignee, p.name province, a.zip_code, a.city, a.name, a.active, c.Pais country
|
||||
FROM address_view a
|
||||
LEFT JOIN vn2008.province p ON a.province_id = p.province_id
|
||||
JOIN vn2008.Paises c ON c.Id = p.Paises_Id
|
||||
WHERE active != FALSE
|
||||
</db-model>
|
||||
</vn-group>
|
||||
<div id="form" class="shipping">
|
||||
<div class="box">
|
||||
<div class="header">
|
||||
<h1><t>ConfigureShippingPickup</t></h1>
|
||||
<div class="action-bar">
|
||||
<button on-click="onReturnClick">
|
||||
<img src="image/dark/go-previous.svg" alt=""/>
|
||||
<t>Return</t>
|
||||
</button>
|
||||
<button on-click="onBasketClick">
|
||||
<img src="image/dark/basket.svg" alt=""/>
|
||||
<t>GoToBasket</t>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form hide" id="conf-div">
|
||||
<div class="form-group hide" id="stores-div">
|
||||
<label><t>PickupStore</t></label>
|
||||
<htk-combo form="order-form" column="agency_id">
|
||||
<db-model property="model">
|
||||
SELECT a.Id_Agencia, a.description
|
||||
FROM vn2008.Agencias a
|
||||
JOIN vn2008.Vistas v ON a.Vista = v.vista_id
|
||||
WHERE a.web != FALSE
|
||||
AND v.code = 'PICKUP'
|
||||
ORDER BY a.description
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
</div>
|
||||
<div class="form-group hide" id="agencies-div">
|
||||
<label><t>ShippingAgency</t></label>
|
||||
<htk-combo form="order-form" column="agency_id">
|
||||
<db-model property="model">
|
||||
SELECT a.Id_Agencia, a.description
|
||||
FROM vn2008.Agencias a
|
||||
JOIN vn2008.Vistas v ON a.Vista = v.vista_id
|
||||
WHERE a.web != FALSE
|
||||
AND v.code = 'AGENCY'
|
||||
ORDER BY a.description
|
||||
</db-model>
|
||||
</htk-combo>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="addresses box hide" id="addresses-div">
|
||||
<div class="header">
|
||||
<h1><t>ShippingAddress</t></h1>
|
||||
<div class="action-bar">
|
||||
<button on-click="onAddAddressClick">
|
||||
<img src="image/dark/add.svg" alt=""/>
|
||||
<t>AddAddress</t>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<htk-radio-group
|
||||
id="default-address"
|
||||
column="address_id"
|
||||
form="order-form"/>
|
||||
<htk-repeater model="addresses" form-id="iter">
|
||||
<div class="address">
|
||||
<h2>
|
||||
<htk-radio
|
||||
form="iter"
|
||||
column="id"
|
||||
radio-group="default-address"
|
||||
tip="_SelectAddress"/>
|
||||
<htk-text form="iter" column="consignee"/>
|
||||
</h2>
|
||||
<p>
|
||||
<htk-text form="iter" column="name"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="iter" column="zip_code"/> -
|
||||
<htk-text form="iter" column="city"/>
|
||||
</p>
|
||||
<p>
|
||||
<htk-text form="iter" column="province"/> -
|
||||
<htk-text form="iter" column="country"/>
|
||||
</p>
|
||||
<div class="actions">
|
||||
<htk-button
|
||||
form="iter"
|
||||
column="id"
|
||||
tip="_EditAddress"
|
||||
image="image/edit.svg"
|
||||
on-click="onEditAddressClick"/>
|
||||
</div>
|
||||
</div>
|
||||
</htk-repeater>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</vn>
|
|
@ -170,12 +170,13 @@ input[type=button]
|
|||
color: white;
|
||||
padding: 0.5em;
|
||||
cursor: pointer;
|
||||
border-radius: 0.1em;
|
||||
}
|
||||
button:hover,
|
||||
input[type=submit]:hover,
|
||||
input[type=button]:hover
|
||||
{
|
||||
background-color: #EEE;
|
||||
background-color: rgba(1, 1, 1, 0.2);
|
||||
}
|
||||
|
||||
/* Flat button */
|
||||
|
@ -203,6 +204,7 @@ button.thin
|
|||
background-color: transparent;
|
||||
border: none;
|
||||
color: #008D77;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
button.thin:hover
|
||||
{
|
||||
|
@ -431,12 +433,12 @@ img.icon
|
|||
{
|
||||
padding-right: 1em;
|
||||
}
|
||||
.htk-grid .cell-spin
|
||||
.cell-spin
|
||||
{
|
||||
width: 2.5em;
|
||||
text-align: right;
|
||||
}
|
||||
.htk-grid .cell-button
|
||||
.cell-button
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0.5em;
|
||||
|
@ -444,14 +446,18 @@ img.icon
|
|||
background-color: transparent;
|
||||
border-radius: 0.1em;
|
||||
}
|
||||
.htk-grid .cell-button:hover
|
||||
.cell-button:hover
|
||||
{
|
||||
background-color: rgba(1, 1, 1, 0.1);
|
||||
}
|
||||
.htk-grid .cell-button img
|
||||
.cell-button img
|
||||
{
|
||||
height: 1.5em;
|
||||
}
|
||||
.cell-image > img
|
||||
{
|
||||
min-height: 1.5em;
|
||||
}
|
||||
|
||||
/* Repater */
|
||||
|
||||
|
@ -589,6 +595,16 @@ img.icon
|
|||
border-radius: 0.1em;
|
||||
box-shadow: 0 0 0.4em #666;
|
||||
}
|
||||
.htk-background
|
||||
{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 190;
|
||||
background-color: rgba(1, 1, 1, 0.7);
|
||||
}
|
||||
|
||||
/* Image editor */
|
||||
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg7384"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
height="16"
|
||||
sodipodi:docname="add.svg"
|
||||
width="16">
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:object-paths="true"
|
||||
inkscape:cy="8"
|
||||
inkscape:current-layer="layer12"
|
||||
inkscape:window-width="1920"
|
||||
pagecolor="#555753"
|
||||
showborder="false"
|
||||
showguides="true"
|
||||
inkscape:snap-nodes="false"
|
||||
objecttolerance="10"
|
||||
showgrid="true"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:snap-bbox="true"
|
||||
bordercolor="#666666"
|
||||
id="namedview88"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:window-y="27"
|
||||
gridtolerance="10"
|
||||
inkscape:zoom="68.666667"
|
||||
inkscape:window-height="1016"
|
||||
borderopacity="1"
|
||||
guidetolerance="10"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:cx="8"
|
||||
inkscape:bbox-paths="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:snap-to-guides="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0">
|
||||
<inkscape:grid
|
||||
visible="true"
|
||||
spacingx="1px"
|
||||
type="xygrid"
|
||||
spacingy="1px"
|
||||
id="grid4866"
|
||||
empspacing="2"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true"
|
||||
originx="-3px"
|
||||
originy="-3px" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer9"
|
||||
inkscape:label="status"
|
||||
style="display:inline" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer10"
|
||||
inkscape:label="devices" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer11"
|
||||
inkscape:label="apps" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer12"
|
||||
inkscape:label="actions">
|
||||
<path
|
||||
d="m 69.8002,725 0,4.8 -4.8,0 0,2.4 4.8,0 0,4.8 2.4,0 0,-4.8 4.8,0 0,-2.4 -4.8,0 0,-4.8 -2.4,0 z"
|
||||
id="rect31992"
|
||||
style="color:#bebebe;fill:#666666;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer13"
|
||||
inkscape:label="places" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer14"
|
||||
inkscape:label="mimetypes" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer15"
|
||||
inkscape:label="emblems"
|
||||
style="display:inline" />
|
||||
<g
|
||||
transform="translate(-63.0002,-723)"
|
||||
inkscape:groupmode="layer"
|
||||
id="g4953"
|
||||
inkscape:label="categories"
|
||||
style="display:inline" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.7 KiB |
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="delete.svg"
|
||||
height="16"
|
||||
id="svg7384"
|
||||
inkscape:version="0.91 r13725"
|
||||
version="1.1"
|
||||
width="16.000002">
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:bbox-nodes="false"
|
||||
inkscape:bbox-paths="true"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
inkscape:current-layer="layer13"
|
||||
inkscape:cx="8.000001"
|
||||
inkscape:cy="8.3834812"
|
||||
gridtolerance="10"
|
||||
inkscape:guide-bbox="true"
|
||||
guidetolerance="10"
|
||||
id="namedview88"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:object-paths="false"
|
||||
objecttolerance="10"
|
||||
pagecolor="#3a3b39"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
showborder="false"
|
||||
showgrid="true"
|
||||
showguides="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:snap-to-guides="true"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:zoom="51.5">
|
||||
<inkscape:grid
|
||||
empspacing="2"
|
||||
enabled="true"
|
||||
id="grid4866"
|
||||
originx="-240px"
|
||||
originy="-42px"
|
||||
snapvisiblegridlinesonly="true"
|
||||
spacingx="1px"
|
||||
spacingy="1px"
|
||||
type="xygrid"
|
||||
visible="true" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer9"
|
||||
inkscape:label="status"
|
||||
style="display:inline"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer10"
|
||||
inkscape:label="devices"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer11"
|
||||
inkscape:label="apps"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer13"
|
||||
inkscape:label="places"
|
||||
transform="translate(-481.0002,-175)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 484.0002,180 0,9 9,0 0,-9 2,0 0,9 c 0,2 -2,2 -2,2 l -9,0 c -2,0 -2,-2 -2,-2 l 0,-9 z m 4.00001,1 1.00002,0 0,6 -1.00002,0 z m 2,0 1.00002,0 0,6 -1.00002,0 z m -4,0 0.99999,0 0,6 -0.99999,0 z m -1.00001,-6 c -2,0 -2,2 -2,2 l -2,0 0,2 15,0 0,-2 -2,0 c 0,-2 -2,-2 -2,-2 l -7,0 z m 0,1 7,0 0,1 -7,0 0,-1 z"
|
||||
id="path3799"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer14"
|
||||
inkscape:label="mimetypes"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer15"
|
||||
inkscape:label="emblems"
|
||||
style="display:inline"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g71291"
|
||||
inkscape:label="emotes"
|
||||
style="display:inline"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g4953"
|
||||
inkscape:label="categories"
|
||||
style="display:inline"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer12"
|
||||
inkscape:label="actions"
|
||||
style="display:inline"
|
||||
transform="translate(-481.0002,-175)" />
|
||||
</svg>
|
After Width: | Height: | Size: 4.0 KiB |
|
@ -18,8 +18,8 @@
|
|||
enable-background="new 0 0 226.229 31.038"
|
||||
xml:space="preserve"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="verdnatura.svg"><metadata
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="logo.svg"><metadata
|
||||
id="metadata61"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
|
@ -33,12 +33,12 @@
|
|||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1014"
|
||||
inkscape:window-height="1016"
|
||||
id="namedview57"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.0755163"
|
||||
inkscape:cx="139.05819"
|
||||
inkscape:cy="16.509992"
|
||||
inkscape:cx="120.82882"
|
||||
inkscape:cy="16.019257"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
|
@ -52,35 +52,40 @@
|
|||
id="path11"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill-rule:evenodd;fill:#ffffff" /></g><g
|
||||
id="g13"><path
|
||||
id="g13"
|
||||
style="fill:#acb42a;fill-opacity:1"><path
|
||||
clip-rule="evenodd"
|
||||
d="m 139.809,19.787 c -0.665,0.357 -1.748,0.686 -3.25,0.988 -0.727,0.137 -1.283,0.254 -1.667,0.35 -0.95,0.247 -1.661,0.563 -2.134,0.947 -0.472,0.384 -0.799,0.899 -0.979,1.544 -0.223,0.796 -0.155,1.438 0.204,1.925 0.359,0.488 0.945,0.731 1.757,0.731 1.252,0 2.375,-0.36 3.369,-1.081 0.994,-0.721 1.653,-1.665 1.98,-2.831 l 0.72,-2.573 z m 5.106,10.534 h -7.458 c 0.017,-0.356 0.048,-0.726 0.094,-1.11 l 0.159,-1.192 c -1.318,1.026 -2.627,1.786 -3.927,2.279 -1.299,0.493 -2.643,0.739 -4.031,0.739 -2.158,0 -3.7,-0.593 -4.625,-1.779 -0.925,-1.187 -1.106,-2.788 -0.542,-4.804 0.519,-1.851 1.431,-3.356 2.737,-4.515 1.307,-1.159 3.021,-1.972 5.142,-2.438 1.169,-0.247 2.641,-0.515 4.413,-0.803 2.646,-0.412 4.082,-1.016 4.304,-1.812 l 0.151,-0.539 c 0.182,-0.65 0.076,-1.145 -0.317,-1.483 -0.393,-0.339 -1.071,-0.508 -2.033,-0.508 -1.045,0 -1.934,0.214 -2.666,0.643 -0.731,0.428 -1.289,1.058 -1.673,1.887 h -6.748 c 1.065,-2.53 2.64,-4.413 4.723,-5.65 2.083,-1.237 4.724,-1.856 7.923,-1.856 1.991,0 3.602,0.241 4.833,0.722 1.231,0.481 2.095,1.209 2.59,2.185 0.339,0.701 0.483,1.536 0.432,2.504 -0.052,0.969 -0.377,2.525 -0.978,4.669 l -2.375,8.483 c -0.284,1.014 -0.416,1.812 -0.396,2.395 0.02,0.583 0.188,0.962 0.503,1.141 l -0.235,0.842 z"
|
||||
id="path15"
|
||||
style="fill:#8ed300;fill-opacity:1;fill-rule:evenodd"
|
||||
style="fill:#acb42a;fill-opacity:1;fill-rule:evenodd"
|
||||
inkscape:connector-curvature="0" /></g><g
|
||||
id="g17"><path
|
||||
id="g17"
|
||||
style="fill:#acb42a;fill-opacity:1"><path
|
||||
clip-rule="evenodd"
|
||||
d="m 185.7,30.321 6.27,-22.393 h 7.049 l -1.097,3.918 c 1.213,-1.537 2.502,-2.659 3.867,-3.366 1.365,-0.707 2.951,-1.074 4.758,-1.101 l -2.03,7.25 c -0.304,-0.042 -0.608,-0.072 -0.912,-0.093 -0.303,-0.02 -0.592,-0.03 -0.867,-0.03 -1.126,0 -2.104,0.168 -2.932,0.504 -0.829,0.336 -1.561,0.854 -2.197,1.555 -0.406,0.467 -0.789,1.136 -1.149,2.007 -0.361,0.872 -0.814,2.282 -1.359,4.232 l -2.104,7.516 H 185.7 z"
|
||||
id="path19"
|
||||
style="fill:#8ed300;fill-opacity:1;fill-rule:evenodd"
|
||||
style="fill:#acb42a;fill-opacity:1;fill-rule:evenodd"
|
||||
inkscape:connector-curvature="0" /></g><g
|
||||
id="g21"><path
|
||||
id="g21"
|
||||
style="fill:#acb42a;fill-opacity:1"><path
|
||||
clip-rule="evenodd"
|
||||
d="m 217.631,19.787 c -0.664,0.357 -1.748,0.686 -3.25,0.988 -0.727,0.137 -1.282,0.254 -1.667,0.35 -0.95,0.247 -1.661,0.563 -2.134,0.947 -0.472,0.384 -0.799,0.899 -0.979,1.544 -0.223,0.796 -0.155,1.438 0.205,1.925 0.359,0.488 0.945,0.731 1.757,0.731 1.252,0 2.375,-0.36 3.369,-1.081 0.994,-0.721 1.654,-1.665 1.98,-2.831 l 0.719,-2.573 z m 5.106,10.534 h -7.458 c 0.017,-0.356 0.048,-0.726 0.094,-1.11 l 0.159,-1.192 c -1.318,1.026 -2.627,1.786 -3.927,2.279 -1.299,0.493 -2.643,0.739 -4.031,0.739 -2.158,0 -3.7,-0.593 -4.625,-1.779 -0.926,-1.187 -1.106,-2.788 -0.542,-4.804 0.519,-1.851 1.431,-3.356 2.737,-4.515 1.306,-1.159 3.02,-1.972 5.142,-2.438 1.169,-0.247 2.641,-0.515 4.413,-0.803 2.647,-0.412 4.082,-1.016 4.304,-1.812 l 0.151,-0.539 c 0.182,-0.65 0.077,-1.145 -0.317,-1.483 -0.393,-0.339 -1.071,-0.508 -2.033,-0.508 -1.045,0 -1.934,0.214 -2.666,0.643 -0.731,0.428 -1.289,1.058 -1.672,1.887 h -6.748 c 1.065,-2.53 2.64,-4.413 4.723,-5.65 2.083,-1.237 4.724,-1.856 7.923,-1.856 1.99,0 3.601,0.241 4.833,0.722 1.232,0.481 2.095,1.209 2.591,2.185 0.339,0.701 0.483,1.536 0.431,2.504 -0.051,0.969 -0.377,2.525 -0.978,4.669 l -2.375,8.483 c -0.284,1.014 -0.416,1.812 -0.396,2.395 0.02,0.583 0.188,0.962 0.503,1.141 l -0.236,0.842 z"
|
||||
id="path23"
|
||||
style="fill:#8ed300;fill-opacity:1;fill-rule:evenodd"
|
||||
style="fill:#acb42a;fill-opacity:1;fill-rule:evenodd"
|
||||
inkscape:connector-curvature="0" /></g><g
|
||||
id="g25"><path
|
||||
id="g25"
|
||||
style="fill:#acb42a;fill-opacity:1"><path
|
||||
clip-rule="evenodd"
|
||||
d="m 188.386,7.928 -6.269,22.393 h -7.174 l 0.864,-3.085 c -1.227,1.246 -2.476,2.163 -3.746,2.751 -1.27,0.588 -2.625,0.882 -4.067,0.882 -2.471,0 -4.154,-0.634 -5.048,-1.901 -0.895,-1.268 -0.993,-3.149 -0.294,-5.644 l 4.31,-15.396 h 7.338 l -3.508,12.53 c -0.516,1.842 -0.641,3.109 -0.375,3.803 0.266,0.694 0.967,1.041 2.105,1.041 1.275,0 2.323,-0.422 3.142,-1.267 0.819,-0.845 1.497,-2.223 2.031,-4.133 l 3.353,-11.974 h 7.338 z"
|
||||
id="path27"
|
||||
style="fill:#8ed300;fill-opacity:1;fill-rule:evenodd"
|
||||
style="fill:#acb42a;fill-opacity:1;fill-rule:evenodd"
|
||||
inkscape:connector-curvature="0" /></g><g
|
||||
id="g29"><path
|
||||
id="g29"
|
||||
style="fill:#acb42a;fill-opacity:1"><path
|
||||
clip-rule="evenodd"
|
||||
d="m 149.937,12.356 1.239,-4.428 h 2.995 l 1.771,-6.326 h 7.338 l -1.771,6.326 h 3.753 l -1.24,4.428 h -3.753 l -2.716,9.702 c -0.416,1.483 -0.498,2.465 -0.247,2.946 0.25,0.48 0.905,0.721 1.964,0.721 l 0.549,-0.011 0.39,-0.031 -1.31,4.678 c -0.811,0.148 -1.596,0.263 -2.354,0.344 -0.758,0.081 -1.48,0.122 -2.167,0.122 -2.543,0 -4.108,-0.621 -4.695,-1.863 -0.587,-1.242 -0.313,-3.887 0.82,-7.936 l 2.428,-8.672 h -2.994 z"
|
||||
id="path31"
|
||||
style="fill:#8ed300;fill-opacity:1;fill-rule:evenodd"
|
||||
style="fill:#acb42a;fill-opacity:1;fill-rule:evenodd"
|
||||
inkscape:connector-curvature="0" /></g><g
|
||||
id="g33"
|
||||
style="fill:#ffffff"><path
|
||||
|
@ -117,8 +122,9 @@
|
|||
id="path51"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill-rule:evenodd;fill:#ffffff" /></g></g><g
|
||||
id="g53"><path
|
||||
id="g53"
|
||||
style="fill:#acb42a;fill-opacity:1"><path
|
||||
d="m 112.881,30.643 -6.404,-18.639 -6.455,18.639 h -7.254 l 9.565,-30.321 h 8.19 l 4.434,15.582 0.35,1.276 c 0.521,1.866 0.917,3.431 1.191,4.693 l 0.555,-2.182 c 0.219,-0.837 0.528,-1.935 0.925,-3.293 l 4.468,-16.076 h 8.19 l -10.501,30.321 h -7.254 z"
|
||||
id="path55"
|
||||
style="fill:#8ed300;fill-opacity:1"
|
||||
style="fill:#acb42a;fill-opacity:1"
|
||||
inkscape:connector-curvature="0" /></g></svg>
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="warning.svg"
|
||||
height="16"
|
||||
id="svg7384"
|
||||
inkscape:version="0.91 r13725"
|
||||
version="1.1"
|
||||
width="16">
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:bbox-nodes="false"
|
||||
inkscape:bbox-paths="true"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
inkscape:current-layer="layer9"
|
||||
inkscape:cx="-4.1997805"
|
||||
inkscape:cy="10.353371"
|
||||
gridtolerance="10"
|
||||
inkscape:guide-bbox="true"
|
||||
guidetolerance="10"
|
||||
id="namedview88"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:object-paths="false"
|
||||
objecttolerance="10"
|
||||
pagecolor="#3a3b39"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
showborder="false"
|
||||
showgrid="false"
|
||||
showguides="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:snap-to-guides="true"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:zoom="23.610133">
|
||||
<inkscape:grid
|
||||
empspacing="2"
|
||||
enabled="true"
|
||||
id="grid4866"
|
||||
originx="-79.9998px"
|
||||
originy="40px"
|
||||
snapvisiblegridlinesonly="true"
|
||||
spacingx="1px"
|
||||
spacingy="1px"
|
||||
type="xygrid"
|
||||
visible="true" />
|
||||
<inkscape:grid
|
||||
color="#000000"
|
||||
empcolor="#000000"
|
||||
empopacity="0"
|
||||
empspacing="4"
|
||||
enabled="true"
|
||||
id="grid5968"
|
||||
opacity="0.1254902"
|
||||
originx="-79.9998px"
|
||||
originy="40px"
|
||||
snapvisiblegridlinesonly="true"
|
||||
spacingx="0.5px"
|
||||
spacingy="0.5px"
|
||||
type="xygrid"
|
||||
visible="true" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer9"
|
||||
inkscape:label="status"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 328.90645,257.09375 c -0.5255,-0.0286 -1.03823,0.28305 -1.4375,0.96875 l -6.25,11.59375 C 320.68548,270.61964 321.26717,272 322.3127,272 l 13.15625,0 c 0.98172,0 1.90311,-1.15939 1.21875,-2.34375 L 330.3752,258.125 c -0.39872,-0.64617 -0.94325,-1.00262 -1.46875,-1.03125 z m 0.0625,3.9375 c 0.54448,-0.0172 1.04849,0.48677 1.03125,1.03125 l 0,3.9375 c 0.007,0.52831 -0.47163,1 -1,1 -0.52836,0 -1.00747,-0.47169 -1,-1 l 0,-3.9375 c -0.008,-0.4666 0.3541,-0.91253 0.8125,-1 0.0511,-0.0145 0.10345,-0.0249 0.15625,-0.0312 z M 329.0002,268 c 0.55228,0 1,0.44772 1,1 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 z"
|
||||
id="path18112"
|
||||
style="color:#bebebe;fill:#ffb920;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer10"
|
||||
inkscape:label="devices"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer11"
|
||||
inkscape:label="apps"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer13"
|
||||
inkscape:label="places"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer14"
|
||||
inkscape:label="mimetypes"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer15"
|
||||
inkscape:label="emblems"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g71291"
|
||||
inkscape:label="emotes"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g4953"
|
||||
inkscape:label="categories"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer12"
|
||||
inkscape:label="actions"
|
||||
style="display:inline"
|
||||
transform="translate(-321,-257)" />
|
||||
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
|
@ -23,7 +23,7 @@ Htk.ColumnButton = new Class
|
|||
var button = document.createElement ('button');
|
||||
button.className = 'cell-button';
|
||||
button.addEventListener ('click',
|
||||
this.buttonClicked.bind (this, this.value, tr));
|
||||
this.buttonClicked.bind (this, this.value, tr, button));
|
||||
td.appendChild (button);
|
||||
|
||||
var img = document.createElement ('img');
|
||||
|
@ -39,8 +39,8 @@ Htk.ColumnButton = new Class
|
|||
return td;
|
||||
}
|
||||
|
||||
,buttonClicked: function (value, tr)
|
||||
,buttonClicked: function (value, tr, button)
|
||||
{
|
||||
this.signalEmit ('clicked', value, tr.rowIndex - 1);
|
||||
this.signalEmit ('clicked', value, tr.rowIndex - 1, button);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -50,6 +50,7 @@ Htk.ColumnImage = new Class
|
|||
,render: function (tr)
|
||||
{
|
||||
var td = this.parent (tr);
|
||||
td.className = 'cell-image';
|
||||
|
||||
var img = document.createElement ('img');
|
||||
img.alt = ''
|
||||
|
|
|
@ -63,11 +63,34 @@ Htk.Popup = new Class
|
|||
this.node.style.left = (left) +'px';
|
||||
}
|
||||
|
||||
,showCenter: function ()
|
||||
{
|
||||
this.parent = null;
|
||||
|
||||
this.background = document.createElement ('div');
|
||||
this.background.className = 'htk-background';
|
||||
document.body.appendChild (this.background);
|
||||
|
||||
document.body.appendChild (this.node);
|
||||
|
||||
var width = this.node.offsetWidth;
|
||||
var height = this.node.offsetHeight;
|
||||
|
||||
this.node.style.top = '50%';
|
||||
this.node.style.left = '50%';
|
||||
this.node.style.marginLeft = (-this.node.offsetWidth / 2) +'px';
|
||||
this.node.style.marginTop = (-this.node.offsetHeight / 2) +'px';
|
||||
|
||||
}
|
||||
|
||||
,hide: function ()
|
||||
{
|
||||
if (this.background)
|
||||
Vn.Node.remove (this.background);
|
||||
|
||||
this.node.removeEventListener ('mousedown', this.stopEvent)
|
||||
document.removeEventListener ('mousedown', this.hideHandler);
|
||||
document.body.removeChild (this.node);
|
||||
Vn.Node.remove (this.node);
|
||||
this.parent = null;
|
||||
this.signalEmit ('closed');
|
||||
}
|
||||
|
|
|
@ -5,9 +5,24 @@ Sql.Batch = new Class
|
|||
({
|
||||
Extends: Sql.Object
|
||||
,Tag: 'sql-batch'
|
||||
,Properties:
|
||||
{
|
||||
blocked:
|
||||
{
|
||||
type: Boolean
|
||||
,set: function (x)
|
||||
{
|
||||
this._blocked = x;
|
||||
}
|
||||
,get: function ()
|
||||
{
|
||||
return this._blocked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
,params: {}
|
||||
,blocked: false
|
||||
,_blocked: false
|
||||
|
||||
,loadXml: function (builder, node)
|
||||
{
|
||||
|
@ -49,7 +64,7 @@ Sql.Batch = new Class
|
|||
{
|
||||
if (this.params[id])
|
||||
{
|
||||
this.params[id].disconnect ('changed', this.changed, this);
|
||||
this.params[id].disconnect ('changed', this.emitChanged, this);
|
||||
delete this.params[id];
|
||||
}
|
||||
}
|
||||
|
@ -58,8 +73,8 @@ Sql.Batch = new Class
|
|||
{
|
||||
this.remove (id);
|
||||
this.params[id] = object;
|
||||
object.on ('changed', this.changed, this);
|
||||
this.changed ();
|
||||
object.on ('changed', this.emitChanged, this);
|
||||
this.emitChanged ();
|
||||
}
|
||||
|
||||
,addValue: function (id, value)
|
||||
|
@ -76,17 +91,22 @@ Sql.Batch = new Class
|
|||
|
||||
,block: function ()
|
||||
{
|
||||
this.blocked = true;
|
||||
this._blocked = true;
|
||||
}
|
||||
|
||||
,unblock: function ()
|
||||
{
|
||||
this.blocked = false;
|
||||
this._blocked = false;
|
||||
}
|
||||
|
||||
,emitChanged: function ()
|
||||
{
|
||||
if (!this._blocked)
|
||||
this.signalEmit ('changed');
|
||||
}
|
||||
|
||||
,changed: function ()
|
||||
{
|
||||
if (!this.blocked)
|
||||
this.signalEmit ('changed');
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ Vn.Builder = new Class
|
|||
var nodeName = a[i].nodeName;
|
||||
var nodeValue = a[i].nodeValue;
|
||||
|
||||
if (/on-\w+/.test (nodeName))
|
||||
if (/^on-\w+/.test (nodeName))
|
||||
{
|
||||
var method = this.getMethod (nodeValue);
|
||||
htmlNode.addEventListener (
|
||||
|
@ -175,7 +175,21 @@ Vn.Builder = new Class
|
|||
else
|
||||
var methodName = value;
|
||||
|
||||
return eval (methodName);
|
||||
var method;
|
||||
|
||||
try {
|
||||
method = eval (methodName);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
method = null;
|
||||
}
|
||||
|
||||
if (method == null)
|
||||
console.warn ('Vn.Builder: Function \'%s\' not found',
|
||||
value);
|
||||
|
||||
return method;
|
||||
}
|
||||
|
||||
,replaceFunc: function (token)
|
||||
|
@ -191,21 +205,7 @@ Vn.Builder = new Class
|
|||
var a = c.node.attributes;
|
||||
|
||||
for (var j = 0; j < a.length; j++)
|
||||
{
|
||||
var nodeName = a[j].nodeName;
|
||||
var nodeValue = a[j].nodeValue;
|
||||
|
||||
if (/on-\w+/.test (nodeName))
|
||||
{
|
||||
var method = this.getMethod (nodeValue);
|
||||
c.object.on (nodeName.substr (3), method, this.signalData);
|
||||
}
|
||||
else if (!/^(id|property)$/.test (nodeName))
|
||||
{
|
||||
var prop = nodeName.replace (/-./g, this.replaceFunc);
|
||||
this.setProperty (c, prop, nodeValue);
|
||||
}
|
||||
}
|
||||
this.setAttribute (c, a[j].nodeName, a[j].nodeValue);
|
||||
|
||||
if (c.parent)
|
||||
{
|
||||
|
@ -225,14 +225,30 @@ Vn.Builder = new Class
|
|||
}
|
||||
}
|
||||
|
||||
,setProperty: function (c, propName, value)
|
||||
,setAttribute: function (c, attribute, value)
|
||||
{
|
||||
if (/^on-\w+/.test (attribute))
|
||||
{
|
||||
var method = this.getMethod (value);
|
||||
|
||||
if (method)
|
||||
c.object.on (attribute.substr (3), method, this.signalData);
|
||||
}
|
||||
else if (!/^(id|property)$/.test (attribute))
|
||||
{
|
||||
this.setProperty (c, attribute, value)
|
||||
}
|
||||
}
|
||||
|
||||
,setProperty: function (c, attribute, value)
|
||||
{
|
||||
var propName = attribute.replace (/-./g, this.replaceFunc);
|
||||
var prop = c.klass.Properties[propName];
|
||||
|
||||
if (!prop)
|
||||
{
|
||||
console.warn ('Htk.Builder: Attribute \'%s\' not valid for tag \'%s\'',
|
||||
propName, c.node.tagName);
|
||||
console.warn ('Vn.Builder: Attribute \'%s\' not valid for tag \'%s\'',
|
||||
attribute, c.node.tagName);
|
||||
return;
|
||||
}
|
||||
if (!value)
|
||||
|
|
|
@ -5,12 +5,14 @@ Vn.Node =
|
|||
{
|
||||
var childs = node.childNodes;
|
||||
|
||||
if (childs)
|
||||
while (childs.length > 0)
|
||||
node.removeChild (childs[0]);
|
||||
}
|
||||
|
||||
,remove: function (node)
|
||||
{
|
||||
if (node.parentNode)
|
||||
node.parentNode.removeChild (node);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
,"Delete": "Borrar pedido"
|
||||
,"GoToCatalog": "Ir al catálogo"
|
||||
,"ConfigureOrder": "Configurar pedido"
|
||||
,"Checkout": "Tramitar pedido"
|
||||
,"Checkout": "Finalizar pedido"
|
||||
|
||||
,"OrderNumber": "Nº pedido"
|
||||
,"DateExit": "Fecha de salida"
|
||||
,"Warehouse": "Almacén"
|
||||
,"OrderTotal": "Total pedido"
|
||||
,"OrderTotal": "Total"
|
||||
,"VATNotIncluded": "(IVA y transporte no incluídos)"
|
||||
|
||||
,"Amount": "Cant"
|
||||
,"Amount": "Cantidad"
|
||||
,"Pack": "Pack"
|
||||
,"Stems": "Tallos"
|
||||
,"Avail": "Disp"
|
||||
|
|
|
@ -28,5 +28,11 @@
|
|||
,"Origin": "Origen"
|
||||
,"Price": "Precio"
|
||||
|
||||
,"from %.2d€": "desde %.2d€"
|
||||
,"AddToBasket": "Añadir artículo"
|
||||
,"Add": "Añadir"
|
||||
,"Erase": "Borrar"
|
||||
,"Confirm": "Confirmar"
|
||||
|
||||
,"IndicativePhotos": "* Las fotos son orientativas"
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"ConfigureOrder": "Configurar pedido"
|
||||
|
||||
,"Cancel": "Cancelar"
|
||||
,"NEXT": "SIGUIENTE"
|
||||
,"Next": "Siguiente"
|
||||
|
||||
,"DeliveryOrPickupQuestion": "¿Desea recibir o recoger el pedido?"
|
||||
,"ReceiveThroughtAgency": "Recibir por agencia"
|
||||
|
@ -21,7 +21,7 @@
|
|||
,"%A, %e of %B": "%A, %e de %B"
|
||||
,"Agency": "Agencia"
|
||||
,"Warehouse": "Almacén"
|
||||
,"CONFIRM": "CONFIRMAR"
|
||||
,"Confirm": "Confirmar"
|
||||
|
||||
,"ErrorCreatingOrder": "Error al crear el pedido"
|
||||
,"OrderStarted": "Pedido empezado"
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
{
|
||||
"ConfigureOrder": "Configurar pedido"
|
||||
"Checkout": "Finalizar pedido"
|
||||
|
||||
,"Return": "Volver"
|
||||
,"Accept": "Aceptar"
|
||||
|
||||
,"ShippingDate": "Fecha de envío"
|
||||
,"OrderSummary": "Resumen del pedido"
|
||||
,"Arrival": "Llegada"
|
||||
,"%A, %e of %B": "%A, %e de %B"
|
||||
,"Agency": "Agencia"
|
||||
,"Warehouse": "Almacén"
|
||||
,"DeliveryMethod": "Forma de envío"
|
||||
,"ShippingAgency": "Agencia de envío"
|
||||
,"Notes": "Notas"
|
||||
|
||||
,"PickupInStore": "Recogida en almacén"
|
||||
,"HomeDelivery": "Reparto a domicilio"
|
||||
,"TransportAgency": "Agencia de transporte"
|
||||
,"PickupStore": "Almacén de recogida"
|
||||
,"DeliveryAddress": "Dirección de envío"
|
||||
|
||||
,"ShippingAddress": "Dirección de envío"
|
||||
,"Import": "Importe"
|
||||
,"TaxBase": "Base imponible"
|
||||
,"VAT": "IVA"
|
||||
,"Total": "Total"
|
||||
|
||||
,"AddAddress": "Añadir dirección"
|
||||
,"SelectAddress": "Seleccionar dirección"
|
||||
,"EditAddress": "Modificar dirección"
|
||||
,"Cancel": "Cancelar"
|
||||
,"Modify": "Modificar"
|
||||
,"Confirm": "Confirmar"
|
||||
|
||||
,"OrderPlacedSuccessfully": "Su pedido ha sido realizado con éxito"
|
||||
,"OrderReserved": "Hemos reservado su pedido pero parece que ha habido problemas con el pago. Contacte con su comercial."
|
||||
,"Accept": "Aceptar"
|
||||
,"PayNow": "Pagar ahora"
|
||||
|
||||
,"SureConfirmOrder": "¿Desea confirmar su pedido?"
|
||||
,"OrderConfirmed": "Su pedido ha sido procesado y confirmado correctamente"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"OpenOrders":
|
||||
"Pedidos abiertos"
|
||||
"OpenOrders": "Pedidos abiertos"
|
||||
|
||||
,"StartOrder": "Empezar pedido"
|
||||
,"ContinueOrder": "Continuar pedido"
|
||||
|
@ -9,11 +8,10 @@
|
|||
,"DateExit": "Fecha de salida"
|
||||
,"SendMethod": "Forma de envío"
|
||||
|
||||
,"ConfirmedOrders":
|
||||
"Pedidos confirmados"
|
||||
,"LastOrders": "Últimos pedidos"
|
||||
|
||||
,"PendingBalance:": "Saldo pendiente:"
|
||||
,"PaymentInfo": "Para realizar una entrega a cuenta pulse en el botón de la derecha y haga el pago en la empresa correspondiente. La cantidad que aparece es el saldo pendiente a día de hoy, no tiene en cuenta pedidos del futuro. Puede realizar una entrega a cuenta de la cantidad que desee. Si desea pagar un pedido en concreto puede pulsar directamente en el botón de pago del pedido."
|
||||
,"PaymentInfo": "Para realizar una entrega a cuenta pulse en el botón de la derecha y haga el pago en la empresa correspondiente. La cantidad que aparece es el saldo pendiente a día de hoy, no tiene en cuenta pedidos del futuro. Puede realizar una entrega a cuenta de la cantidad que desee."
|
||||
,"MakePayment": "Realizar pago"
|
||||
,"Company": "Empresa"
|
||||
,"Pending": "Pendiente"
|
||||
|
|
|
@ -74,13 +74,13 @@ body
|
|||
#exit
|
||||
{
|
||||
float: right;
|
||||
background-color: #E80;
|
||||
background-color: #FC9900;
|
||||
width: 4em;
|
||||
text-align: center;
|
||||
}
|
||||
#exit:hover
|
||||
{
|
||||
background-color: #F91;
|
||||
background-color: #FCA910;
|
||||
}
|
||||
#exit span
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue