Bugs solved, refactor
This commit is contained in:
parent
60a1d7cf9e
commit
c1cf88e44d
|
@ -12,8 +12,8 @@ Hedera.AddressList = new Class
|
|||
,onAddAddressClick: function ()
|
||||
{
|
||||
this.hash.setAll ({
|
||||
'form': 'account/address',
|
||||
'address': 0
|
||||
form: 'account/address',
|
||||
address: 0
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -30,13 +30,5 @@ Hedera.AddressList = new Class
|
|||
form.refresh ();
|
||||
}
|
||||
}
|
||||
|
||||
,repeaterFunc: function (res, form)
|
||||
{
|
||||
res.$.link.href = this.hash.make ({
|
||||
form: 'account/address',
|
||||
address: form.$.id
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -30,9 +30,12 @@
|
|||
id="default-address"
|
||||
lot="user-form"
|
||||
name="default_address"/>
|
||||
<htk-repeater model="addresses" form-id="iter" renderer="repeaterFunc">
|
||||
<htk-repeater model="addresses" form-id="iter">
|
||||
<custom>
|
||||
<a id="link" class="list-row" title="_EditAddress">
|
||||
<a
|
||||
class="list-row"
|
||||
href="#!form=account/address&address={{id}}"
|
||||
title="_EditAddress">
|
||||
<div class="actions">
|
||||
<htk-radio
|
||||
lot="iter"
|
||||
|
|
|
@ -6,7 +6,7 @@ Hedera.Home = new Class
|
|||
|
||||
,onStartOrderClick: function ()
|
||||
{
|
||||
this.hash.setAll ({'form': 'ecomerce/catalog'});
|
||||
this.hash.setAll ({form: 'ecomerce/catalog'});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
on-click="onStartOrderClick"/>
|
||||
</div>
|
||||
<div id="main" class="home">
|
||||
<div class="column mansonry" id="news-column">
|
||||
<div class="column mansonry">
|
||||
<htk-repeater>
|
||||
<db-model property="model">
|
||||
SELECT title, date_time, text, image, id FROM news
|
||||
SELECT title, text, image, id FROM news
|
||||
WHERE tag != 'course'
|
||||
ORDER BY priority, date_time DESC
|
||||
</db-model>
|
||||
|
@ -22,11 +22,6 @@
|
|||
<div class="new">
|
||||
<div class="top">
|
||||
<h2>{{title}}</h2>
|
||||
<!--
|
||||
<p class="new-info">
|
||||
<htk-text format="_%a, %e %b %Y" lot="new" name="date_time"/>
|
||||
</p>
|
||||
-->
|
||||
<div class="new-text">
|
||||
<htk-html lot="iter" name="text"/>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
var Compiler = require ('./compiler');
|
||||
var Component = require ('./component');
|
||||
var kebabToCamel = require ('./string-util').kebabToCamel;
|
||||
|
||||
var specialAttrs = {
|
||||
id : 1,
|
||||
|
@ -37,7 +38,7 @@ module.exports = new Class
|
|||
if (this.isEvent (attribute))
|
||||
events[attribute.substr (3)] = value;
|
||||
else if (objectAttrs[attribute])
|
||||
objectProps[attribute] = value;
|
||||
objectProps[attribute] = kebabToCamel(value);
|
||||
else if (!specialAttrs[attribute])
|
||||
props[attribute] = this.translateValue (value);
|
||||
}
|
||||
|
|
|
@ -114,10 +114,14 @@ module.exports = new Class
|
|||
var objects = this.objects;
|
||||
|
||||
for (var i = objects.length; i--;)
|
||||
if (objects[i] instanceof VnObject)
|
||||
{
|
||||
objects[i].unref ();
|
||||
objects[i].disconnectByInstance (this.builder.signalData);
|
||||
var object = objects[i];
|
||||
|
||||
if (object instanceof VnObject)
|
||||
{
|
||||
object.unref ();
|
||||
object.disconnectByInstance (this.builder.signalData);
|
||||
}
|
||||
}
|
||||
|
||||
this.parent ();
|
||||
|
|
Loading…
Reference in New Issue