From fe2f6ec4d7236da6bf6defadda60287526b1684f Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 8 Dec 2015 08:27:44 +0300 Subject: [PATCH] minor tweak... Signed-off-by: Alex A. Naanou --- ui (gen4)/lib/actions.js | 10 +++++++++- ui (gen4)/lib/tasks.js | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/lib/actions.js b/ui (gen4)/lib/actions.js index a315d1f9..26038f66 100755 --- a/ui (gen4)/lib/actions.js +++ b/ui (gen4)/lib/actions.js @@ -743,9 +743,17 @@ module.MetaActions = { return this.mixout.call(to, this, all, descriptors, all_attr_types) }, + // Create a child object... + // + // NOTE: this will create a .config in the instance that inherits from + // this.config... + // NOTE: this will not copy/clone any data. + // // XXX is this correct??? clone: function(){ - return Object.create(this) + var o = Object.create(this) + o.config = Object.create(this.config) + return o }, } diff --git a/ui (gen4)/lib/tasks.js b/ui (gen4)/lib/tasks.js index 55615c6d..2d403239 100755 --- a/ui (gen4)/lib/tasks.js +++ b/ui (gen4)/lib/tasks.js @@ -332,6 +332,14 @@ module.QueueActions = actions.Actions({ delete this.__failed delete this.__done }], + + + // This will create a .config in instances... + __init__: function(){ + if(this.__proto__.config && !Object.hasOwnProperty(this, 'config')){ + this.config = Object.create(this.__proto__.config) + } + } })