From 6b189ac7355718628a148cd85a19efec514e3865 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Sun, 1 Apr 2012 14:38:16 +0800 Subject: [PATCH] Pman.js --- Pman.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Pman.js b/Pman.js index f9c92cff..ea91b06c 100644 --- a/Pman.js +++ b/Pman.js @@ -879,6 +879,44 @@ Pman = new Roo.Document( //this.xregister(obj); + + // old style calls go in here.. + // we need to convert the object going in to something like a XComponent. + + obj.render = function() + { + + //if (typeof(mod) == 'function') { + // mod(); + + if (typeof(this.region) == 'undefined') { + Roo.log("Module does not have region defined, skipping"); + Roo.log(this); + return; + } + if (this.module.disabled) { + Roo.log("Module disabled, should not rendering") + Roo.log(this); + return; + } + + if (!mod.parent.layout)) || this.module.disabled) { + // honour permname setings.. + if (mod.permname && mod.permname.length) { + if (Pman.hasPerm(mod.permname, 'S')) { + mod.module.add(mod.parent.layout, mod.region); + } + } else { + mod.module.add(mod.parent.layout, mod.region); + } + } + + + + + } + + Roo.log("CALLING XComponent register with : " + obj.name); // this will call xregister as it's the on.register handler.. -- 2.39.2