diff options
Diffstat (limited to 'module/web/static/js/default.js')
-rw-r--r-- | module/web/static/js/default.js | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/module/web/static/js/default.js b/module/web/static/js/default.js index 782c97ac2..c82ae3299 100644 --- a/module/web/static/js/default.js +++ b/module/web/static/js/default.js @@ -1,57 +1,17 @@ -// Sets the require.js configuration for your application. -// Note: Config needs to be duplicated for mobile.js -require.config({ +define('default', ['jquery', 'app', 'views/headerView', 'views/packageTreeView'], + function($, App, HeaderView, TreeView) { - // XXX: To many dots in file breaks dependencies - paths: { - - jquery: "libs/jquery-1.8.3", - jqueryui: "libs/jqueryui", - flot: "libs/jquery.flot-1.1", - transit: "libs/jquery.transit-0.9.9", - omniwindow: "libs/jquery.omniwindow", - bootstrap: "libs/bootstrap-2.2.2", - - underscore: "libs/lodash-1.0.rc3", - backbone: "libs/backbone-0.9.9", - handlebars: "libs/Handlebars-1.0rc1", - - // Plugins - text: "libs/text-2.0.3", - tpl: "../../templates" - - }, - - // Sets the configuration for your third party scripts that are not AMD compatible - shim: { - - "backbone": { - deps: ["underscore", "jquery"], - exports: "Backbone" //attaches "Backbone" to the window object - }, - "flot": ["jquery"], - "transit": ["jquery"], - "omniwindow": ["jquery"], - "bootstrap": ["jquery"] - }, // end Shim Configuration -}); - -define('default', ['jquery', 'backbone', 'utils/initHB', - 'routers/defaultRouter', 'views/headerView', 'views/packageTreeView', - 'utils/animations', 'utils/lazyRequire', 'bootstrap'], - function($, Backbone, Handlebars, DefaultRouter, HeaderView, TreeView) { - - var init = function() { + App.init = function() { var view = new HeaderView(); view.render(); }; - var initPackageTree = function() { + App.initPackageTree = function() { $(function() { var view = new TreeView(); view.init(); }); }; - return {"init": init, "initPackageTree": initPackageTree}; + return App; });
\ No newline at end of file |