"items" : [
{
"listeners" : {
- "render" : "function (_self)\n{\n // this.el.addClass(language);\n \n}"
+ "render" : "function (_self)\n{\n _this.sidebar = this;\n // this.el.addClass(language);\n \n}"
},
"String cls" : "left-menu-sidebar",
"xtype" : "NavSidebar",
"$ xns" : "Roo.bootstrap",
- "String style" : "padding-top:80px;",
"items" : [
{
"listeners" : {
"items" : [
{
"listeners" : {
- "click" : "function (e)\n{\n document.location.reload();\n}"
+ "click" : "function (e)\n{\n document.location.hash = '#';\n}"
},
"string href" : "#",
"String cls" : "logo",
"render" : "function (_self)\n{\n return;\n \n _this.navHeaderBar = this;\n \n this.el.addClass(language); \n \n var body = Roo.select('body', true).first();\n \n var mark = {\n tag: \"div\",\n cls:\"x-dlg-mask\"\n };\n \n this.mask = Roo.DomHelper.append(body, mark, true);\n \n var size = body.getSize();\n this.mask.setSize(size.width, size.height);\n \n this.mask.setStyle('z-index', '1029');\n \n this.mask.enableDisplayMode(\"block\");\n this.mask.hide();\n \n this.mask.on('click', function(){\n \n this.el.select('.navbar-collapse',true).removeClass('in'); \n this.mask.hide();\n \n }, this);\n \n \n var maxHeight = Roo.lib.Dom.getViewHeight() - this.el.select('.navbar-header', true).first().getHeight();\n \n this.el.select('.navbar-collapse', true).first().setStyle('max-height', maxHeight);\n \n}"
},
"$ String brand_href" : "baseURL + '/'",
- "String position" : "fixed-top",
"String cls" : "mobile-header-menu",
+ "String position" : "fixed-top",
"bool autohide" : true,
"xtype" : "NavHeaderbar",
"Boolean inverse" : false,
"items" : [
{
"xtype" : "Header",
- "Number level" : 1,
"$ xns" : "Roo.bootstrap",
+ "Number level" : 1,
"String html" : "Roo JS Documentation"
},
{
"items" : [
{
"xtype" : "Header",
- "Number level" : 4,
"$ xns" : "Roo.bootstrap",
+ "Number level" : 4,
"String html" : " Class ",
"items" : [
{
{
"listeners" : {
"render" : "function (_self)\n{\n _this.doc_extends = this;\n}",
- "click" : "function (e)\n{\n\n if (this.el.dom.innerHTML.length) {\n Roo.docs.init.loadDoc({ name : this.el.dom.innerHTML, is_class : true});\n }\n}"
+ "click" : "function (e)\n{\n\n if (this.el.dom.innerHTML.length) {\n document.location.hash = '#' + this.el.dom.innerHTML;\n \n } \n}"
},
"String cls" : "doc-extends",
- "Boolean preventDefault" : false,
+ "Boolean preventDefault" : true,
"xtype" : "Link",
"$ xns" : "Roo.bootstrap",
"String html" : "parentcls"
},
{
"xtype" : "Header",
- "$ xns" : "Roo.bootstrap",
"Number level" : 5,
+ "$ xns" : "Roo.bootstrap",
"String html" : "Defined in: ",
"items" : [
{
"click" : "function (e)\n{\n \n Roo.log([\"click\", this]);\n if (this.el.dom.innerHTML.length > 0) {\n Roo.docs.init.loadSource();\n }\n}"
},
"String cls" : "doc-source",
- "Boolean preventDefault" : true,
"String href" : "#",
+ "Boolean preventDefault" : true,
"xtype" : "Link",
"$ xns" : "Roo.bootstrap",
"String html" : "Defined in: "
"String header" : "Inheritance tree",
"String cls" : "doc-augments",
"xtype" : "Container",
- "String panel" : "success",
+ "String panel" : "primary",
"$ xns" : "Roo.bootstrap"
}
]
"render" : "function (_self)\n{\n _this.configTableContainer = this;\n}"
},
"String header" : "Configuration options",
- "Boolean expanded" : true,
"String cls" : "doc-table-container",
+ "Boolean expanded" : true,
"xtype" : "Container",
- "String panel" : "info",
+ "String panel" : "primary",
"$ xns" : "Roo.bootstrap",
"String style" : "margin-top:15px",
"Boolean expandable" : true,
"items" : [
{
"String header" : "",
- "Number md" : 11,
"String dataIndex" : "name",
+ "Number md" : 11,
"$ Function renderer" : "function(v,x,r) { \n\n return Roo.docs.template.config(r.json);\n\n\t\t\t\n}",
"xtype" : "ColumnModel",
"$ xns" : "Roo.grid",
},
{
"String header" : "<small>Defined by</small>",
- "Number md" : 1,
"String dataIndex" : "memberOf",
+ "Number md" : 1,
"$ Function renderer" : "function(v,x,r) { \n if (r.json.memberOf == Roo.docs.init.currentClass) {\n return '';\n }\n\n\t\treturn \t'<small><a href=\"#' + r.json.memberOf + '\">' + r.json.memberOf + '</a></small>';\n\t\t\t\n}",
"xtype" : "ColumnModel",
"$ xns" : "Roo.grid",
},
{
"xtype" : "ArrayReader",
- "$ xns" : "Roo.data",
"$ fields" : "[ 'name', 'type', 'desc', 'memberOf' ]",
+ "$ xns" : "Roo.data",
"* prop" : "reader"
}
]
"render" : "function (_self)\n{\n _this.methodsTableContainer = this;\n}"
},
"String header" : "Constructor, Static and Public Methods",
- "Boolean expanded" : false,
"String cls" : "doc-table-container",
- "String panel" : "info",
+ "Boolean expanded" : true,
+ "String panel" : "primary",
"xtype" : "Container",
"$ xns" : "Roo.bootstrap",
"Boolean expandable" : true,
"items" : [
{
"String header" : " ",
- "String dataIndex" : "name",
"Number md" : 11,
+ "String dataIndex" : "name",
"$ Function renderer" : "function(v,x,r) { \n\n return Roo.docs.template.method(r.json);\n\t\t \n\t\t\t\n}",
"xtype" : "ColumnModel",
"$ xns" : "Roo.grid",
},
{
"String header" : "<small>Defined by</small>",
- "String dataIndex" : "memberOf",
"Number md" : 1,
+ "String dataIndex" : "memberOf",
"$ Function renderer" : "function(v,x,r) { \n\n if (r.json.memberOf == Roo.docs.init.currentClass) {\n return '';\n }\n\t\treturn \t'<small><a href=\"#' + r.json.memberOf + '\">' + r.json.memberOf + '</a></small>';\n\t\t\t\n}",
"xtype" : "ColumnModel",
"$ xns" : "Roo.grid",
},
{
"xtype" : "ArrayReader",
- "$ xns" : "Roo.data",
"$ fields" : "[ 'name', 'type', 'desc', 'memberOf' ]",
+ "$ xns" : "Roo.data",
"* prop" : "reader"
}
]
"render" : "function (_self)\n{\n _this.eventsTableContainer = this;\n}"
},
"String header" : "Events",
- "Boolean expanded" : false,
"String cls" : "doc-table-container",
+ "Boolean expanded" : true,
"xtype" : "Container",
- "String panel" : "info",
+ "String panel" : "primary",
"$ xns" : "Roo.bootstrap",
"Boolean expandable" : true,
"items" : [
"items" : [
{
"String header" : "",
- "Number md" : 11,
"String dataIndex" : "name",
+ "Number md" : 11,
"$ Function renderer" : "function(v,x,r) { \n\n return Roo.docs.template.event(r.json);\n\t\t \n\t\t\t\n}",
"xtype" : "ColumnModel",
"$ xns" : "Roo.grid",
},
{
"String header" : "<small>Defined by</small>",
- "Number md" : 1,
"String dataIndex" : "memberOf",
+ "Number md" : 1,
"$ Function renderer" : "function(v,x,r) { \n if (r.json.memberOf == Roo.docs.init.currentClass) {\n return '';\n }\n\n\t\treturn \t'<small><a href=\"#' + r.json.memberOf + '\">' + r.json.memberOf + '</a></small>';\n\t\t\t\n}",
"xtype" : "ColumnModel",
"$ xns" : "Roo.grid",
"items" : [
{
"xtype" : "ArrayReader",
- "$ fields" : "[ 'name', 'type', 'desc', 'memberOf' ]",
"$ xns" : "Roo.data",
+ "$ fields" : "[ 'name', 'type', 'desc', 'memberOf' ]",
"* prop" : "reader"
},
{
classes : false, // flat version of list of classes
currentClass : '', // currently viewed class name
+ hash : '',
onReady : function()
{
Roo.XComponent.on('buildcomplete', function() {
//Roo.XComponent.modules[0].el.fireEvent('render');
- this.loadTree();
+ this.loadTree();
}, this);
- Roo.get(document.body).on('click', this.onClick, this);
+
+
+ window.onhashchange = function() { Roo.docs.init.onHashChange(); }
+
+
+
+
+ //Roo.get(document.body).on('click', this.onClick, this);
},
{
var d = Roo.decode(res.responseText);
Roo.log(d);
- this.classes = [];
+ this.classes = {};
// our classes witch children first..
d.forEach(function(e) {
if (e.cn.length) {
}, this);
var roo = Roo.docs.navGroup.items[1].menu;
roo.show(roo.triggerEl, '?', false);
+ if (location.hash.length) {
+ this.loadHash();
+ return;
+ }
+
this.loadIntro();
},
- addTreeItem : function(parent, e, type) {
+
+ hideChildren : function(c)
+ {
+ if (c.node.menu) {
+ c.node.menu.hide();
+ }
+ for (var i =0; i < c.cn.length; i++) {
+ this.hideChildren(c.cn[i]);
+ }
+
+ },
+
+
+ addTreeItem : function(parent, e, type , parent_e) {
this.classes[e.name] = e;
// add a node..
var node = parent.addxtypeChild(Roo.factory({
html: e.name.split('.').pop(),
- id : e.name,
+ // id : e.name,
xns : Roo.bootstrap,
showArrow: false,
xtype : type,
if (c.cn.length) {
Roo.log(ev);
if (mi.menu.el.hasClass('show')) {
- mi.menu.hide();
+ this.hideChildren(c); //mi.menu.hide();
+ // collapse children..
+
+
+
} else {
mi.menu.show(mi.menu.triggerEl,'?', false);
}
}
-
- Roo.docs.init.loadDoc(c);
+ location.hash = '#' + c.name;
+ //Roo.docs.init.loadDoc(c);
}).createDelegate(this,[e], true)
})
}));
+ e.node = node;
+ e.parent_menu = parent;
+ e.parent = parent_e;
parent.items.push(node);
if (e.cn.length && type == 'NavSidebarItem') {
this.topm = node.menu;
var cn = ec.name.split('.').pop();
Roo.log(cn);
if (cn == cn.toLowerCase()) {
- this.addTreeItem(node.menu, ec,'MenuItem');
+ this.addTreeItem(node.menu, ec,'MenuItem', e);
}
}, this);
e.cn.forEach(function(ec) {
var cn = ec.name.split('.').pop();
if (cn != cn.toLowerCase()) {
- this.addTreeItem(node.menu, ec,'MenuItem');
+ this.addTreeItem(node.menu, ec,'MenuItem', e);
}
}, this);
loadClass : function(name)
{
- if(typeof(this.classes[name]) != 'undefined') {
+ if(typeof(this.classes[name]) != 'undefined' && this.classes[name].is_class ) {
this.loadDoc(this.classes[name]);
}
{
Roo.docs.doc_body_content.hide();
this.currentClass = cls.name;
- if (!cls.is_class) {
+ if (!cls ) {
Roo.docs.introBody.show();
return;
}
+
+ // expand parents..
+
+ var m = cls.parent_menu;
+ m.show(m.triggerEl,'?', false);
+ var mp = cls;
+ while ((mp = mp.parent)) {
+ m = mp.parent_menu;
+ m.show(m.triggerEl,'?', false);
+ }
+ cls.node.el.scrollIntoView(Roo.docs.sidebar.el,false);
+ Roo.docs.sidebar.el.select('.active').removeClass('active');
+ cls.node.el.addClass('active');
+
Roo.docs.introBody.hide();
Roo.docs.doc_body_content.show();
Roo.Ajax.request({
this.loadClass(link);
},
+
+ onHashChange : function()
+ {
+ if (this.hash == location.hash) {
+ return;
+ }
+ this.loadHash();
+
+ },
+ loadHash : function()
+ {
+ if (location.hash.length < 2) {
+ this.loadClass('');
+ }
+ this.loadClass(location.hash.substring(1));
+ this.hash = location.hash;
+ },
+
loadIntro : function()
{
// render the really simple markdown data
renderIntro : function(intro)
{
+
+ Roo.docs.doc_body_content.hide();
+
+
var lines = intro.split("\n");
var tree = { 'name' : 'root', cn : []};
var state = [ tree ];
xtype : 'Link',
href : '#' + ( ll ? ll[1] : treeiii.name ) ,
html : ll ? ll[1] : treeiii.name,
+ target : "_new",
xns : Roo.bootstrap
},
{
{
xtype : 'NavSidebar',
cls : 'left-menu-sidebar',
- style : 'padding-top:80px;',
listeners : {
render : function (_self)
{
+ _this.sidebar = this;
// this.el.addClass(language);
}
listeners : {
click : function (e)
{
- document.location.reload();
+ document.location.hash = '#';
}
},
xns : Roo.bootstrap,
xtype : 'Link',
cls : 'doc-extends',
html : _this._strings['494a64a432ff6a121e4ab9003c7a0df3'] /* parentcls */,
- preventDefault : false,
+ preventDefault : true,
listeners : {
click : function (e)
{
if (this.el.dom.innerHTML.length) {
- Roo.docs.init.loadDoc({ name : this.el.dom.innerHTML, is_class : true});
- }
+ document.location.hash = '#' + this.el.dom.innerHTML;
+
+ }
},
render : function (_self)
{
xtype : 'Container',
cls : 'doc-augments',
header : _this._strings['3e6ec55e2dff4342e3f25b0b0b988de9'] /* Inheritance tree */,
- panel : 'success',
+ panel : 'primary',
listeners : {
render : function (_self)
{
expandable : true,
expanded : true,
header : _this._strings['50f33d14f129e4548c1c270fd6725a78'] /* Configuration options */,
- panel : 'info',
+ panel : 'primary',
style : 'margin-top:15px',
listeners : {
render : function (_self)
xtype : 'Container',
cls : 'doc-table-container',
expandable : true,
- expanded : false,
+ expanded : true,
header : _this._strings['a1d108496af420635536a4e29e87d42b'] /* Constructor, Static and Public Methods */,
- panel : 'info',
+ panel : 'primary',
listeners : {
render : function (_self)
{
xtype : 'Container',
cls : 'doc-table-container',
expandable : true,
- expanded : false,
+ expanded : true,
header : _this._strings['87f9f735a1d36793ceaecd4e47124b63'] /* Events */,
- panel : 'info',
+ panel : 'primary',
listeners : {
render : function (_self)
{