2011-05-07 15:56:29 +00:00
|
|
|
Ox.load('UI', {
|
|
|
|
theme: 'classic'
|
|
|
|
}, function() {
|
|
|
|
Ox.Theme('classic');
|
2011-10-06 00:30:09 +00:00
|
|
|
Ox.getJSON(Ox.PATH + 'Ox/json/Ox.json', function(oxFiles) {
|
|
|
|
Ox.getJSON(Ox.PATH + 'Ox.UI/json/Ox.UI.files.json', function(oxuiFiles) {
|
|
|
|
doc = Ox.DocPanel({
|
|
|
|
files: Ox.merge(
|
|
|
|
Ox.flatten(oxFiles),
|
|
|
|
oxuiFiles.filter(function(file) {
|
|
|
|
return Ox.endsWith(file, '.js');
|
|
|
|
}),
|
|
|
|
[
|
|
|
|
'Ox.Geo/Ox.Geo.js',
|
|
|
|
'Ox.Image/Ox.Image.js',
|
|
|
|
'Ox.Unicode/Ox.Unicode.js'
|
|
|
|
]
|
|
|
|
),
|
|
|
|
getModule: function(item) {
|
|
|
|
var file = item.file.replace(Ox.PATH, '');
|
|
|
|
return file.split('/')[0];
|
|
|
|
},
|
|
|
|
getSection: function(item) {
|
|
|
|
var file = item.file.replace(Ox.PATH, '');
|
2011-10-06 01:56:04 +00:00
|
|
|
return item.section || file.split('/')[2].split('.')[0];
|
2011-10-06 00:30:09 +00:00
|
|
|
},
|
|
|
|
path: Ox.PATH
|
|
|
|
}).bindEvent({
|
|
|
|
load: function() {
|
|
|
|
if (document.location.hash.substring(1)) {
|
|
|
|
doc.selectItem(document.location.hash.substring(1));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
select: function(data) {
|
2011-12-29 10:45:59 +00:00
|
|
|
if (data.id) {
|
|
|
|
document.location.hash = data.id;
|
2011-10-06 00:30:09 +00:00
|
|
|
}
|
2011-09-05 05:40:44 +00:00
|
|
|
}
|
2011-10-06 00:30:09 +00:00
|
|
|
});
|
|
|
|
doc.appendTo(Ox.UI.$body);
|
|
|
|
window.onhashchange = function() {
|
|
|
|
doc.selectItem(document.location.hash.substring(1))
|
|
|
|
};
|
|
|
|
});
|
2011-05-10 11:30:52 +00:00
|
|
|
});
|
|
|
|
});
|