php7 fixes
[Pman.Builder] / Pman.Tab.BuilderPalette.js
index c4e2310..c839923 100644 (file)
 
 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
 
+Roo.namespace('Pman.Tab');
 
+Pman.Tab.BuilderPalette = new Roo.XComponent({
 
-// register the module first
-Pman.on('beforeload', function()
-{
-    Pman.register({
-        modKey : '001-Pman.Tab.BuilderPalette',
-        module : Pman.Tab.BuilderPalette,
-        region : 'center',
-        parent : Pman.Tab.BuilderTab,
-        name : "Pman.Tab.BuilderPalette",
-        disabled : false, 
-        permname: '' 
-    });
-});
-
-Pman.Tab.BuilderPalette = new Roo.util.Observable({
-
-    panel : false,
-    disabled : false,
-    parentLayout:  false,
-
-    add : function(parentLayout, region)
-    {
-
-        var _this = this;
-        this.parentLayout = parentLayout;
-
-        this.panel = parentLayout.addxtype({
-            xtype: 'GridPanel',
-            xns: Roo,
-            listeners : {
-                activate : function() {
-                    _this.panel = this;
-                    if (_this.grid) {
-                       _this.grid.ds.load({})
-                    }
-                }
-            },
-            background : true,
-            fitContainer : true,
-            fitToframe : true,
-            region : 'east',
-            tableName : 'palette',
-            title : "palette",
-            grid : {
-                xtype: 'Grid',
-                xns: Roo.grid,
-                listeners : {
-                    render : function() 
-                    {
-                        _this.grid = this; 
-                        //_this.dialog = Pman.Dialog.FILL_IN
-                        if (_this.panel.active) {
-                           this.ds.load({})
-                        }
-                        if (_this.ss) {
-                            return;
-                        }
-                        _this.ss =   Roo.util.CSS.createStyleSheet(
-                    '.pman-builder-palete-hide { display: none; } ' + "\n" 
-                    , Roo.id())
-                        
-                        
-                        
-                    },
-                    rowclass : function (gridview, rowcfg)
-                    {
-                        var sn = Pman.Tab.BuilderTree.tree.currentNodeType();
-                        if (!sn) {
-                            sn = '*top';
-                        }
-                        var cls = 'pman-builder-palete-hide';
-                        var name  = rowconfig.record.data.name;
-                        Roo.each(rowconfig.record.data.parents, function(n) {
-                            if (n == name || n.split(':').shift() == name) 
-                                cls = '';
-                                return true;
-                            }
-                         );
-                        // what is the currently selected element..
-                     
-                    }
-                },
-                autoExpandColumn : 'name',
-                loadMask : true,
-                dataSource : {
-                    xtype: 'Store',
-                    xns: Roo.data,
-                    remoteSort : true,
-                    sortInfo : { field : 'name', direction: 'ASC' },
-                    proxy : {
-                        xtype: 'HttpProxy',
-                        xns: Roo.data,
-                        method : 'GET',
-                        url : baseURL + '/Builder/Palette.php'
-                    },
-                    reader : {
-                        xtype: 'JsonReader',
-                        xns: Roo.data,
-                        id : 'id',
-                        root : 'data',
-                        totalProperty : 'total',
-                        fields : [
-                            
-                            {
-                                'name': 'name',
-                                'type': 'string'
-                            }
-                        ]
-                    }
-                },
-                colModel : [
-                    {
-                        xtype: 'ColumnModel',
-                        xns: Roo.grid,
-                        header : 'Name',
-                        width : 200,
-                        dataIndex : 'name',
-                        renderer : function(v) { return String.format('{0}', v); }
-                    }
-                ]
-            }
-        });
-        this.layout = this.panel.layout;
+ _strings : {
+  '5ca5a8d02077b7f6a0da48bda450f755' :"palette",
+  '49ee3087348e8d44e1feda1917443987' :"Name"
+ },
 
-    }
+  part     :  ["Builder", "Palette" ],
+  order    : '001-Pman.Tab.BuilderPalette',
+  region   : 'center',
+  parent   : 'Pman.Tab.BuilderTab',
+  name     : "Pman.Tab.BuilderPalette",
+  disabled : false, 
+  permname : '', 
+  _tree : function(_data)
+  {
+   var _this = this;
+   var MODULE = this;
+   return {
+   xtype : 'GridPanel',
+   background : true,
+   fitContainer : true,
+   fitToframe : true,
+   region : 'east',
+   tableName : 'palette',
+   title : _this._strings['5ca5a8d02077b7f6a0da48bda450f755'] /* palette */,
+   listeners : {
+    activate : function() {
+         _this.panel = this;
+         if (_this.grid) {
+            _this.grid.ds.load({})
+         }
+     }
+   },
+   xns : Roo,
+   '|xns' : 'Roo',
+   grid : {
+    xtype : 'Grid',
+    autoExpandColumn : 'name',
+    ddGroup : 'component',
+    enableDrag : true,
+    loadMask : true,
+    listeners : {
+     render : function() 
+      {
+          _this.grid = this; 
+          //_this.dialog = Pman.Dialog.FILL_IN
+          if (_this.panel.active) {
+             this.ds.load({});
+          }
+          if (_this.ss) {
+              return;
+          }
+          _this.ss =   Roo.util.CSS.createStyleSheet(
+              '.pman-builder-palete-hide { display: none; } ' + "\n" 
+          , Roo.id());
+                  
+          
+          
+      },
+     rowclass : function (gridview, rowcfg)
+      {
+          var sn = Pman.Builder.Tree.currentNodeType();
+        //  Roo.log(rowcfg);
+          if (!sn) {
+              sn = '*top';
+          }
+          var cls = 'pman-builder-palete-hide';
+       
+          Roo.each(rowcfg.record.json.parents, function(n) {
+              if (n == sn || n.split(':').shift() == sn) {
+                  cls = '';
+                  return true;
+              }
+           });
+           
+           //Roo.log(cls);
+           rowcfg.rowClass = cls;
+          // what is the currently selected element..
+       
+      }
+    },
+    xns : Roo.grid,
+    '|xns' : 'Roo.grid',
+    dataSource : {
+     xtype : 'Store',
+     remoteSort : true,
+     sortInfo : { field : 'name', direction: 'ASC' },
+     xns : Roo.data,
+     '|xns' : 'Roo.data',
+     proxy : {
+      xtype : 'HttpProxy',
+      method : 'GET',
+      url : baseURL + '/Builder/Palette.php',
+      xns : Roo.data,
+      '|xns' : 'Roo.data'
+     },
+     reader : {
+      xtype : 'JsonReader',
+      fields : [
+          
+          {
+              'name': 'name',
+              'type': 'string'
+          }
+      ],
+      id : 'id',
+      root : 'data',
+      totalProperty : 'total',
+      xns : Roo.data,
+      '|xns' : 'Roo.data'
+     }
+    },
+    sm : {
+     xtype : 'RowSelectionModel',
+     singleSelect : true,
+     xns : Roo.grid,
+     '|xns' : 'Roo.grid'
+    },
+    colModel : [
+     {
+      xtype : 'ColumnModel',
+      dataIndex : 'name',
+      header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
+      renderer : function(v) { return String.format('{0}', v); },
+      width : 200,
+      xns : Roo.grid,
+      '|xns' : 'Roo.grid'
+     }
+    ]
+   }
+  };  }
 });