Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / Roo.docs.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');
6
7 Roo.docs = new Roo.XComponent({
8
9  _strings : {
10   '3e6ec55e2dff4342e3f25b0b0b988de9' :"Inheritance tree",
11   'ae635f08107a69569e636835f24e6f6f' :" extends ",
12   '87f9f735a1d36793ceaecd4e47124b63' :"Events",
13   'd41d8cd98f00b204e9800998ecf8427e' :"",
14   '232cedface5acac121a6e099364a2b07' :"source: ",
15   '9c5a24f0cbb12d939e4622b93bea904b' :"Public Methods",
16   '36cd38f49b9afa08222c0dc9ebfe35eb' :"source",
17   '50f33d14f129e4548c1c270fd6725a78' :"Configuration options",
18   'e64b94523532dbac62df6795a5153f04' :"doc-desc",
19   'd2b697ad8e989a6c4592987f22f5bbfc' :"doc-comments",
20   'f361257612a512f9be2fdc2abfb25aef' :"<small>Defined by</small>",
21   '494a64a432ff6a121e4ab9003c7a0df3' :"parentcls",
22   '9bd81329febf6efe22788e03ddeaf0af' :" Class ",
23   'f561aaf6ef0bf14d4208bb46a4ccb3ad' :"xxx",
24   'd41d8cd98f00b204e9800998ecf8427e' :" "
25  },
26
27   part     :  ["docs2", "docs" ],
28   order    : '001-Roo.docs',
29   region   : 'center',
30   parent   : false,
31   name     : "unnamed module",
32   disabled : false, 
33   permname : '', 
34   _tree : function(_data)
35   {
36    var _this = this;
37    var MODULE = this;
38    return {
39    xtype : 'Body',
40    cls : 'doc-body',
41    listeners : {
42     render : function (_self)
43      {
44            
45         
46          
47      }
48    },
49    xns : Roo.bootstrap,
50    '|xns' : 'Roo.bootstrap',
51    items  : [
52     {
53      xtype : 'NavSidebar',
54      cls : 'left-menu-sidebar',
55      style : 'padding-top:80px;',
56      listeners : {
57       render : function (_self)
58        {
59          //  this.el.addClass(language);
60            
61        }
62      },
63      xns : Roo.bootstrap,
64      '|xns' : 'Roo.bootstrap',
65      items  : [
66       {
67        xtype : 'NavGroup',
68        activeLookup : function() 
69        { 
70            return;
71            
72            var pathname = window.location.pathname.substring(baseURL.length);
73            
74            if(!pathname.length){
75                return;
76            }
77            
78            if(pathname.match(/^\/Projects/)){
79                pathname = '/Projects';
80            }
81            
82            var lookupPath = function(item)
83            {
84                if(typeof(item.href) == 'undefined' || !item.href.length || item.href == '#'){
85                    return true;
86                }
87                
88                item.el.removeClass('active');
89                
90                var href = item.href.substring(baseURL.length);
91                
92                if(href != pathname){
93                    return true;
94                }
95                
96                item.el.addClass('active');
97                return false;
98                    
99            };
100            
101            var seted = false;
102            
103            Roo.each(_this.navGroup.items, function(i){
104                
105                var s = lookupPath(i);
106                
107                if(!s){
108                    return false;
109                }
110                
111                if(typeof(i.menu) == 'undefined' || !i.menu.items.length){
112                    return;
113                }
114                
115                Roo.each(i.menu.items, function(ii){
116                    
117                    var ss = lookupPath(ii);
118                    
119                    if(!ss){
120                        seted = true;
121                        return false;
122                    }
123                    
124                });
125                
126                if(seted){
127                    return false;
128                }
129                
130            });
131        },
132        autoExpand : function() 
133        { 
134            return;
135            
136            _this.menu_expand = false;
137            
138            var lookupMenu = function(menu, index){
139                
140                if(menu.target == pagedata.page.target){
141                    _this.menu_expand = index + 1;
142                    return;
143                }
144                
145                if(!menu.children.length){
146                    return;
147                }
148                
149                Roo.each(menu.children, function(c){
150                    lookupMenu(c, index);
151                });
152                
153            }
154            
155            Roo.each(pagemenus, function(v, k){
156                
157                lookupMenu(v, k);
158                
159            });
160            
161            if(_this.menu_expand === false){
162                return;
163            }
164            
165            if(typeof(_this.navGroup.items[_this.menu_expand].menu) == 'undefined'){
166                return;
167            }
168            
169            _this.navGroup.items[_this.menu_expand].menu.show(_this.navGroup.items[_this.menu_expand].el, false, false);
170            
171        },
172        listeners : {
173         childrenrendered : function (_self)
174          {
175              _this.navGroup.autoExpand();
176              
177              _this.navGroup.activeLookup();
178          },
179         render : function (_self)
180          {
181              _this.navGroup = this;
182              
183          }
184        },
185        xns : Roo.bootstrap,
186        '|xns' : 'Roo.bootstrap',
187        items  : [
188         {
189          xtype : 'NavItem',
190          active : false,
191          cls : '',
192          style : 'position:fixed;top:0;z-Index:1000;',
193          xns : Roo.bootstrap,
194          '|xns' : 'Roo.bootstrap',
195          items  : [
196           {
197            xtype : 'Link',
198            cls : 'logo',
199            href : baseURL +'/',
200            preventDefault : false,
201            xns : Roo.bootstrap,
202            '|xns' : 'Roo.bootstrap'
203           }
204          ]
205         }
206        ]
207       },
208       {
209        xtype : 'Container',
210        cls : 'left-menu-sidebar-options',
211        xns : Roo.bootstrap,
212        '|xns' : 'Roo.bootstrap',
213        items  : [
214         {
215          xtype : 'Row',
216          xns : Roo.bootstrap,
217          '|xns' : 'Roo.bootstrap'
218         }
219        ]
220       }
221      ]
222     },
223     {
224      xtype : 'NavHeaderbar',
225      autohide : true,
226      brand : ' ',
227      brand_href : baseURL + '/',
228      cls : 'mobile-header-menu',
229      inverse : false,
230      position : 'fixed-top',
231      style : '',
232      listeners : {
233       beforetoggle : function (_self)
234        {
235            _this.navGroup.autoExpand(); 
236            
237            _this.navGroup.activeLookup();
238            
239            _this.navHeaderBar.mask.show();
240            
241            if(this.el.select('.navbar-collapse',true).first().hasClass('in')){
242                _this.navHeaderBar.mask.hide();
243                return;
244            }
245        },
246       render : function (_self)
247        {
248            return;
249            
250            _this.navHeaderBar = this;
251            
252            this.el.addClass(language); 
253            
254            var body = Roo.select('body', true).first();
255            
256            var mark = {
257                tag: "div",
258                cls:"x-dlg-mask"
259            };
260            
261            this.mask = Roo.DomHelper.append(body, mark, true);
262            
263            var size = body.getSize();
264            this.mask.setSize(size.width, size.height);
265            
266            this.mask.setStyle('z-index', '1029');
267            
268            this.mask.enableDisplayMode("block");
269            this.mask.hide();
270            
271            this.mask.on('click', function(){
272                
273                this.el.select('.navbar-collapse',true).removeClass('in'); 
274                this.mask.hide();
275                
276            }, this);
277            
278            
279            var maxHeight = Roo.lib.Dom.getViewHeight() - this.el.select('.navbar-header', true).first().getHeight();
280            
281            this.el.select('.navbar-collapse', true).first().setStyle('max-height', maxHeight);
282            
283        }
284      },
285      xns : Roo.bootstrap,
286      '|xns' : 'Roo.bootstrap'
287     },
288     {
289      xtype : 'Container',
290      cls : 'general-content-body',
291      listeners : {
292       render : function (_self)
293        {
294            _this.doc_body_content = this;
295        }
296      },
297      xns : Roo.bootstrap,
298      '|xns' : 'Roo.bootstrap',
299      items  : [
300       {
301        xtype : 'Row',
302        style : 'margin: 0px;',
303        xns : Roo.bootstrap,
304        '|xns' : 'Roo.bootstrap',
305        items  : [
306         {
307          xtype : 'Column',
308          md : 9,
309          style : 'padding-left: 0px;',
310          xns : Roo.bootstrap,
311          '|xns' : 'Roo.bootstrap',
312          items  : [
313           {
314            xtype : 'Container',
315            cls : 'doc-header-container',
316            xns : Roo.bootstrap,
317            '|xns' : 'Roo.bootstrap',
318            items  : [
319             {
320              xtype : 'Header',
321              html : _this._strings['9bd81329febf6efe22788e03ddeaf0af'] /*  Class  */,
322              level : 4,
323              xns : Roo.bootstrap,
324              '|xns' : 'Roo.bootstrap',
325              items  : [
326               {
327                xtype : 'Element',
328                cls : 'doc-classname',
329                html : _this._strings['f561aaf6ef0bf14d4208bb46a4ccb3ad'] /* xxx */,
330                style : 'font-size: 24px;\n    font-weight: bold;',
331                tag : 'span',
332                listeners : {
333                 render : function (_self)
334                  {
335                      _this.doc_name = this
336                  }
337                },
338                xns : Roo.bootstrap,
339                '|xns' : 'Roo.bootstrap'
340               },
341               {
342                xtype : 'Element',
343                cls : 'doc-extends-str',
344                html : _this._strings['ae635f08107a69569e636835f24e6f6f'] /*  extends  */,
345                tag : 'small',
346                listeners : {
347                 render : function (_self)
348                  {
349                      _this.doc_extends_sep = this;
350                  }
351                },
352                xns : Roo.bootstrap,
353                '|xns' : 'Roo.bootstrap',
354                items  : [
355                 {
356                  xtype : 'Link',
357                  cls : 'doc-extends',
358                  html : _this._strings['494a64a432ff6a121e4ab9003c7a0df3'] /* parentcls */,
359                  preventDefault : false,
360                  listeners : {
361                   click : function (e)
362                    {
363                    
364                        if (this.el.dom.innerHTML.length) {
365                            Roo.docs.init.loadDoc({ name : this.el.dom.innerHTML, is_class : true});
366                        }
367                    },
368                   render : function (_self)
369                    {
370                        _this.doc_extends = this;
371                    }
372                  },
373                  xns : Roo.bootstrap,
374                  '|xns' : 'Roo.bootstrap'
375                 }
376                ]
377               }
378              ]
379             },
380             {
381              xtype : 'Header',
382              html : _this._strings['232cedface5acac121a6e099364a2b07'] /* source:  */,
383              level : 5,
384              xns : Roo.bootstrap,
385              '|xns' : 'Roo.bootstrap',
386              items  : [
387               {
388                xtype : 'Link',
389                cls : 'doc-source',
390                href : '#',
391                html : _this._strings['36cd38f49b9afa08222c0dc9ebfe35eb'] /* source */,
392                preventDefault : true,
393                listeners : {
394                 click : function (e)
395                  {
396                      
397                      Roo.log(["click", this]);
398                      if (this.el.dom.innerHTML.length > 0) {
399                          Roo.docs.loadSource();
400                      }
401                  },
402                 render : function (_self)
403                  {
404                      _this.doc_source = this;
405                  }
406                },
407                xns : Roo.bootstrap,
408                '|xns' : 'Roo.bootstrap'
409               }
410              ]
411             }
412            ]
413           },
414           {
415            xtype : 'Container',
416            cls : 'doc-desc',
417            html : _this._strings['e64b94523532dbac62df6795a5153f04'] /* doc-desc */,
418            listeners : {
419             render : function (_self)
420              {
421                  _this.doc_desc = this;
422              }
423            },
424            xns : Roo.bootstrap,
425            '|xns' : 'Roo.bootstrap'
426           },
427           {
428            xtype : 'Container',
429            cls : 'doc-comments',
430            hidden : true,
431            html : _this._strings['d2b697ad8e989a6c4592987f22f5bbfc'] /* doc-comments */,
432            xns : Roo.bootstrap,
433            '|xns' : 'Roo.bootstrap'
434           }
435          ]
436         },
437         {
438          xtype : 'Column',
439          md : 3,
440          xns : Roo.bootstrap,
441          '|xns' : 'Roo.bootstrap',
442          items  : [
443           {
444            xtype : 'Container',
445            cls : 'doc-augments',
446            header : _this._strings['3e6ec55e2dff4342e3f25b0b0b988de9'] /* Inheritance tree */,
447            panel : 'success',
448            listeners : {
449             render : function (_self)
450              {
451                  _this.augments  = this;
452              }
453            },
454            xns : Roo.bootstrap,
455            '|xns' : 'Roo.bootstrap'
456           }
457          ]
458         }
459        ]
460       },
461       {
462        xtype : 'Container',
463        cls : 'doc-table-container',
464        expandable : true,
465        expanded : true,
466        header : _this._strings['50f33d14f129e4548c1c270fd6725a78'] /* Configuration options */,
467        panel : 'info',
468        style : 'margin-top:15px',
469        listeners : {
470         render : function (_self)
471          {
472              _this.configTableContainer = this;
473          }
474        },
475        xns : Roo.bootstrap,
476        '|xns' : 'Roo.bootstrap',
477        items  : [
478         {
479          xtype : 'Table',
480          rowSelection : true,
481          striped : true,
482          listeners : {
483           render : function (_self)
484            {
485                _this.configTable = this;
486            },
487           rowclass : function (_self, rowcfg)
488            {
489                    rowcfg.rowClass = rowcfg.record.json.expanded ? 'expanded' : '';
490            },
491           rowclick : function (_self, el, rowIndex, e)
492            {
493                if (e.target.className != 'fixedFont' && e.target.parentNode.className != 'fixedFont') {
494                    return false;
495                }
496                
497                var r = this.store.getAt(rowIndex);
498                r.json.expanded = !r.json.expanded ;
499                this.refreshRow(r);
500            }
501          },
502          xns : Roo.bootstrap,
503          '|xns' : 'Roo.bootstrap',
504          store : {
505           xtype : 'Store',
506           xns : Roo.data,
507           '|xns' : 'Roo.data',
508           proxy : {
509            xtype : 'MemoryProxy',
510            xns : Roo.data,
511            '|xns' : 'Roo.data'
512           },
513           reader : {
514            xtype : 'ArrayReader',
515            fields : [ 'name', 'type', 'desc', 'memberOf' ],
516            xns : Roo.data,
517            '|xns' : 'Roo.data'
518           }
519          },
520          cm : [
521           {
522            xtype : 'ColumnModel',
523            dataIndex : 'name',
524            header : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /*  */,
525            md : 11,
526            renderer : function(v,x,r) { 
527            
528                return Roo.docs.template.config(r.json);
529            
530                                 
531            },
532            xns : Roo.grid,
533            '|xns' : 'Roo.grid'
534           },
535           {
536            xtype : 'ColumnModel',
537            dataIndex : 'memberOf',
538            header : _this._strings['f361257612a512f9be2fdc2abfb25aef'] /* <small>Defined by</small> */,
539            md : 1,
540            renderer : function(v,x,r) { 
541             if (r.json.memberOf  == Roo.docs.init.currentClass) {
542                        return '';
543                    }
544            
545                         return  '<small><a href="#' + r.json.memberOf + '">' + r.json.memberOf + '</a></small>';
546                                 
547            },
548            xns : Roo.grid,
549            '|xns' : 'Roo.grid'
550           }
551          ]
552         }
553        ]
554       },
555       {
556        xtype : 'Container',
557        cls : 'doc-table-container',
558        expandable : true,
559        expanded : false,
560        header : _this._strings['9c5a24f0cbb12d939e4622b93bea904b'] /* Public Methods */,
561        panel : 'info',
562        listeners : {
563         render : function (_self)
564          {
565              _this.methodsTableContainer = this;
566          }
567        },
568        xns : Roo.bootstrap,
569        '|xns' : 'Roo.bootstrap',
570        items  : [
571         {
572          xtype : 'Table',
573          rowSelection : true,
574          listeners : {
575           render : function (_self)
576            {
577                _this.methodsTable = this;
578            },
579           rowclass : function (_self, rowcfg)
580            {
581                    rowcfg.rowClass = rowcfg.record.json.expanded ? 'expanded' : '';
582            },
583           rowclick : function (_self, el, rowIndex, e)
584            {
585                  if (e.target.className != 'fixedFont' && e.target.parentNode.className != 'fixedFont') {
586                    return false;
587                }
588                 var r = this.store.getAt(rowIndex);
589                r.json.expanded = !r.json.expanded ;
590                this.refreshRow(r);
591            }
592          },
593          xns : Roo.bootstrap,
594          '|xns' : 'Roo.bootstrap',
595          store : {
596           xtype : 'Store',
597           sortInfo : { field : 'name', direction : 'ASC' },
598           xns : Roo.data,
599           '|xns' : 'Roo.data',
600           proxy : {
601            xtype : 'MemoryProxy',
602            xns : Roo.data,
603            '|xns' : 'Roo.data'
604           },
605           reader : {
606            xtype : 'ArrayReader',
607            fields : [ 'name', 'type', 'desc', 'memberOf' ],
608            xns : Roo.data,
609            '|xns' : 'Roo.data'
610           }
611          },
612          cm : [
613           {
614            xtype : 'ColumnModel',
615            dataIndex : 'name',
616            header : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /*   */,
617            md : 11,
618            renderer : function(v,x,r) { 
619            
620                return Roo.docs.template.method(r.json);
621                          
622                                 
623            },
624            sortable : false,
625            xns : Roo.grid,
626            '|xns' : 'Roo.grid'
627           },
628           {
629            xtype : 'ColumnModel',
630            dataIndex : 'memberOf',
631            header : _this._strings['f361257612a512f9be2fdc2abfb25aef'] /* <small>Defined by</small> */,
632            md : 1,
633            renderer : function(v,x,r) { 
634            
635             if (r.json.memberOf  == Roo.docs.init.currentClass) {
636                        return '';
637                    }
638                         return  '<small><a href="#' + r.json.memberOf + '">' + r.json.memberOf + '</a></small>';
639                                 
640            },
641            xns : Roo.grid,
642            '|xns' : 'Roo.grid'
643           }
644          ]
645         }
646        ]
647       },
648       {
649        xtype : 'Container',
650        cls : 'doc-table-container',
651        expandable : true,
652        expanded : false,
653        header : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
654        panel : 'info',
655        listeners : {
656         render : function (_self)
657          {
658              _this.eventsTableContainer   = this;
659          }
660        },
661        xns : Roo.bootstrap,
662        '|xns' : 'Roo.bootstrap',
663        items  : [
664         {
665          xtype : 'Table',
666          rowSelection : true,
667          listeners : {
668           render : function (_self)
669            {
670                _this.eventsTable = this;
671            },
672           rowclass : function (_self, rowcfg)
673            {
674                    rowcfg.rowClass = rowcfg.record.json.expanded ? 'expanded' : '';
675            },
676           rowclick : function (_self, el, rowIndex, e)
677            {
678                    if (e.target.className != 'fixedFont' && e.target.parentNode.className != 'fixedFont') {
679                    return false;
680                }
681                var r = this.store.getAt(rowIndex);
682                r.json.expanded = !r.json.expanded ;
683                this.refreshRow(r);
684            }
685          },
686          xns : Roo.bootstrap,
687          '|xns' : 'Roo.bootstrap',
688          store : {
689           xtype : 'Store',
690           xns : Roo.data,
691           '|xns' : 'Roo.data',
692           proxy : {
693            xtype : 'MemoryProxy',
694            xns : Roo.data,
695            '|xns' : 'Roo.data'
696           },
697           reader : {
698            xtype : 'ArrayReader',
699            fields : [ 'name', 'type', 'desc', 'memberOf' ],
700            xns : Roo.data,
701            '|xns' : 'Roo.data'
702           }
703          },
704          cm : [
705           {
706            xtype : 'ColumnModel',
707            dataIndex : 'name',
708            header : _this._strings['d41d8cd98f00b204e9800998ecf8427e'] /*  */,
709            md : 11,
710            renderer : function(v,x,r) { 
711            
712                return Roo.docs.template.event(r.json);
713                          
714                                 
715            },
716            xns : Roo.grid,
717            '|xns' : 'Roo.grid'
718           },
719           {
720            xtype : 'ColumnModel',
721            dataIndex : 'memberOf',
722            header : _this._strings['f361257612a512f9be2fdc2abfb25aef'] /* <small>Defined by</small> */,
723            md : 1,
724            renderer : function(v,x,r) { 
725                    if (r.json.memberOf  == Roo.docs.init.currentClass) {
726                        return '';
727                    }
728            
729                         return  '<small><a href="#' + r.json.memberOf + '">' + r.json.memberOf + '</a></small>';
730                                 
731            },
732            xns : Roo.grid,
733            '|xns' : 'Roo.grid'
734           }
735          ]
736         }
737        ]
738       }
739      ]
740     }
741    ]
742   };  }
743 });