"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" : {
"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,
// _this.acceptBtn.setText(_this.data.buttonText);
// }
- _this.body_ctr.el.dom.innerHTML = _this.data.source;
- _this.body_ctr.el.dom.scrollTop = 0;
- _this.dialog.setTitle("View Source: " + _this.data.fname);
+ if (typeof( _this.data.source) == 'undefined') {
+ Roo.Ajax.request({
+ url : _this.data.src,
+ method : 'GET',
+ success : function(res, o)
+ {
+ Roo.docs.ViewSource.show({
+ source : String.format("<PRE>{0}</PRE>",res.responseText),
+ fname : _this.data.src.split('/').pop()
+ });
+
+ },
+ scope : this
+ });
+
+
+ return;
+ }
+
+ _this.body_ctr.el.dom.innerHTML = _this.data.source;
+ _this.body_ctr.el.dom.scrollTop = 0;
+ _this.dialog.setTitle("View Source: " + _this.data.fname);
_this.dialog.el.setStyle('zIndex', '10002');
}
"modOrder" : "001",
"strings" : {
"098f6bcd4621d373cade4e832627b4f6" : "test",
+ "9c1ab57e621c2bb257798752dbbe6f14" : "view source",
"e93b3fa481be3932aa08bd68c3deee70" : "example 1",
"60ee66eb2cd31823032664c2e9a79fd5" : "body goes here",
"fb66f41b81f5973740bbfed019aa5d7d" : "Upload Images or Documents",
"$ xns" : "Roo.bootstrap",
"items" : [
{
+ "listeners" : {
+ "click" : "function (btn, e)\n{\n // assumes installed as /roojs1.\n Roo.docs.ViewSource.show({\n src: '/roojs1/examples/bootstrap/dashboard4.js'\n });\n}"
+ },
"xtype" : "Button",
- "$ xns" : "Roo.bootstrap"
+ "$ xns" : "Roo.bootstrap",
+ "String html" : "view source"
},
{
"xtype" : "Row",
_strings : {
'098f6bcd4621d373cade4e832627b4f6' :"test",
+ '9c1ab57e621c2bb257798752dbbe6f14' :"view source",
'e93b3fa481be3932aa08bd68c3deee70' :"example 1",
'60ee66eb2cd31823032664c2e9a79fd5' :"body goes here",
'fb66f41b81f5973740bbfed019aa5d7d' :"Upload Images or Documents",
items : [
{
xtype : 'Button',
+ html : _this._strings['9c1ab57e621c2bb257798752dbbe6f14'] /* view source */,
+ listeners : {
+ click : function (btn, e)
+ {
+ // assumes installed as /roojs1.
+ Roo.docs.ViewSource.show({
+ src: '/roojs1/examples/bootstrap/dashboard4.js'
+ });
+ }
+ },
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap'
},
<script type="text/javascript" src="../../Roo/bootstrap/CardFooter.js"></script>
<script type="text/javascript" src="../../Roo/bootstrap/CardUploader.js"></script>
-
+ <script type="text/javascript" src="../../docs/Roo.docs.ViewSource.js"></script>
+
<script type="text/javascript">