diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-08-19 11:36:29 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-08-19 11:36:29 +0200 |
commit | ac58037d5dbc9d2ad8dc05cf609f90176aebb2b0 (patch) | |
tree | de731981b9cf32a25403e0b03fa1a2d7c1158a55 /module/web/static/js/default.js | |
parent | completed renaming (diff) | |
download | pyload-ac58037d5dbc9d2ad8dc05cf609f90176aebb2b0.tar.xz |
boilerplate for js code
Diffstat (limited to 'module/web/static/js/default.js')
-rw-r--r-- | module/web/static/js/default.js | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/module/web/static/js/default.js b/module/web/static/js/default.js new file mode 100644 index 000000000..a9e377328 --- /dev/null +++ b/module/web/static/js/default.js @@ -0,0 +1,43 @@ +// Sets the require.js configuration for your application. +// Note: Config needs to be duplicated for mobile.js +require.config({ + + // XXX: To many dots in file breaks dependencies + paths:{ + + jquery:"libs/jquery-1.8.0", + jqueryui:"libs/jquery-ui-1.8.22.min", + flot:"libs/jquery.flot.min", + omniwindow: "libs/jquery.omniwindow", + + underscore:"libs/lodash-0.4.2", + backbone:"libs/backbone-0.9.2", + + // Require.js Plugins + text:"plugins/text-2.0.0" + + }, + + // 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 + }, + "jqueryui": ["jquery"], + "flot" : ["jquery"], + "omniwindow" : ["jquery"] + } // end Shim Configuration + +}); + +define('default', ['jquery', 'backbone', 'routers/defaultRouter', 'views/headerView', 'jqueryui'], function ($, Backbone, DefaultRouter, HeaderView) { + + var init = function(){ + var view = new HeaderView(); + view.render(); + }; + + return {"init":init}; +});
\ No newline at end of file |