Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.bjs
index 710bb80..0da642d 100644 (file)
@@ -79,7 +79,7 @@
          "items" : [
           {
            "listeners" : {
-            "select" : "function (combo, record, index)\n{\n    \n}"
+            "select" : "function (combo, record, index)\n{\n    _this.expire_dt.allowBlank = true;\n    _this.expire_dt.el.hide();\n    \n    if(record.data.code == '-2'){\n        _this.expire_dt.allowBlank = false;\n        _this.expire_dt.el.show();\n    }\n}"
            },
            "Boolean allowBlank" : false,
            "Boolean selectOnFocus" : true,
          "items" : [
           {
            "listeners" : {
-            "render" : "function (_self)\n{\n    _this.expire_dt = this;\n    \n    this.setStartDate(new Date());\n    \n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    //this.el.hide();\n}"
+            "render" : "function (_self)\n{\n    _this.expire_dt = this;\n    \n    var d = new Date();\n    d.setDate(d.getDate() - 1);\n\n    this.setStartDate(d);\n    \n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    this.el.hide();\n}"
            },
            "Boolean allowBlank" : false,
            "String name" : "expire_dt",
     },
     {
      "listeners" : {
-      "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        return;\n    }\n    \n    _this.dialog.el.mask('Sending...');\n    _this.form.doAction('submit');\n    \n}"
+      "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        return;\n    }\n    Roo.log('submit');\n    return;\n    _this.dialog.el.mask('Sending...');\n    _this.form.doAction('submit');\n    \n}"
      },
      "String weight" : "primary",
      "xtype" : "Button",