Bugs solved

This commit is contained in:
Juan Ferrer Toribio 2017-10-20 19:45:11 +02:00
parent c1cf88e44d
commit f0dcd47baf
6 changed files with 15 additions and 41 deletions

View File

@ -3,24 +3,23 @@
_Items
</h1>
<div id="actions">
<htk-search-entry
param="filter"/>
<htk-search-entry lot="hash" name="search"/>
</div>
<div id="main" class="items">
<div class="card list">
<htk-repeater form-id="iter" empty-message="_Enter a search term">
<db-model property="model" batch="hash">
<htk-repeater empty-message="_Enter a search term">
<db-model property="model" lot="hash">
SELECT Id_Article, Article, Medida, Categoria, Foto
FROM vn2008.Articles
WHERE Article LIKE CONCAT('%', #filter, '%')
OR Id_Article = #filter
WHERE Article LIKE CONCAT('%', #search, '%')
OR Id_Article = #search
ORDER BY Article LIMIT 50
</db-model>
<custom>
<div class="list-row">
<htk-image
form="iter"
column="Foto"
lot="iter"
name="Foto"
class="photo"
directory="catalog"
subdir="200x200"
@ -28,15 +27,13 @@
editable="true"
conn="conn"/>
<p class="concept">
<htk-text form="iter" column="Article"/>
<htk-text form="iter" column="Medida"/>
<htk-text form="iter" column="Categoria"/>
{{Article}} {{Medida}} {{Categoria}}
</p>
<p>
<htk-text form="iter" column="Id_Article"/>
@{{Id_Article}}
</p>
<p>
<htk-text form="iter" column="Foto"/>
{{Foto}}
</p>
<div class="clear"/>
</div>

View File

@ -34,7 +34,7 @@
{{Cliente}}
</p>
<p>
{{id}} - {{name}}
@{{id}} - {{name}}
</p>
</a>
</custom>

View File

@ -137,7 +137,6 @@ Hedera.Confirm = new Class
,onConfirmClick: function ()
{
console.log (this.$.lot.params);
this.disableButtons (true);
this.$.confirmQuery.execute ();
}

View File

@ -21,7 +21,7 @@
<div class="head">
<div>
<p class="important ticket-id">
<htk-text name="id" lot="ticket"/>
@<htk-text name="id" lot="ticket"/>
</p>
<p>
<htk-text lot="ticket" name="delivery" format="%D"/>

View File

@ -69,8 +69,8 @@ module.exports = new Class
if (this.node)
{
this.gui.setForm (this.node);
this.gui.setTitle (scope.$.title);
this.gui.setActions (scope.$.actions);
this.gui.setTitle (this.$.title);
this.gui.setActions (this.$.actions);
this.activate ();
}

View File

@ -153,28 +153,6 @@ module.exports = new Class
attribute, node.tagName);
}
,postCompile: function (contextMap)
{
var links = this._links;
for (var i = links.length - 1; i >= 0; i--)
{
var link = links[i];
var context = link.context;
var contextId = contextMap[link.objectId];
if (contextId == undefined)
continue;
if (link.prop)
context.objectProps[link.prop] = contextId;
else
context.childs.push (contextId);
links.splice (i, 1);
}
}
,addLink: function (context, prop, objectId)
{
this._links.push ({
@ -206,7 +184,7 @@ module.exports = new Class
var object = objects[link.context.id];
var objectRef = scope.$[link.objectId];
if (objectRef == null)
if (objectRef === undefined)
{
this.showError ('Referenced unexistent object with id \'%s\'',
link.objectId);