From d8b9f09f3682f565108d2d08afaca9949ef6200e Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 22 Sep 2015 09:25:50 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adida=20columna=20productor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/forms/ecomerce/catalog/catalog.js | 32 +++++++++++++++++++++++++++ web/forms/ecomerce/catalog/ui.xml | 4 ++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/web/forms/ecomerce/catalog/catalog.js b/web/forms/ecomerce/catalog/catalog.js index 2f0b1791..c74cd6ef 100755 --- a/web/forms/ecomerce/catalog/catalog.js +++ b/web/forms/ecomerce/catalog/catalog.js @@ -163,6 +163,11 @@ Vn.Catalog = new Class Htk.Toast.showError (_('YouMustBeLoggedIn')); } + ,nameRenderer: function (renderer, form) + { + renderer.subtitle = form.get ('producer'); + } + ,featuresRender: function (renderer, form) { renderer.value = form.get ('Medida') +' '+ form.get ('Categoria') +' '+ form.get ('Color'); @@ -283,3 +288,30 @@ Vn.Catalog = new Class } }); +Vn.ColumnItem = new Class +({ + Extends: Htk.Column + ,Tag: 'vn-column-item' + + ,render: function (tr) + { + var td = this.parent (tr); + td.style.textAlign = 'left'; + + if (this.value) + { + var node = document.createTextNode ( + Vn.Value.format (this.value, this._format)); + td.appendChild (node); + } + + if (this.subtitle) + { + td.appendChild (document.createElement ('br')); + td.appendChild (document.createTextNode (this.subtitle)); + } + + return td; + } +}); + diff --git a/web/forms/ecomerce/catalog/ui.xml b/web/forms/ecomerce/catalog/ui.xml index 6fce9b7c..97f45f3b 100755 --- a/web/forms/ecomerce/catalog/ui.xml +++ b/web/forms/ecomerce/catalog/ui.xml @@ -29,7 +29,7 @@ SELECT Id_Article item_id FROM vn2008.Articles WHERE #filter; CALL bionic_calc (); - SELECT t.item_id, t.available, t.price, + SELECT t.item_id, t.available, t.price, t.producer, a.Foto, a.Article, a.Categoria, a.Medida, a.Tallos, a.Color, o.Abreviatura FROM tmp.bionic_item t JOIN vn2008.Articles a ON a.Id_Article = t.item_id @@ -86,7 +86,7 @@ show-full="true" full-dir="900x900" editable="true"/> - +