hedera-web/js/vn/lot.js

65 lines
932 B
JavaScript
Raw Normal View History

2016-12-23 08:57:49 +00:00
module.exports = new Class
({
2017-03-30 11:44:53 +00:00
Properties:
{
/**
* The internal object with the params.
*/
params:
{
type: Object
}
}
2016-12-23 08:57:49 +00:00
/**
* Gets a value from the set.
*
* @param {String} field The field name
2017-03-30 11:44:53 +00:00
* @return {*} The field value
2016-12-23 08:57:49 +00:00
*/
2017-03-30 11:44:53 +00:00
,get: function () {}
2016-12-23 08:57:49 +00:00
/**
* Sets a value on the set.
*
* @param {String} field The field name
2017-03-30 11:44:53 +00:00
* @param {*} value The new field value
2016-12-23 08:57:49 +00:00
*/
2017-03-30 11:44:53 +00:00
,set: function () {}
/**
* Returns an array with the set keys.
*
* @return {Array} The set keys
*/
,keys: function () {}
2016-12-23 08:57:49 +00:00
/**
* Emits the 'change' signal on the set.
*/
,changed: function ()
{
this.signalEmit ('change');
}
2017-03-30 11:44:53 +00:00
/**
* Copies all values from another set.
*
2017-04-08 11:42:27 +00:00
* @param {Object} object The source object
2017-03-30 11:44:53 +00:00
*/
2017-04-08 11:42:27 +00:00
,assign: function (object)
2017-03-30 11:44:53 +00:00
{
2017-04-08 11:42:27 +00:00
for (var key in object)
this.set (key, object[key]);
2017-03-30 11:44:53 +00:00
2017-04-08 11:42:27 +00:00
this.changed ();
}
,assignLot: function (lot)
{
this.assign (lot.params);
2017-03-30 11:44:53 +00:00
}
2016-12-23 08:57:49 +00:00
});