hide popup message if failure is handled - not sure what knock on effect this may...
[Pman.Core] / Pman.Dialog.CoreEmail.bjs
index 8b7624f..3dd0bd6 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Dialog.CoreEmail",
  "parent" : "",
  "title" : "",
- "path" : "/home/alan/gitlive/Pman.Core/Pman.Dialog.CoreEmail.bjs",
+ "path" : "/home/johns/gitlive/Pman.Core/Pman.Dialog.CoreEmail.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
@@ -14,6 +14,7 @@
   "72d6d7a1885885bb55a565fd1070581a" : "Import",
   "ea30b40c3caf28acb29198d20d243e54" : "Images / Attachments >>",
   "31fde7b05ac8952dacf4af8a704074ec" : "Preview",
+  "b337c8a67244afb6551ee1f8f9717676" : "Test Class <BR/> (for system reference only)",
   "884df8e413319ff51a3f5f528606238a" : "Use template",
   "e6b391a8d2c4d45902a23a8b6585703d" : "URL",
   "2393ad754ba179442d85e415d1d5167c" : "Displayorder",
@@ -26,7 +27,6 @@
   "dc0de523c25be298ba751c63c694109e" : "Responsive Email (1)",
   "396ecabf0cd1f9503e591418851ef406" : "Edit / Create Message",
   "b9c49611cfda3259a2b837b39489e650" : "Add Image",
-  "44e7830e754c2e275ef6f658eafba13e" : "Test Class",
   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
   "68b00d723d37122f64da8d9939f836f0" : "BCC Group",
   "c4ca4238a0b923820dcc509a6f75849b" : "1",
                "pageSize" : 25,
                "displayField" : "name",
                "emptyText" : "Select BCC Group",
-               "hiddenName" : "bcc_group",
+               "hiddenName" : "bcc_group_id",
                "minChars" : 2,
                "valueField" : "id",
                "xtype" : "ComboBox",
                "editable" : false,
                "width" : 300,
                "$ xns" : "Roo.form",
-               "name" : "bcc_group_name",
+               "name" : "bcc_group_id_name",
                "qtip" : "Select BCC Group",
                "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
                "loadingText" : "Searching...",
                  "* prop" : "store",
                  "items" : [
                   {
-                   "$ url" : "baseURL + '/Roo/Groups'",
+                   "$ url" : "baseURL + '/Roo/Core_group'",
                    "method" : "GET",
                    "xtype" : "HttpProxy",
                    "$ xns" : "Roo.data",
              "items" : [
               {
                "listeners" : {
-                "click" : "function (_self, e)\n{\n    var h = _this.form.findField('bodytext').getValue();\n    var p = _this.form.findField('plaintext');\n    \n    new Pman.Request({\r\n        url : baseURL + '/Core/ImportMailMessage.php',\r\n        method : 'POST',\r\n        params : {\n          bodytext : h,\r\n          _convertToPlain : true,\n          _check_unsubscribe : true\r\n        }, \r\n        success : function(res) {\r\n            if(res.success == true){\n               p.setValue(res.data);\n            }\r\n        }\r\n    });  \n    \n}"
+                "click" : "function (_self, e)\n{\n    var h = _this.form.findField('bodytext').getValue();\n    var p = _this.form.findField('plaintext');\n    \n    new Pman.Request({\r\n        url : baseURL + '/Core/ImportMailMessage.php',\r\n        method : 'POST',\r\n        params : {\n          bodytext : h,\r\n          _convertToPlain : true,\n          _check_unsubscribe : true\r\n        }, \r\n        success : function(res) {\r\n            if(res.success == true){\n               p.setValue(res.data);\n            }\r\n        }\r\n    });\n    \n}"
                },
                "text" : "Convert Html to Text",
                "xtype" : "Button",
              "$ xns" : "Roo.form",
              "items" : [
               {
-               "fieldLabel" : "Test Class",
+               "fieldLabel" : "Test Class <BR/> (for system reference only)",
                "Boolean readOnly" : true,
                "xtype" : "TextField",
                "allowBlank" : true,
          "items" : [
           {
            "listeners" : {
-            "|click" : "function()\n{\n    var id = _this.form.findField('id').getValue();\n    \n    if(id*1 < 1){\n        Roo.MessageBox.alert('Error', 'Please save the email template first');\n        return;\n    }\n    \n    var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';\n    \n    Pman.Dialog.Image.show( { id : 0, onid: id, ontable: ontable }, function() {\n        _this.igrid.getDataSource().load({});\n    }); \n}\n"
+            "|click" : "function()\n{\n    var id = _this.form.findField('id').getValue();\n    \n    if(id*1 < 1){\n        Roo.MessageBox.alert('Error', 'Please save the email template first');\n        return;\n    }\n    \n    var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';\n    \n    Pman.Dialog.Image.show( { id : 0, onid: id, ontable: ontable }, function() {\n        _this.igrid.getDataSource().load({});\n    });\n}\n"
            },
            "text" : "Add",
            "xtype" : "Button",
     {
      "listeners" : {
       "render" : "function (_self)\n{\n    _this.html_preview = _self;\n}",
-      "click" : "function (_self, e)\n{\n    //_this.dialog.hide();\n    \n    var id = _this.form.findField('id').getValue();\n    \n    if(id*1 < 1){\n        Roo.MessageBox.alert('Error', 'Please save the message frist!');\n        return;\n    }\n   \n    new Pman.Request({\n        url : baseURL + '/Core/MessagePreview',\n        method : 'POST',\n        mask: 'Sending',\n        params : {\n            _id : id,\n            _table : _this.data.module\n        }, \n        success : function(res) { \n            if(res.data == 'SUCCESS'){\n                Roo.MessageBox.alert(\"Email Sent\", 'The report was sent to your email (HTML format).');\n            }\n        }\n    });\n}"
+      "click" : "function (_self, e)\n{\n    //_this.dialog.hide();\n\n    var id = _this.form.findField('id').getValue();\n    \n    if(id*1 < 1){\n        Roo.MessageBox.alert('Error', 'Please save the message frist!');\n        return;\n    }\n   \n    new Pman.Request({\n        url : baseURL + '/Core/MessagePreview',\n        method : 'POST',\n        mask: 'Sending',\n        params : {\n            _id : id,\n            _table : _this.data.module\n        }, \n        success : function(res) { \n            if(res.data == 'SUCCESS'){\n                Roo.MessageBox.alert(\"Email Sent\", 'The report was sent to your email (HTML format).');\n            }\n        }\n    });\n}"
      },
      "text" : "Send me a test copy",
      "xtype" : "Button",