Use require.js where possible.

This commit is contained in:
Jonathan Frederic 2013-10-17 21:09:17 +00:00
parent 42e32d2ff8
commit c9d604d54e
2 changed files with 209 additions and 211 deletions

View File

@ -16,12 +16,11 @@
*/
// require(['components/underscore/underscore-min.js',
// 'components/backbone/backbone-min.js'],
"use strict";
// Only run once on a notebook.
require(["components/underscore/underscore-min",
"components/backbone/backbone-min"], function () {
if (IPython.notebook.widget_manager == undefined) {
//-----------------------------------------------------------------------
@ -255,3 +254,4 @@ if (IPython.notebook.widget_manager == undefined) {
IPython.notebook.widget_manager = new WidgetManager(IPython.notebook.kernel.comm_manager);
}
});

View File

@ -71,8 +71,6 @@
<script src="{{static_url("components/jquery/jquery.min.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("components/jquery-ui/ui/minified/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("components/bootstrap/bootstrap/js/bootstrap.min.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("components/underscore/underscore-min.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("components/backbone/backbone-min.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("base/js/namespace.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("base/js/page.js") }}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("auth/js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script>