pulldown js error
[Pman.Admin] / Pman.Tab.AdminEnum.js
index a102bf8..3d34a97 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 : {
@@ -91,7 +91,7 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                                   method : 'POST',
                                                   params : {
                                                       id : record.data.id,
-                                                      etype : _this.etypeCombo.getValue(),
+                                                      etype : _this.grid.ds.getById(record.id).data.etype,
                                                       name : record.data.name,
                                                       active : record.data.active,
                                                       seqid : record.data.seqid,
@@ -198,8 +198,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                 {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
-                                       width : 200,
                                        header : 'Pulldown',
+                                       width : 200,
                                        renderer : function(v,x,r) { 
                                        
                                        
@@ -211,8 +211,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' : '';
                                        
@@ -230,14 +230,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)
                                   {
                                   
@@ -252,6 +244,22 @@ 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)
+                                  {
+                                      var rec = _this.egrid.ds.getAt(rowIndex);
+                                      Pman.Dialog.AdminEnumType.show(rec.data,function(){
+                                          
+                                          _this.egrid.footer.onClick('first');
+                                      });
                                   },
                                afteredit : function (e)
                                   {
@@ -289,8 +297,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 : {
@@ -340,7 +348,7 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
                                                   method : 'POST',
                                                   params : {
                                                       id : record.data.id,
-                                                      etype : _this.etypeCombo.getValue(),
+                                                      etype : _this.grid.ds.getById(record.id).data.etype,
                                                       name : record.data.name,
                                                       active : record.data.active,
                                                       seqid : record.data.seqid,
@@ -535,8 +543,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'
@@ -544,8 +552,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'
@@ -567,8 +575,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',
@@ -594,8 +602,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',
@@ -607,8 +615,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' : '';
                                        
@@ -657,6 +665,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)
                                   {
                                   
@@ -671,14 +687,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)
                                   {
@@ -691,9 +699,9 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
 
                         },
                         '|xns' : 'Roo',
-                        region : 'center',
                         fitToframe : true,
                         background : false,
+                        region : 'center',
                         title : "Pulldown Options",
                         xtype : 'GridPanel',
                         xns : Roo,
@@ -716,8 +724,8 @@ Pman.Tab.AdminEnum = new Roo.XComponent({
             },
             '|xns' : 'Roo',
             xtype : 'NestedLayoutPanel',
-            region : 'center',
             xns : Roo,
+            region : 'center',
             title : "Pulldown Options",
             items : [