0
1
Fork 0

Añadida columna productor

This commit is contained in:
Juan Ferrer Toribio 2015-09-22 09:25:50 +02:00
parent 1d50d7b874
commit d8b9f09f36
2 changed files with 34 additions and 2 deletions

View File

@ -163,6 +163,11 @@ Vn.Catalog = new Class
Htk.Toast.showError (_('YouMustBeLoggedIn')); Htk.Toast.showError (_('YouMustBeLoggedIn'));
} }
,nameRenderer: function (renderer, form)
{
renderer.subtitle = form.get ('producer');
}
,featuresRender: function (renderer, form) ,featuresRender: function (renderer, form)
{ {
renderer.value = form.get ('Medida') +' '+ form.get ('Categoria') +' '+ form.get ('Color'); 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;
}
});

View File

@ -29,7 +29,7 @@
SELECT Id_Article item_id FROM vn2008.Articles SELECT Id_Article item_id FROM vn2008.Articles
WHERE #filter; WHERE #filter;
CALL bionic_calc (); 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 a.Foto, a.Article, a.Categoria, a.Medida, a.Tallos, a.Color, o.Abreviatura
FROM tmp.bionic_item t FROM tmp.bionic_item t
JOIN vn2008.Articles a ON a.Id_Article = t.item_id JOIN vn2008.Articles a ON a.Id_Article = t.item_id
@ -86,7 +86,7 @@
show-full="true" show-full="true"
full-dir="900x900" full-dir="900x900"
editable="true"/> editable="true"/>
<htk-column-text title="_Name" column="Article"/> <vn-column-item title="_Name" column="Article" renderer="nameRenderer"/>
<htk-column-text title="_Cat" renderer="featuresRender"/> <htk-column-text title="_Cat" renderer="featuresRender"/>
<htk-column-spin title="_Aval" column="available"/> <htk-column-spin title="_Aval" column="available"/>
<htk-column-text <htk-column-text