Builder/Provider/File/Roo.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 23 Jun 2010 07:36:15 +0000 (15:36 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 23 Jun 2010 07:36:15 +0000 (15:36 +0800)
Builder/Provider/File/Roo.js

index 6c48fb2..0e7677c 100755 (executable)
@@ -332,45 +332,50 @@ Roo = XObject.define(
             var modkey = this.modOrder + '-' + this.name.replace('/[^A-Z]+/ig', '-');
             
             
-            return [
-                this.outputHeader(),
-                "",
-                "",
-                "// register the module first",
-                "Pman.on('beforeload', function()",
-                "{",
-                "    Pman.register({",
-                "        modKey : '" +modkey+"',",
-                "        module : " + this.name + ",",
-                "        region : '" + this.region   +"',",
-                "        parent : " + (this.parent ||  'false') + ",",
-                "        name : " + JSON.stringify(this.title  || "unnamed module") + ",",
-                "        disabled : " + (this.disabled || 'false') +" ",
-                "    });",
-                "});",
-                "",
-                
-                this.name  +  " = new Roo.util.Observable({",
-                "",
-                "    panel : false,",
-                "    disabled : false,",
-                "    parentLayout:  false,",
-                "",
-                "    add : function(parentLayout, region)",
-                "    {",
-                "",
-                "        var _this = this;", // standard avaialbe..
-                "        this.parentLayout = parentLayout;",
-                "",
-                "        this.panel = parentLayout.addxtype(" + o +  ");",
-                "        this.layout = this.panel.layout;",
-                "",
-                "    }",
-                "});",
-                ""
-                 
+            if (this.name.match(/^Pman/) {
+                    
                 
-             ].join("\n");
+                // old BC way we did things..
+                return [
+                    this.outputHeader(),
+                    "",
+                    "",
+                    "// register the module first",
+                    "Pman.on('beforeload', function()",
+                    "{",
+                    "    Pman.register({",
+                    "        modKey : '" +modkey+"',",
+                    "        module : " + this.name + ",",
+                    "        region : '" + this.region   +"',",
+                    "        parent : " + (this.parent ||  'false') + ",",
+                    "        name : " + JSON.stringify(this.title  || "unnamed module") + ",",
+                    "        disabled : " + (this.disabled || 'false') +" ",
+                    "    });",
+                    "});",
+                    "",
+                    
+                    this.name  +  " = new Roo.util.Observable({",
+                    "",
+                    "    panel : false,",
+                    "    disabled : false,",
+                    "    parentLayout:  false,",
+                    "",
+                    "    add : function(parentLayout, region)",
+                    "    {",
+                    "",
+                    "        var _this = this;", // standard avaialbe..
+                    "        this.parentLayout = parentLayout;",
+                    "",
+                    "        this.panel = parentLayout.addxtype(" + o +  ");",
+                    "        this.layout = this.panel.layout;",
+                    "",
+                    "    }",
+                    "});",
+                    ""
+                     
+                    
+                 ].join("\n");
+            }
         },
             
         guessName : function(ar) // turns the object into full name.