1
0
Fork 0
forked from 0x2620/oxjs

in doc panel, parse examples and references

This commit is contained in:
rolux 2012-06-12 14:32:27 +02:00
commit cc67b1110b
2 changed files with 98 additions and 33 deletions

View file

@ -31,35 +31,39 @@ Ox.DocPage = function(options, self) {
.css({float: 'left', height: '13px', paddingTop: '1px', margin: '4px'})
.appendTo(self.$toolbar)
self.$examplesMenu = Ox.MenuButton({
items: [
{id: 'foo', title: 'Not yet...', disabled: true}
],
title: 'Examples...',
width: 128
})
.css({float: 'right', margin: '4px 4px 4px 2px'})
.bindEvent({
click: function(data) {
that.triggerEvent('select', {id: data.id});
}
})
.appendTo(self.$toolbar);
if (self.options.item.references) {
self.$referencesMenu = Ox.MenuButton({
items: self.options.item.references.map(function(reference) {
return {id: reference, title: reference};
}),
title: 'References...',
width: 128
})
.css({float: 'right', margin: '4px 2px 4px 2px'})
.bindEvent({
click: function(data) {
that.triggerEvent('select', {id: data.id});
}
})
.appendTo(self.$toolbar);
}
self.$referencesMenu = Ox.MenuButton({
items: [
{id: 'foo', title: 'Not yet...', disabled: true}
],
title: 'References...',
width: 128
})
.css({float: 'right', margin: '4px 2px 4px 2px'})
.bindEvent({
click: function(data) {
that.triggerEvent('select', {id: data.id});
}
})
.appendTo(self.$toolbar);
if (self.options.item.examples) {
self.$examplesMenu = Ox.MenuButton({
items: self.options.item.examples.map(function(example) {
return {id: example, title: example};
}),
title: 'Examples...',
width: 128
})
.css({float: 'right', margin: '4px 4px 4px 2px'})
.bindEvent({
click: function(data) {
that.triggerEvent('select', {id: data.id});
}
})
.appendTo(self.$toolbar);
}
self.$page = Ox.Container()
.addClass('OxDocPage OxDocument');