X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Tab.AdminEnum.bjs;h=229f6b32a6c95378f540fae348afeef4265088c9;hb=a135e83de4ac6775a1bc3d608fcadf9e76c8b70d;hp=50a70ed0e0689db1953e358dbfbfcc8a01ede9a9;hpb=be2b32ec3940f51083d62854828ab95a2787c3c2;p=Pman.Admin diff --git a/Pman.Tab.AdminEnum.bjs b/Pman.Tab.AdminEnum.bjs index 50a70ed..229f6b3 100644 --- a/Pman.Tab.AdminEnum.bjs +++ b/Pman.Tab.AdminEnum.bjs @@ -8,8 +8,8 @@ "items" : [ { "xtype" : "NestedLayoutPanel", - "String region" : "center", "$ xns" : "Roo", + "String region" : "center", "String title" : "Pulldown Options", "items" : [ { @@ -43,8 +43,9 @@ { "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}" }, "autoExpandColumn" : "display_name", @@ -56,7 +57,7 @@ "items" : [ { "listeners" : { - "update" : "function (_self, record, operation)\n{\n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n // got commit..\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n id : record.data.id,\n etype : _this.etypeCombo.getValue(),\n name : record.data.name,\n active : record.data.active,\n seqid : record.data.seqid,\n display_name : record.data.display_name\n }, \n success : function(res) {\n //Roo.log(data);\n // update the ID if it's not set..\n if (record.data.id * 1 < 1) {\n record.set('id', res.data.id);\n }\n }\n });\n \n}", + "update" : "function (_self, record, operation)\n{\n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n // got commit..\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n id : record.data.id,\n etype : _this.grid.ds.getById(record.id).data.etype,\n name : record.data.name,\n active : record.data.active,\n seqid : record.data.seqid,\n display_name : record.data.display_name\n }, \n success : function(res) {\n //Roo.log(data);\n // update the ID if it's not set..\n if (record.data.id * 1 < 1) {\n record.set('id', res.data.id);\n }\n }\n });\n \n}", "beforeload" : "function (_self, o)\n{\n o.params['query[empty_etype]'] = 1; \n \n}" }, "xtype" : "Store", @@ -67,8 +68,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.php'", - "method" : "GET", "xtype" : "HttpProxy", + "method" : "GET", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -119,8 +120,8 @@ }, { "xtype" : "ColumnModel", - "width" : 200, "header" : "Pulldown", + "width" : 200, "$ renderer" : "function(v,x,r) { \n\n\n return String.format('{0}', (''+v).length ? v : r.data.name, r.data.name); \n}", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -128,8 +129,8 @@ }, { "xtype" : "ColumnModel", - "width" : 50, "header" : "Active", + "width" : 50, "$ renderer" : "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '';\n \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -143,9 +144,9 @@ "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, - "region" : "center", "fitToframe" : true, "background" : false, + "region" : "center", "title" : "Pulldown Options", "xtype" : "GridPanel", "$ xns" : "Roo", @@ -154,8 +155,8 @@ { "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", @@ -167,7 +168,7 @@ "items" : [ { "listeners" : { - "update" : "function (_self, record, operation)\n{\n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n // got commit..\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n id : record.data.id,\n etype : _this.etypeCombo.getValue(),\n name : record.data.name,\n active : record.data.active,\n seqid : record.data.seqid,\n display_name : record.data.display_name\n }, \n success : function(res) {\n //Roo.log(data);\n // update the ID if it's not set..\n if (record.data.id * 1 < 1) {\n record.set('id', res.data.id);\n }\n }\n });\n \n}", + "update" : "function (_self, record, operation)\n{\n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n // got commit..\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n id : record.data.id,\n etype : _this.grid.ds.getById(record.id).data.etype,\n name : record.data.name,\n active : record.data.active,\n seqid : record.data.seqid,\n display_name : record.data.display_name\n }, \n success : function(res) {\n //Roo.log(data);\n // update the ID if it's not set..\n if (record.data.id * 1 < 1) {\n record.set('id', res.data.id);\n }\n }\n });\n \n}", "beforeload" : "function (_self, options)\n{\n\n var s = _this.egrid.getSelectionModel().getSelectedCell();\n \n\n if (!s) {\n return false;\n }\n var d = _this.egrid.dataSource.getAt(s[0]);\n \n options.params.etype = d.data.name;\n if (!options.params.etype.length) {\n return false;\n }\n}" }, "xtype" : "Store", @@ -178,8 +179,8 @@ "items" : [ { "$ url" : "baseURL + '/Roo/core_enum.php'", - "xtype" : "HttpProxy", "method" : "GET", + "xtype" : "HttpProxy", "$ xns" : "Roo.data", "* prop" : "proxy" }, @@ -250,8 +251,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Internal #", "width" : 75, + "header" : "Internal #", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -259,8 +260,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Image", "width" : 75, + "header" : "Image", "$ renderer" : "function(v,x,r) { return String.format('', baseURL, v, r.data.images_id_filename); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -268,8 +269,8 @@ }, { "xtype" : "ColumnModel", - "width" : 200, "header" : "Name", + "width" : 200, "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -291,8 +292,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Display Name", "width" : 200, + "header" : "Display Name", "$ renderer" : "function(v) { return String.format('{0}', v); }", "$ xns" : "Roo.grid", "* prop" : "colModel[]", @@ -314,8 +315,8 @@ }, { "xtype" : "ColumnModel", - "header" : "Active", "width" : 75, + "header" : "Active", "$ renderer" : "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '';\n \n }", "$ xns" : "Roo.grid", "* prop" : "colModel[]",