From 61aa2c3e708deaabb06e82b546556cddeaae3adc Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 12 Sep 2012 14:35:55 +0800 Subject: [PATCH] Pman.Dialog.CoreCompanies.bjs Pman.Dialog.CoreCompanies.js --- Pman.Dialog.CoreCompanies.bjs | 2 +- Pman.Dialog.CoreCompanies.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Pman.Dialog.CoreCompanies.bjs b/Pman.Dialog.CoreCompanies.bjs index 64cb919b..cfb96486 100644 --- a/Pman.Dialog.CoreCompanies.bjs +++ b/Pman.Dialog.CoreCompanies.bjs @@ -7,7 +7,7 @@ "items": [ { "listeners": { - "beforeshow": "function (_self)\n{\n if (data.isOwner || !Pman.Login.isOwner()) {\n this.dialog.setTitle(\"Your Company Details\");\n if (this.form.findField('comptype')) {\n this.form.findField('comptype').disable();\n }\n \n \n \n \n } else {\n this.dialog.setTitle(data.id ? \"Edit Company\" : \"Add Company\");\n if (this.form.findField('comptype')) {\n this.form.findField('comptype').enable();\n }\n }\n}" + "beforeshow": "function (_self)\n{\n if (data.isOwner || !Pman.Login.isOwner()) {\n this.dialog.setTitle(\"Your Company Details\");\n if (_this.form.findField('comptype')) {\n _this.form.findField('comptype').disable();\n }\n \n \n \n \n } else {\n this.dialog.setTitle(data.id ? \"Edit Company\" : \"Add Company\");\n if (_this.form.findField('comptype')) {\n _this.form.findField('comptype').enable();\n }\n }\n}" }, "autoCreate": "true", "closable": false, diff --git a/Pman.Dialog.CoreCompanies.js b/Pman.Dialog.CoreCompanies.js index d4d2c2a4..83daae89 100644 --- a/Pman.Dialog.CoreCompanies.js +++ b/Pman.Dialog.CoreCompanies.js @@ -35,8 +35,8 @@ Pman.Dialog.CoreCompanies = { { if (data.isOwner || !Pman.Login.isOwner()) { this.dialog.setTitle("Your Company Details"); - if (this.form.findField('comptype')) { - this.form.findField('comptype').disable(); + if (_this.form.findField('comptype')) { + _this.form.findField('comptype').disable(); } @@ -44,8 +44,8 @@ Pman.Dialog.CoreCompanies = { } else { this.dialog.setTitle(data.id ? "Edit Company" : "Add Company"); - if (this.form.findField('comptype')) { - this.form.findField('comptype').enable(); + if (_this.form.findField('comptype')) { + _this.form.findField('comptype').enable(); } } } -- 2.39.2