forked from 0x2620/oxjs
allow for replacement function in DocPanel and DocPage
This commit is contained in:
parent
3134b55456
commit
e9f6751748
3 changed files with 38 additions and 28 deletions
|
|
@ -11,6 +11,7 @@ Ox.DocPanel <f> Documentation Panel
|
|||
getModule <f> returns module for given item
|
||||
getSection <f> returns section for given item
|
||||
path <s|''> path prefix
|
||||
replace <[[]]|[]> See Ox.SyntaxHighlighter
|
||||
resizable <b|true> is resizable
|
||||
resize <a|[128, 256, 384]> resize positions
|
||||
size <s|256> default size
|
||||
|
|
@ -34,6 +35,7 @@ Ox.DocPanel = function(options, self) {
|
|||
return item.section;
|
||||
},
|
||||
path: '',
|
||||
replace: [],
|
||||
resizable: true,
|
||||
resize: [128, 256, 384],
|
||||
size: 256
|
||||
|
|
@ -160,7 +162,8 @@ Ox.DocPanel = function(options, self) {
|
|||
selected = data.ids[0];
|
||||
if (selected[0] != '_') {
|
||||
self.$page = Ox.DocPage({
|
||||
item: getItemByName(selected)
|
||||
item: getItemByName(selected),
|
||||
replace: self.options.replace
|
||||
});
|
||||
that.$element.replaceElement(1, self.$page);
|
||||
that.triggerEvent('select', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue