Load contents dynamically and load jquery-typeahead globally

Jonathan Frederic 10 years ago
parent a83f18255b
commit e5e8db3670

@ -1,12 +1,12 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
requirejs(['contents'], function(contents) {
require([
'base/js/namespace',
'base/js/utils',
'base/js/page',
'base/js/events',
'contents',
'services/config',
'edit/js/editor',
'edit/js/menubar',
@ -17,7 +17,6 @@ require([
utils,
page,
events,
contents,
configmod,
editmod,
menubar,
@ -94,3 +93,4 @@ require([
// On document ready, resize codemirror.
$(document).ready(_handle_resize);
});
});

@ -1,11 +1,11 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
requirejs(['contents'], function(contents) {
require([
'base/js/namespace',
'jquery',
'notebook/js/notebook',
'contents',
'services/config',
'base/js/utils',
'base/js/page',
@ -22,13 +22,11 @@ require([
'notebook/js/kernelselector',
'codemirror/lib/codemirror',
'notebook/js/about',
'typeahead',
'notebook/js/searchandreplace'
], function(
IPython,
$,
notebook,
contents,
configmod,
utils,
page,
@ -45,11 +43,13 @@ require([
kernelselector,
CodeMirror,
about,
typeahead,
searchandreplace
) {
"use strict";
// Pull typeahead from the global jquery object
var typeahead = $.typeahead;
requirejs(['custom/custom'], function() {});
// BEGIN HARDCODED WIDGETS HACK
@ -184,3 +184,4 @@ require([
notebook.load_notebook(common_options.notebook_path);
});
});

@ -1,6 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
requirejs(['contents'], function(contents_service) {
require([
'base/js/namespace',
'base/js/dialog',
@ -8,7 +9,6 @@ require([
'base/js/page',
'base/js/utils',
'services/config',
'contents',
'tree/js/notebooklist',
'tree/js/sessionlist',
'tree/js/kernellist',
@ -22,7 +22,6 @@ require([
page,
utils,
config,
contents_service,
notebooklist,
sesssionlist,
kernellist,
@ -170,3 +169,4 @@ require([
$("#tabs").find("a[href=" + window.location.hash + "]").click();
}
});
});

@ -20,6 +20,7 @@
<script src="{{static_url("components/jquery-ui/ui/minified/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> <!-- extends window.$ -->
<script src="{{static_url("components/bootstrap/js/bootstrap.min.js") }}" type="text/javascript" charset="utf-8"></script> <!-- extends window.$ -->
<script src="{{static_url("components/bootstrap-tour/build/js/bootstrap-tour.min.js") }}" type="text/javascript" charset="utf-8"></script> <!-- window.Tour -->
<script src="{{static_url("components/jquery-typeahead/dist/jquery.typeahead.js") }}" type="text/javascript" charset="utf-8"></script> <!-- extends window.$ -->
<script src="{{static_url("components/requirejs/require.js") }}" type="text/javascript" charset="utf-8"></script>
<script>
require.config({

Loading…
Cancel
Save