From 26734147450d20f7ecb3c56fa6a40d325d731c71 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 10 May 2011 13:30:52 +0200 Subject: [PATCH] load all Ox.UI files --- demos/doc2/js/doc.js | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/demos/doc2/js/doc.js b/demos/doc2/js/doc.js index b0ecd3fe..84c584e7 100644 --- a/demos/doc2/js/doc.js +++ b/demos/doc2/js/doc.js @@ -3,23 +3,24 @@ Ox.load('UI', { theme: 'classic' }, function() { Ox.Theme('classic'); - Ox.DocPanel({ - files: [ - 'Ox.js', - 'Ox.Geo/Ox.Geo.js', - 'Ox.UI/js/Map/Ox.Map.js', - 'Ox.UI/js/Core/Ox.Element.js', - 'Ox.UI/js/Core/Ox.JQueryElement.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 - }) - .appendTo(Ox.UI.$body); -}); \ No newline at end of file + $.getJSON(Ox.UI.PATH + 'json/Ox.UI.json', function(files) { + Ox.DocPanel({ + 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 + }) + .appendTo(Ox.UI.$body); + }); +});