X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=blobdiff_plain;f=Pman.Dialog.AdminCoreEnum.bjs;h=ac5ccf76538ed320dd292b7bcb392dfc5663d647;hp=a1c15aa9a39c9a762fa7065697a81a4d901c45f6;hb=HEAD;hpb=aa82f28a5d7fa5393dbde2a5b232d285ac07d6ed diff --git a/Pman.Dialog.AdminCoreEnum.bjs b/Pman.Dialog.AdminCoreEnum.bjs index a1c15aa..ac5ccf7 100644 --- a/Pman.Dialog.AdminCoreEnum.bjs +++ b/Pman.Dialog.AdminCoreEnum.bjs @@ -21,7 +21,7 @@ "items" : [ { "listeners" : { - "show" : "function (_self)\n{\n if(!isAdmin && Pman.Tab.Hopedb){\n Roo.MessageBox.alert(\"Error\", \"Permission Denied\", function(){\n _this.dialog.hide();\n });\n return;\n }\n var name_hidden = false;\n\n if (typeof(_this.data._hide_name) != 'undefined') {\n name_hidden = true;\n \n }\n \n _this.grid.colModel.setHidden(1,name_hidden);\n _this.grid.footer.onClick('first');\n}" + "show" : "function (_self)\n{\n if(!isAdmin && Pman.Tab.Hopedb){\n Roo.MessageBox.alert(\"Error\", \"Permission Denied\", function(){\n _this.dialog.hide();\n });\n return;\n }\n var name_hidden = false;\n\n if (typeof(_this.data._hide_name) != 'undefined') {\n name_hidden = true;\n \n }\n \n _this.grid.colModel.setHidden(1,name_hidden);\n _this.grid.footer.onClick('first');\n \n}" }, "modal" : true, "title" : "Pulldown Options", @@ -41,9 +41,9 @@ "listeners" : { "|activate" : "function() {\n _this.panel = this;\n if (_this.grid) {\n // _this.grid.footer.onClick('first');\n }\n \n}" }, + "fitToframe" : true, "background" : false, "region" : "center", - "fitToframe" : true, "title" : "Pulldown Options", "xtype" : "GridPanel", "fitContainer" : true, @@ -67,7 +67,7 @@ { "listeners" : { "update" : "function (_self, record, operation)\n{\n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n Roo.log(record);\n\n if (typeof(_this.data._hide_name) != 'undefined') {\n record.set('name', record.data.display_name);\n }\n if (!record.data.name.length) {\n return;\n }\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.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 options.params.etype = _this.data.etype;\n if (!options.params.etype.length) {\n return false;\n }\n}" + "beforeload" : "function (_self, options)\n{\n\n options.params.etype = _this.data.etype;\n if (!options.params.etype.length) {\n return false;\n }\n \n \n \n \n}" }, "xtype" : "Store", "remoteSort" : true, @@ -229,7 +229,7 @@ }, { "listeners" : { - "click" : "function (_self, e)\n{\n var sel = _this.grid.selModel.getSelectedCell();\n if (!sel && _this.callback) {\n Roo.MessageBox.alert(\"Error\", \"Select an item\");\n return;\n }\n \n\n if (_this.callback) {\n var rec = _this.grid.ds.getAt(sel[0]);\n _this.callback(rec.data);\n }\n _this.dialog.hide();\n}" + "click" : "function (_self, e)\n{\n var sel = _this.grid.selModel.getSelectedCell();\n if (!sel && _this.callback) {\n Roo.MessageBox.alert(\"Error\", \"Select an item\");\n return;\n }\n \n\n if (_this.callback) {\n var rec = _this.grid.ds.getAt(sel[0]);\n _this.callback(rec.data);\n }\n _this.dialog.hide();\n \n} \n " }, "text" : "OK", "xtype" : "Button",