try and get ctrl-enter to add a clear all
[roojs1] / docs / Roo.docs.ViewSource.js
index 6c131db..badb91c 100644 (file)
@@ -39,6 +39,7 @@ Roo.apply(Roo.docs.ViewSource.prototype, {
     xtype : 'Modal',
     fitwindow : true,
     max_width : 900,
+    size : 'xl',
     title : _this._strings['89babd10371e21bb9eaf39937de7c656'] /* View Source */,
     listeners : {
      show : function (_self)
@@ -47,9 +48,28 @@ Roo.apply(Roo.docs.ViewSource.prototype, {
           //    _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');
           
       }