dont show Run tests is showTests is false, fix documentation example
This commit is contained in:
parent
9d391e4c13
commit
099fbc7880
3 changed files with 32 additions and 29 deletions
|
@ -28,8 +28,8 @@ My.MAGIC_CONSTANT <number> Magic constant, needed for HTTP requests
|
|||
*/
|
||||
My.MAGIC_CONSTANT = navigator.userAgent.length % 2 == 0 ? 23 : 42;
|
||||
|
||||
Ox.load(function() {
|
||||
//@ Objects
|
||||
|
||||
/*
|
||||
*/
|
||||
/*@
|
||||
|
@ -77,35 +77,37 @@ My.favorites = (function() {
|
|||
keys = Object.keys(favorites);
|
||||
return Ox.extend(favorites, {any: favorites[keys[Ox.random(keys.length)]]});
|
||||
}());
|
||||
|
||||
/*@
|
||||
replace <array> ...
|
||||
0 <regexp> ...
|
||||
1 <string> replace
|
||||
*/
|
||||
My.HTMLUtils = {
|
||||
entities: {
|
||||
My.HTMLUtils = (function() {
|
||||
var entities = {
|
||||
'"': '"', '&': '&', "'": ''', '<': '<', '>': '>'
|
||||
},
|
||||
replace: {
|
||||
namedEntity: [
|
||||
new RegExp('(' + Ox.values(this.entities).join('|') + ')', 'g'),
|
||||
function(match) {
|
||||
return Ox.keyOf(this.entities, match);
|
||||
}
|
||||
],
|
||||
numericEntity: [
|
||||
/&#([0-9A-FX]+);/gi,
|
||||
function(match, code) {
|
||||
return Ox.char(
|
||||
/^X/i.test(code)
|
||||
? parseInt(code.slice(1), 16)
|
||||
: parseInt(code, 10)
|
||||
);
|
||||
}
|
||||
],
|
||||
}
|
||||
};
|
||||
};
|
||||
return {
|
||||
entities: entities,
|
||||
replace: {
|
||||
namedEntity: [
|
||||
new RegExp('(' + Ox.values(entities).join('|') + ')', 'g'),
|
||||
function(match) {
|
||||
return Ox.keyOf(entities, match);
|
||||
}
|
||||
],
|
||||
numericEntity: [
|
||||
/&#([0-9A-FX]+);/gi,
|
||||
function(match, code) {
|
||||
return Ox.char(
|
||||
/^X/i.test(code)
|
||||
? parseInt(code.slice(1), 16)
|
||||
: parseInt(code, 10)
|
||||
);
|
||||
}
|
||||
],
|
||||
}
|
||||
};
|
||||
}());
|
||||
|
||||
/*@
|
||||
My.defaultPlace <o> Default place object
|
||||
|
@ -274,6 +276,7 @@ My.localStorage = (function() {
|
|||
};
|
||||
}());
|
||||
|
||||
});
|
||||
//@
|
||||
Ox.load('UI', function() {
|
||||
var path = Ox.PATH + '../examples/documentation/js/';
|
||||
|
|
|
@ -5,7 +5,6 @@ This example demonstrates various form elements.
|
|||
'use strict';
|
||||
|
||||
Ox.load({Geo: {}, UI: {}, Unicode: {}}, function() {
|
||||
|
||||
var countries = Ox.sortASCII(Ox.COUNTRIES.filter(function(country) {
|
||||
return !country.dissolved && !country.disputed && !country.exception;
|
||||
}).map(function(country) {
|
||||
|
@ -692,6 +691,5 @@ Ox.load({Geo: {}, UI: {}, Unicode: {}}, function() {
|
|||
],
|
||||
orientation: 'horizontal'
|
||||
})
|
||||
.appendTo(Ox.$body)
|
||||
|
||||
});
|
||||
.appendTo(Ox.$body);
|
||||
});
|
||||
|
|
|
@ -74,7 +74,9 @@ Ox.DocPanel = function(options, self) {
|
|||
self.$testsStatus = $('<div>')
|
||||
.css({marginTop: '5px', textAlign: 'center'})
|
||||
.appendTo(self.$toolbar);
|
||||
if (!self.options.results) {
|
||||
if (!self.options.showTests) {
|
||||
self.$testsStatus.hide();
|
||||
} else if (!self.options.results) {
|
||||
self.options.results = {};
|
||||
self.$testsButton = Ox.Button({title: 'Run Tests'})
|
||||
.css({margin: '4px auto'})
|
||||
|
|
Loading…
Reference in a new issue