forked from 0x2620/oxjs
make doc page examples menu work
This commit is contained in:
parent
86f6123565
commit
d89a8e1087
4 changed files with 34 additions and 56 deletions
12
index.js
12
index.js
|
|
@ -367,8 +367,8 @@ Ox.load(function() {
|
|||
width: window.innerWidth - 640 + 'px'
|
||||
})
|
||||
.html(app.html.documentation),
|
||||
examples: app.data.examples,
|
||||
examplesPath: 'examples/',
|
||||
examples: app.data.docItems ? void 0 : app.data.examples,
|
||||
examplesPath: app.data.docItems ? void 0 : 'examples/',
|
||||
files: app.data.docItems ? void 0 : app.data.documentation,
|
||||
getModule: function(item) {
|
||||
var file = item.file.replace(/^dev\//, '');
|
||||
|
|
@ -386,6 +386,12 @@ Ox.load(function() {
|
|||
showTests: true
|
||||
})
|
||||
.bindEvent({
|
||||
example: function(data) {
|
||||
app.url.set({
|
||||
page: 'examples',
|
||||
item: {examples: data.id}
|
||||
});
|
||||
},
|
||||
select: function(data) {
|
||||
app.user.item.doc = data.id;
|
||||
app.db(app.user);
|
||||
|
|
@ -634,7 +640,7 @@ Ox.load(function() {
|
|||
app.$ui.panel.select(app.user.page);
|
||||
}
|
||||
if (url.item) {
|
||||
app.$ui[url.page].options({selected: url.item});
|
||||
app.$ui[url.page] && app.$ui[url.page].options({selected: url.item});
|
||||
}
|
||||
if (!app.user.page || !app.user.previousPage) {
|
||||
app.animate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue