From: Michael Date: Mon, 9 Feb 2015 04:50:11 +0000 (+0800) Subject: Pman.Dialog.AdminEnumType.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=5c7af5a910ae61eca2dd9a454f1e88c3697f68d5 Pman.Dialog.AdminEnumType.bjs Pman.Dialog.AdminEnumType.js --- diff --git a/Pman.Dialog.AdminEnumType.bjs b/Pman.Dialog.AdminEnumType.bjs index f59bda2..86cf4f8 100644 --- a/Pman.Dialog.AdminEnumType.bjs +++ b/Pman.Dialog.AdminEnumType.bjs @@ -22,19 +22,20 @@ }, { "xtype" : "ContentPanel", - "$ xns" : "Roo", "String region" : "center", + "$ xns" : "Roo", "items" : [ { "listeners" : { - "|actioncomplete" : "function (_self, action)\n{\n if(action.type == 'submit'){\n _this.dialog.hide();\n \n if(_this.callback){\n _this.callback.call(_this, _this.form.getValues());\n }\n return\n }\n}", - "rendered" : "function (form)\n{\n _this.form = this;\n}" + "rendered" : "function (form)\n{\n _this.form = this;\n}", + "|actioncomplete" : "function (_self, action)\n{\n if(action.type == 'submit'){\n _this.dialog.hide();\n \n if(_this.callback){\n _this.callback.call(_this, _this.form.getValues());\n }\n return\n }\n}" }, "$ url" : "baseURL + '/Roo/Core_enum'", "xtype" : "Form", "$ xns" : "Roo.form", "items" : [ { + "Boolean allowBlank" : false, "String name" : "name", "Number width" : 270, "xtype" : "TextField", diff --git a/Pman.Dialog.AdminEnumType.js b/Pman.Dialog.AdminEnumType.js index b9a6bde..e94bf6a 100644 --- a/Pman.Dialog.AdminEnumType.js +++ b/Pman.Dialog.AdminEnumType.js @@ -76,8 +76,8 @@ Pman.Dialog.AdminEnumType = { { '|xns' : 'Roo', xtype : 'ContentPanel', - xns : Roo, region : 'center', + xns : Roo, items : [ { '|xns' : 'Roo.form', @@ -85,6 +85,10 @@ Pman.Dialog.AdminEnumType = { xtype : 'Form', xns : Roo.form, listeners : { + rendered : function (form) + { + _this.form = this; + }, actioncomplete : function (_self, action) { if(action.type == 'submit'){ @@ -95,15 +99,12 @@ Pman.Dialog.AdminEnumType = { } return } - }, - rendered : function (form) - { - _this.form = this; } }, items : [ { '|xns' : 'Roo.form', + allowBlank : false, name : 'name', width : 270, xtype : 'TextField',