fix view source on dashbard4
[roojs1] / docs / Roo.docs.ViewSource.bjs
index 0829563..08da87d 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Roo.docs.ViewSource",
  "parent" : "",
  "title" : "",
- "path" : "/home/alan/gitlive/roojs1/docs2/Roo.docs.ViewSource.bjs",
+ "path" : "/home/alan/gitlive/roojs1/docs/Roo.docs.ViewSource.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
@@ -12,7 +12,7 @@
  "items" : [
   {
    "listeners" : {
-    "show" : "function (_self)\n{\n  //  if(_this.data.buttonText){\n    //    _this.acceptBtn.setText(_this.data.buttonText);\n   // }\n    \n      _this.body_ctr.el.dom.innerHTML = _this.data.source;\n     _this.body_ctr.el.dom.scrollTop = 0;\n     _this.dialog.setTitle(\"View Source: \" + _this.data.fname);\n    _this.dialog.el.setStyle('zIndex', '10002');\n    \n}"
+    "show" : "function (_self)\n{\n  //  if(_this.data.buttonText){\n    //    _this.acceptBtn.setText(_this.data.buttonText);\n   // }\n    \n    if (typeof( _this.data.source) == 'undefined') {\n        Roo.Ajax.request({\n            url : _this.data.src,\n            method : 'GET',\n            success : function(res, o)\n            {\n                Roo.docs.ViewSource.show({\n                    source : String.format(\"<PRE>{0}</PRE>\",res.responseText),\n                    fname : _this.data.src.split('/').pop()\n                });\n                \n            },\n            scope : this\n        });\n        \n    \n        return;\n    }\n     \n  _this.body_ctr.el.dom.innerHTML = _this.data.source;\n _this.body_ctr.el.dom.scrollTop = 0;\n _this.dialog.setTitle(\"View Source: \" + _this.data.fname);\n    _this.dialog.el.setStyle('zIndex', '10002');\n    \n}"
    },
    "xtype" : "Modal",
    "Boolean fitwindow" : true,