Pman.Dialog.BAdminEmailPreview.bjs
authorjohn <john@roojs.com>
Tue, 9 Jan 2018 14:41:08 +0000 (22:41 +0800)
committerjohn <john@roojs.com>
Tue, 9 Jan 2018 14:41:08 +0000 (22:41 +0800)
Pman.Dialog.BAdminEmailPreview.js

Pman.Dialog.BAdminEmailPreview.bjs
Pman.Dialog.BAdminEmailPreview.js

index 6a00b1f..d3d3015 100644 (file)
@@ -8,6 +8,7 @@
  "strings" : {
   "10e0d90d01ee3b134ee40b7ad31566a4" : "Message Preview",
   "4cd8413207629a963225f4314b53adcd" : "Plain",
+  "d3d2e617335f08df83599665eef8a418" : "Close",
   "4c4ad5fca2e7a3f74dbb1ced00381aa4" : "HTML"
  },
  "items" : [
        "Boolean background" : true
       }
      ]
+    },
+    {
+     "listeners" : {
+      "click" : "function (_self, e)\n{\n    _this.activeForm.doAction('submit', {clientValidation: false});\n    \n    var activePanel = _this.region_border.getRegion('center').getActivePanel();\n    var pos = _this.region_border.getRegion('center').panels.items.indexOf(activePanel);\n    \n    if(pos * 1 == 0){\n        _this.dialog.hide();\n        return;\n    }\n    \n    var target = pos * 1 - 1;\n    \n    _this.region_border.showPanel(target);\n    \n    _this.region_border.getRegion('center').getActivePanel().el.scrollTo('top');\n}"
+     },
+     "xtype" : "Button",
+     "$ xns" : "Roo.bootstrap",
+     "String html" : "Close",
+     "* prop" : "buttons[]",
+     "string name" : "close"
     }
    ]
   }
index 7ed6b5c..c4517a1 100644 (file)
@@ -10,6 +10,7 @@ Roo.apply(Pman.Dialog.BAdminEmailPreview.prototype, {
  _strings : {
   '10e0d90d01ee3b134ee40b7ad31566a4' :"Message Preview",
   '4cd8413207629a963225f4314b53adcd' :"Plain",
+  'd3d2e617335f08df83599665eef8a418' :"Close",
   '4c4ad5fca2e7a3f74dbb1ced00381aa4' :"HTML"
  },
 
@@ -67,6 +68,35 @@ Roo.apply(Pman.Dialog.BAdminEmailPreview.prototype, {
     },
     xns : Roo.bootstrap,
     '|xns' : 'Roo.bootstrap',
+    buttons : [
+     {
+      xtype : 'Button',
+      html : _this._strings['d3d2e617335f08df83599665eef8a418'] /* Close */,
+      name : 'close',
+      listeners : {
+       click : function (_self, e)
+        {
+            _this.activeForm.doAction('submit', {clientValidation: false});
+            
+            var activePanel = _this.region_border.getRegion('center').getActivePanel();
+            var pos = _this.region_border.getRegion('center').panels.items.indexOf(activePanel);
+            
+            if(pos * 1 == 0){
+                _this.dialog.hide();
+                return;
+            }
+            
+            var target = pos * 1 - 1;
+            
+            _this.region_border.showPanel(target);
+            
+            _this.region_border.getRegion('center').getActivePanel().el.scrollTo('top');
+        }
+      },
+      xns : Roo.bootstrap,
+      '|xns' : 'Roo.bootstrap'
+     }
+    ],
     items  : [
      {
       xtype : 'Border',