cleanup
This commit is contained in:
parent
cc67b1110b
commit
8e144aed87
2 changed files with 13 additions and 10 deletions
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The following examples explain the common design pattern for Ox.js UI widgets:
|
The following examples explain the common design pattern for OxJS UI widgets: an
|
||||||
an inheritance model that is neither classical nor prototypal, but "parasitical"
|
inheritance model that is neither classical nor prototypal, but "parasitical" (a
|
||||||
(a term coined by <a
|
term coined by <a
|
||||||
href="http://www.crockford.com/javascript/inheritance.html">Douglas
|
href="http://www.crockford.com/javascript/inheritance.html">Douglas
|
||||||
Crockford</a>). In a nutshell, "instances" are created by augmenting other
|
Crockford</a>). In a nutshell, "instances" are created by augmenting other
|
||||||
instances, but in addition to private members (`var foo`) and public members
|
instances, but in addition to private members (`var foo`) and public members
|
||||||
|
|
17
index.js
17
index.js
|
@ -273,7 +273,7 @@ Ox.load(function() {
|
||||||
+ '(<span class="OxOperator">\\.</span>'
|
+ '(<span class="OxOperator">\\.</span>'
|
||||||
+ '<span class="OxIdentifier">UI</span>)?'
|
+ '<span class="OxIdentifier">UI</span>)?'
|
||||||
+ '<span class="OxOperator">\\.</span>'
|
+ '<span class="OxOperator">\\.</span>'
|
||||||
+ '<span class="Ox\\w+">([\\$\\w]+)<\\/span>',
|
+ '<span class="Ox\\w+">([\\w\\$]+)<\\/span>',
|
||||||
'g'
|
'g'
|
||||||
),
|
),
|
||||||
function (str) {
|
function (str) {
|
||||||
|
@ -282,7 +282,7 @@ Ox.load(function() {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
comment: [
|
comment: [
|
||||||
/\b(Ox\.[\w\$_]+)/g,
|
/\b(Ox\.[\w\$]+)/g,
|
||||||
'<a href="#doc/$1" class="OxMonospace doclink">$1</a>'
|
'<a href="#doc/$1" class="OxMonospace doclink">$1</a>'
|
||||||
],
|
],
|
||||||
version: [
|
version: [
|
||||||
|
@ -361,12 +361,14 @@ Ox.load(function() {
|
||||||
doc: function() {
|
doc: function() {
|
||||||
return Ox.DocPanel({
|
return Ox.DocPanel({
|
||||||
element: $('<div>')
|
element: $('<div>')
|
||||||
.addClass('Ox___Serif page')
|
.addClass('page')
|
||||||
.css({
|
.css({
|
||||||
margin: '32px',
|
margin: '32px',
|
||||||
width: window.innerWidth - 640 + 'px'
|
width: window.innerWidth - 640 + 'px'
|
||||||
})
|
})
|
||||||
.html(app.html.documentation),
|
.html(app.html.documentation),
|
||||||
|
examples: app.data.examples,
|
||||||
|
examplesPath: 'examples/',
|
||||||
files: app.data.docItems ? void 0 : app.data.documentation,
|
files: app.data.docItems ? void 0 : app.data.documentation,
|
||||||
getModule: function(item) {
|
getModule: function(item) {
|
||||||
var file = item.file.replace(/^dev\//, '');
|
var file = item.file.replace(/^dev\//, '');
|
||||||
|
@ -378,6 +380,7 @@ Ox.load(function() {
|
||||||
},
|
},
|
||||||
items: app.data.docItems || void 0,
|
items: app.data.docItems || void 0,
|
||||||
path: 'dev/',
|
path: 'dev/',
|
||||||
|
references: /\b(Ox\.[\w\$]+)\b/g,
|
||||||
replace: [app.re.code],
|
replace: [app.re.code],
|
||||||
runTests: true,
|
runTests: true,
|
||||||
selected: app.user.item.doc,
|
selected: app.user.item.doc,
|
||||||
|
@ -399,15 +402,15 @@ Ox.load(function() {
|
||||||
examples: function() {
|
examples: function() {
|
||||||
return Ox.ExamplePanel({
|
return Ox.ExamplePanel({
|
||||||
element: $('<div>')
|
element: $('<div>')
|
||||||
.addClass('Ox___Serif page')
|
.addClass('page')
|
||||||
.css({
|
.css({
|
||||||
margin: '32px',
|
margin: '32px',
|
||||||
width: window.innerWidth - 640 + 'px'
|
width: window.innerWidth - 640 + 'px'
|
||||||
})
|
})
|
||||||
.html(app.html.examples),
|
.html(app.html.examples),
|
||||||
examples: app.data.examples,
|
examples: app.data.examples,
|
||||||
keywords: /\b(Ox\.[\w]+)\b/g,
|
|
||||||
path: 'examples/',
|
path: 'examples/',
|
||||||
|
references: /\b(Ox\.[\w\$]+)\b/g,
|
||||||
replaceCode: [app.re.code],
|
replaceCode: [app.re.code],
|
||||||
replaceComment: [app.re.comment],
|
replaceComment: [app.re.comment],
|
||||||
selected: app.user.item.examples
|
selected: app.user.item.examples
|
||||||
|
@ -468,7 +471,7 @@ Ox.load(function() {
|
||||||
page: function(page, replace) {
|
page: function(page, replace) {
|
||||||
var $element = Ox.Container();
|
var $element = Ox.Container();
|
||||||
$('<div>')
|
$('<div>')
|
||||||
.addClass('Ox____Serif OxSelectable page')
|
.addClass('OxSelectable page')
|
||||||
.html(app.html[page].replace(app.re.version[0], app.re.version[1]))
|
.html(app.html[page].replace(app.re.version[0], app.re.version[1]))
|
||||||
.appendTo($element);
|
.appendTo($element);
|
||||||
return $element;
|
return $element;
|
||||||
|
@ -544,7 +547,7 @@ Ox.load(function() {
|
||||||
.append(
|
.append(
|
||||||
id ? html
|
id ? html
|
||||||
: $('<div>')
|
: $('<div>')
|
||||||
.addClass('Ox___Serif page')
|
.addClass('page')
|
||||||
.css({
|
.css({
|
||||||
margin: '16px',
|
margin: '16px',
|
||||||
width: window.innerWidth - 640 + 'px'
|
width: window.innerWidth - 640 + 'px'
|
||||||
|
|
Loading…
Reference in a new issue