Pman.Dialog.BAdminEmail.bjs
authorKH Lau <khlau@roojs.com>
Fri, 2 Feb 2018 08:19:28 +0000 (16:19 +0800)
committerKH Lau <khlau@roojs.com>
Fri, 2 Feb 2018 08:19:28 +0000 (16:19 +0800)
Pman.Dialog.BAdminEmail.js

Pman.Dialog.BAdminEmail.bjs
Pman.Dialog.BAdminEmail.js

index a2e9f81..3b7b9a9 100644 (file)
@@ -94,7 +94,7 @@
      "items" : [
       {
        "listeners" : {
-        "actionfailed" : "function (_self, action)\n{\n   switch(action.failureType) {\n    case Roo.form.Action.SERVER_INVALID: \n       if(action.result.errors.errcode) {\n           switch (action.result.errors.errcode) {\n               case 100:\n                   \n                   Roo.bootstrap.MessageBox.confirm('Confirm Save', 'No member found in To Group: ' + _this.form.findField('to_group_name').getRawValue() ,function(ret) {\n                       if(ret == 'no'){\n                           return;\n                       }\n                       _this.form.findField('_ignore_group_count').setValue('1');\n                       _this.form.doAction(\"submit\");                       \n                   }, this);\n               break;\n               \n               default:\n                   Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg);\n                   break;\n           }\n           return;\n       }\n       if(action.result.errorMsg.length >= 200) {\n           Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg.substring(0,199) + '...');\n       } else {\n           Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg);\n       }\n       \n       break;\n    case Roo.form.Action.CLIENT_INVALID: //for validation\n       break;\n    case Roo.form.Action.CONNECT_FAILURE:\n       Roo.bootstrap.MessageBox.alert(\"Connect Error\", action.result.errorMsg);\n       break;\n    default: \n       Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg);\n       break;\n       \n    }\n}",
+        "actionfailed" : "function (_self, action)\n{\n   switch(action.failureType) {\n    case Roo.form.Action.SERVER_INVALID: \n       if(action.result.errors.errcode) {\n           switch (action.result.errors.errcode) {\n               case 100:\n                   \n                   Roo.bootstrap.MessageBox.confirm('Confirm Save', 'No member found in To Group: ' + _this.combo_to_group.getRawValue() ,function(ret) {\n                       if(ret == 'no'){\n                           return;\n                       }\n                       _this.form.findField('_ignore_group_count').setValue('1');\n                       _this.form.doAction(\"submit\");                       \n                   }, this);\n               break;\n               \n               default:\n                   Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg);\n                   break;\n           }\n           return;\n       }\n       if(action.result.errorMsg.length >= 200) {\n           Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg.substring(0,199) + '...');\n       } else {\n           Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg);\n       }\n       \n       break;\n    case Roo.form.Action.CLIENT_INVALID: //for validation\n       break;\n    case Roo.form.Action.CONNECT_FAILURE:\n       Roo.bootstrap.MessageBox.alert(\"Connect Error\", action.result.errorMsg);\n       break;\n    default: \n       Roo.bootstrap.MessageBox.alert(\"Error\", action.result.errorMsg);\n       break;\n       \n    }\n}",
         "actioncomplete" : "function(_self,action)\n{\n   \n    if (action.type == 'setdata') {\n        \n        _this.data.module = _this.data.module || 'crm_mailing_list_message';\n        this.url = baseURL + '/Roo/' + _this.data.module;\n        \n        if(_this.data.id*1 > 0){\n            _this.dialog.el.mask(\"Loading\");\n            this.doAction(\n                'load',\n                { method: 'GET', params: { '_id' : _this.data.id }}\n            );\n            return;\n        }\n        \n        this.findField('name').setDisabled(false);\n        this.findField('test_class').setDisabled(false);\n        \n        this.reset();\n        \n        this.findField('to_group').setValue(-1);\n        this.findField('bodytext').setValue('');\n        \n        this.setValues({\n            'from_name' : Pman.Login.authUser.name,\n            'from_email' : Pman.Login.authUser.email\n        });\n        \n        this.clearInvalid();\n        \n        this.hideshow();\n        \n        return;\n    }\n    \n    if (action.type == 'load') {\n        \n        this.findField('name').setDisabled(false);\n        this.findField('test_class').setDisabled(false);\n        \n        if(action.result.data['is_system'] == 1) {\n            this.findField('name').setDisabled(true);\n            this.findField('test_class').setDisabled(true);\n        }\n        \n        _this.dialog.el.unmask();\n        \n        this.findField('bodytext').originalValue = this.findField('bodytext').getValue();\n        \n        _this.form_data = action.result.data;\n        this.findField('_ignore_group_count').setValue('0');\n        this.hideshow();\n        \n        return;\n    }\n    \n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n        \n         if (_this.callback) {\n            _this.callback.call(_this, action.result.data);\n         }\n         \n         this.reset();\n         \n         return;\n    }\n}\n",
         "render" : "function (_self)\n{\n    _this.form = this;\n}"
        },
index f323606..1154077 100644 (file)
@@ -333,7 +333,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                      switch (action.result.errors.errcode) {
                          case 100:
                              
-                             Roo.bootstrap.MessageBox.confirm('Confirm Save', 'No member found in To Group: ' + _this.form.findField('to_group_name').getRawValue() ,function(ret) {
+                             Roo.bootstrap.MessageBox.confirm('Confirm Save', 'No member found in To Group: ' + _this.combo_to_group.getRawValue() ,function(ret) {
                                  if(ret == 'no'){
                                      return;
                                  }