Pman.Tab.AdminEnum.bjs
authorMicheal <micheal@roojs.com>
Thu, 29 Jan 2015 07:29:50 +0000 (15:29 +0800)
committerMicheal <micheal@roojs.com>
Thu, 29 Jan 2015 07:29:50 +0000 (15:29 +0800)
Pman.Tab.AdminEnum.js

Pman.Tab.AdminEnum.bjs
Pman.Tab.AdminEnum.js

index 5d446f5..58b9929 100644 (file)
@@ -8,8 +8,8 @@
     "items" : [
         {
             "xtype" : "NestedLayoutPanel",
-            "String region" : "center",
             "$ xns" : "Roo",
+            "String region" : "center",
             "String title" : "Pulldown Options",
             "items" : [
                 {
@@ -43,8 +43,8 @@
                                 {
                                     "listeners" : {
                                         "beforeedit" : "function (e)\n{\n    if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){\n        return false;\n    }\n}",
-                                        "|render" : "function() \n{\n    _this.egrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.epanel.active) {\n       this.footer.onClick('first');\n    }\n}",
                                         "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        if (di != 'active') {\n            return;\n        }\n         \n        var rec = _this.grid.ds.getAt(rowIndex);\n        \n        rec.set('active', rec.data.active ? 0 : 1);\n        rec.commit();\n         \n        \n}",
+                                        "|render" : "function() \n{\n    _this.egrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.epanel.active) {\n       this.footer.onClick('first');\n    }\n}",
                                         "celldblclick" : "function (_self, rowIndex, columnIndex, e)\n{\n    var rec = _this.egrid.ds.getAt(rowIndex);\n    Pman.Dialog.AdminEnumType.show(rec.data,function(){\n        \n        _this.egrid.footer.onClick('first');\n    });\n}",
                                         "afteredit" : "function (e)\n{\n   e.record.commit();     \n}"
                                     },
@@ -68,8 +68,8 @@
                                             "items" : [
                                                 {
                                                     "$ url" : "baseURL + '/Roo/core_enum.php'",
-                                                    "method" : "GET",
                                                     "xtype" : "HttpProxy",
+                                                    "method" : "GET",
                                                     "$ xns" : "Roo.data",
                                                     "* prop" : "proxy"
                                                 },
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "width" : 200,
                                             "header" : "Pulldown",
+                                            "width" : 200,
                                             "$ renderer" : "function(v,x,r) { \n\n\n    return String.format('<span qtip=\"{1}\">{0}</span>', (''+v).length ? v : r.data.name, r.data.name); \n}",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "width" : 50,
                                             "header" : "Active",
+                                            "width" : 50,
                                             "$ renderer" : "function(v) {  \n    var state = v> 0 ?  '-checked' : '';\n\n    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n                \n }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                             "listeners" : {
                                 "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
                             },
+                            "background" : false,
                             "region" : "center",
                             "fitToframe" : true,
-                            "background" : false,
                             "title" : "Pulldown Options",
                             "xtype" : "GridPanel",
                             "$ xns" : "Roo",
                                 {
                                     "listeners" : {
                                         "beforeedit" : "function (e)\n{\n    if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){\n        return false;\n    }\n}",
-                                        "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        if (di != 'active') {\n            return;\n        }\n         \n        var rec = _this.grid.ds.getAt(rowIndex);\n        \n        rec.set('active', rec.data.active ? 0 : 1);\n        rec.commit();\n         \n        \n}",
                                         "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
+                                        "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        if (di != 'active') {\n            return;\n        }\n         \n        var rec = _this.grid.ds.getAt(rowIndex);\n        \n        rec.set('active', rec.data.active ? 0 : 1);\n        rec.commit();\n         \n        \n}",
                                         "afteredit" : "function (e)\n{\n   e.record.commit();     \n}"
                                     },
                                     "autoExpandColumn" : "display_name",
                                             "items" : [
                                                 {
                                                     "$ url" : "baseURL + '/Roo/core_enum.php'",
-                                                    "xtype" : "HttpProxy",
                                                     "method" : "GET",
+                                                    "xtype" : "HttpProxy",
                                                     "$ xns" : "Roo.data",
                                                     "* prop" : "proxy"
                                                 },
                                                 {
                                                     "xtype" : "Button",
                                                     "$ xns" : "Roo.Toolbar",
-                                                    "String icon" : "http://roojs.com/Pman/templates/images/search.gif"
+                                                    "String icon" : "rootURL + '/Pman/templates/images/search.gif'"
                                                 },
                                                 {
                                                     "xtype" : "Button",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Internal #",
                                             "width" : 75,
+                                            "header" : "Internal #",
                                             "$ renderer" : "function(v) { return String.format('{0}', v); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Image",
                                             "width" : 75,
+                                            "header" : "Image",
                                             "$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/25/{1}/{2}\" width=\"25\" height=\"25\">', baseURL, v, r.data.images_id_filename); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "width" : 200,
                                             "header" : "Name",
+                                            "width" : 200,
                                             "$ renderer" : "function(v) { return String.format('{0}', v); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Display Name",
                                             "width" : 200,
+                                            "header" : "Display Name",
                                             "$ renderer" : "function(v) { return String.format('{0}', v); }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
                                         },
                                         {
                                             "xtype" : "ColumnModel",
-                                            "header" : "Active",
                                             "width" : 75,
+                                            "header" : "Active",
                                             "$ renderer" : "function(v) {  \n    var state = v> 0 ?  '-checked' : '';\n\n    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n                \n }",
                                             "$ xns" : "Roo.grid",
                                             "* prop" : "colModel[]",
index b5c53c1..ea5cadd 100644 (file)
@@ -40,8 +40,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                 proxy : {
                                     '|xns' : 'Roo.data',
                                     url : baseURL + '/Roo/core_enum.php',
-                                    method : 'GET',
                                     xtype : 'HttpProxy',
+                                    method : 'GET',
                                     xns : Roo.data
                                 },
                                 reader : {
@@ -183,8 +183,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       width : 200,
                                        header : 'Pulldown',
+                                       width : 200,
                                        renderer : function(v,x,r) { 
                                        
                                        
@@ -196,8 +196,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       width : 50,
                                        header : 'Active',
+                                       width : 50,
                                        renderer : function(v) {  
                                            var state = v> 0 ?  '-checked' : '';
                                        
@@ -215,14 +215,6 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                           return false;
                                       }
                                   },
-                               render : function() 
-                                  {
-                                      _this.egrid = this; 
-                                      //_this.dialog = Pman.Dialog.FILL_IN
-                                      if (_this.epanel.active) {
-                                         this.footer.onClick('first');
-                                      }
-                                  },
                                cellclick : function (_self, rowIndex, columnIndex, e)
                                   {
                                   
@@ -237,6 +229,14 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                           rec.commit();
                                            
                                           
+                                  },
+                               render : function() 
+                                  {
+                                      _this.egrid = this; 
+                                      //_this.dialog = Pman.Dialog.FILL_IN
+                                      if (_this.epanel.active) {
+                                         this.footer.onClick('first');
+                                      }
                                   },
                                celldblclick : function (_self, rowIndex, columnIndex, e)
                                   {
@@ -282,8 +282,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                 proxy : {
                                     '|xns' : 'Roo.data',
                                     url : baseURL + '/Roo/core_enum.php',
-                                    xtype : 'HttpProxy',
                                     method : 'GET',
+                                    xtype : 'HttpProxy',
                                     xns : Roo.data
                                 },
                                 reader : {
@@ -526,7 +526,7 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                         '|xns' : 'Roo.Toolbar',
                                         xtype : 'Button',
                                         xns : Roo.Toolbar,
-                                        icon : 'http://roojs.com/Pman/templates/images/search.gif'
+                                        icon : 'rootURL + \'/Pman/templates/images/search.gif\''
                                     },
                                        {
                                         '|xns' : 'Roo.Toolbar',
@@ -547,8 +547,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Internal #',
                                        width : 75,
+                                       header : 'Internal #',
                                        renderer : function(v) { return String.format('{0}', v); },
                                        xns : Roo.grid,
                                        dataIndex : 'id'
@@ -556,8 +556,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Image',
                                        width : 75,
+                                       header : 'Image',
                                        renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/25/{1}/{2}" width="25" height="25">', baseURL, v, r.data.images_id_filename); },
                                        xns : Roo.grid,
                                        dataIndex : 'images_id_id'
@@ -579,8 +579,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                        },
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       width : 200,
                                        header : 'Name',
+                                       width : 200,
                                        renderer : function(v) { return String.format('{0}', v); },
                                        xns : Roo.grid,
                                        dataIndex : 'name',
@@ -606,8 +606,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                        },
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Display Name',
                                        width : 200,
+                                       header : 'Display Name',
                                        renderer : function(v) { return String.format('{0}', v); },
                                        xns : Roo.grid,
                                        dataIndex : 'display_name',
@@ -619,8 +619,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       header : 'Active',
                                        width : 75,
+                                       header : 'Active',
                                        renderer : function(v) {  
                                            var state = v> 0 ?  '-checked' : '';
                                        
@@ -669,6 +669,14 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                           return false;
                                       }
                                   },
+                               render : function() 
+                                  {
+                                      _this.grid = this; 
+                                      //_this.dialog = Pman.Dialog.FILL_IN
+                                      if (_this.panel.active) {
+                                         this.footer.onClick('first');
+                                      }
+                                  },
                                cellclick : function (_self, rowIndex, columnIndex, e)
                                   {
                                   
@@ -683,14 +691,6 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                           rec.commit();
                                            
                                           
-                                  },
-                               render : function() 
-                                  {
-                                      _this.grid = this; 
-                                      //_this.dialog = Pman.Dialog.FILL_IN
-                                      if (_this.panel.active) {
-                                         this.footer.onClick('first');
-                                      }
                                   },
                                afteredit : function (e)
                                   {
@@ -703,9 +703,9 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
 
                         },
                         '|xns' : 'Roo',
+                        background : false,
                         region : 'center',
                         fitToframe : true,
-                        background : false,
                         title : "Pulldown Options",
                         xtype : 'GridPanel',
                         xns : Roo,
@@ -728,8 +728,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
             },
             '|xns' : 'Roo',
             xtype : 'NestedLayoutPanel',
-            region : 'center',
             xns : Roo,
+            region : 'center',
             title : "Pulldown Options",
             items : [