merge changes for seperator change
[roojs1] / docs / Roo.docs.ViewSource.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Roo.docs');
6
7 Roo.docs.ViewSource= function() {}
8 Roo.apply(Roo.docs.ViewSource.prototype, {
9
10  _strings : {
11   'd3d2e617335f08df83599665eef8a418' :"Close",
12   '89babd10371e21bb9eaf39937de7c656' :"View Source"
13  },
14
15  dialog : false,
16  callback:  false,
17
18  show : function(data, cb)
19  {
20   if (!this.dialog) {
21    this.create();
22   }
23
24   this.callback = cb;
25   this.data = data;
26   this.dialog.show(this.data._el);
27   if (this.form) {
28    this.form.reset();
29    this.form.setValues(data);
30    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
31   }
32
33  },
34
35  create : function()
36  {
37   var _this = this;
38   this.dialog = Roo.factory({
39     xtype : 'Modal',
40     fitwindow : true,
41     max_width : 900,
42     title : _this._strings['89babd10371e21bb9eaf39937de7c656'] /* View Source */,
43     listeners : {
44      show : function (_self)
45       {
46         //  if(_this.data.buttonText){
47           //    _this.acceptBtn.setText(_this.data.buttonText);
48          // }
49           
50             _this.body_ctr.el.dom.innerHTML = _this.data.source;
51            _this.body_ctr.el.dom.scrollTop = 0;
52            _this.dialog.setTitle("View Source: " + _this.data.fname);
53           _this.dialog.el.setStyle('zIndex', '10002');
54           
55       }
56     },
57     xns : Roo.bootstrap,
58     '|xns' : 'Roo.bootstrap',
59     buttons : [
60      {
61       xtype : 'Button',
62       html : _this._strings['d3d2e617335f08df83599665eef8a418'] /* Close */,
63       weight : 'primary',
64       listeners : {
65        click : function (_self, e)
66         {
67             _this.dialog.hide();
68          
69             
70         },
71        render : function (_self)
72         {
73             _this.acceptBtn = this;
74             
75         }
76       },
77       xns : Roo.bootstrap,
78       '|xns' : 'Roo.bootstrap'
79      }
80     ],
81     items  : [
82      {
83       xtype : 'Container',
84       style : 'width: 100%;overflow:auto;height:100%;',
85       listeners : {
86        render : function (_self)
87         {
88         _this.body_ctr = this;
89         }
90       },
91       xns : Roo.bootstrap,
92       '|xns' : 'Roo.bootstrap'
93      }
94     ]
95    }  );
96  }
97 });
98 Roo.apply(Roo.docs.ViewSource, Roo.docs.ViewSource.prototype);