2011-05-07 15:56:29 +00:00
|
|
|
Ox.load('UI', {
|
|
|
|
debug: true,
|
|
|
|
theme: 'classic'
|
|
|
|
}, function() {
|
|
|
|
Ox.Theme('classic');
|
2011-09-05 05:40:44 +00:00
|
|
|
$.getJSON(Ox.UI.PATH + 'json/Ox.UI.files.json', function(files) {
|
2011-05-16 08:24:46 +00:00
|
|
|
doc = Ox.DocPanel({
|
2011-05-10 11:30:52 +00:00
|
|
|
files: Ox.merge([
|
|
|
|
'Ox.js',
|
|
|
|
'Ox.Geo/Ox.Geo.js',
|
|
|
|
], files.filter(function(file) {
|
|
|
|
return Ox.endsWith(file, '.js');
|
|
|
|
})),
|
|
|
|
getModule: function(item) {
|
|
|
|
var file = item.file.replace(Ox.PATH, '');
|
|
|
|
return file == 'Ox.js' ? 'Ox' : file.split('/')[0];
|
|
|
|
},
|
|
|
|
getSection: function(item) {
|
|
|
|
var file = item.file.replace(Ox.PATH, '');
|
|
|
|
return item.section || file.split('/')[2];
|
|
|
|
},
|
|
|
|
path: Ox.PATH
|
2011-05-16 08:24:46 +00:00
|
|
|
}).bindEvent({
|
|
|
|
load: function() {
|
|
|
|
doc.selectItem(document.location.hash.substring(1));
|
|
|
|
},
|
|
|
|
select: function(data) {
|
2011-09-05 05:40:44 +00:00
|
|
|
if (data.ids) {
|
2011-05-16 08:24:46 +00:00
|
|
|
document.location.hash = data.ids[0];
|
2011-09-05 05:40:44 +00:00
|
|
|
}
|
2011-05-16 08:24:46 +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
|
|
|
});
|
|
|
|
});
|