forked from verdnatura/hedera-web
69 lines
911 B
JavaScript
69 lines
911 B
JavaScript
|
|
var VnObject = require ('./object');
|
|
var LotIface = require ('./lot-iface');
|
|
|
|
module.exports = new Class
|
|
({
|
|
Extends: VnObject
|
|
,Implements: LotIface
|
|
,Tag: 'vn-lot'
|
|
,Properties:
|
|
{
|
|
params:
|
|
{
|
|
type: Object
|
|
,set: function (x)
|
|
{
|
|
this._params = x;
|
|
this.changed ();
|
|
}
|
|
,get: function ()
|
|
{
|
|
return this._params;
|
|
}
|
|
}
|
|
}
|
|
|
|
,_attachments: null
|
|
|
|
,initialize: function (props)
|
|
{
|
|
this._params = {};
|
|
this.parent (props);
|
|
}
|
|
|
|
,get: function (paramName)
|
|
{
|
|
return this._params[paramName];
|
|
}
|
|
|
|
,set: function (paramName, value)
|
|
{
|
|
this._params[paramName] = value;
|
|
this.changed ();
|
|
}
|
|
|
|
/**
|
|
* Resets all values.
|
|
*/
|
|
,reset: function ()
|
|
{
|
|
this._params = {};
|
|
this.changed ();
|
|
}
|
|
|
|
,keys: function ()
|
|
{
|
|
return Object.keys (this._params);
|
|
}
|
|
|
|
,assign: function (object)
|
|
{
|
|
for (var key in object)
|
|
this._params[key] = object[key];
|
|
|
|
this.changed ();
|
|
}
|
|
});
|
|
|