diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js
index 94b28ae4f..f2c0b6565 100644
--- a/IPython/html/static/notebook/js/menubar.js
+++ b/IPython/html/static/notebook/js/menubar.js
@@ -6,6 +6,7 @@ define([
'jquery',
'base/js/utils',
'notebook/js/tour',
+ 'components/bootstrap/js/bootstrap.min',
], function(IPython, $, utils, tour) {
"use strict";
diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js
index feeddafef..f716a40ff 100644
--- a/IPython/html/static/notebook/js/notebook.js
+++ b/IPython/html/static/notebook/js/notebook.js
@@ -52,7 +52,7 @@ define([
this.events = options.events;
this.keyboard_manager = options.keyboard_manager;
this.save_widget = options.save_widget;
- this.tooltip = tooltip.Tooltip(this.events);
+ this.tooltip = new tooltip.Tooltip(this.events);
// TODO: This code smells (and the other `= this` line a couple lines down)
// We need a better way to deal with circular instance references.
this.keyboard_manager.notebook = this;
diff --git a/IPython/html/static/widgets/js/manager.js b/IPython/html/static/widgets/js/manager.js
index 13f4c866f..a7f724dd8 100644
--- a/IPython/html/static/widgets/js/manager.js
+++ b/IPython/html/static/widgets/js/manager.js
@@ -4,7 +4,8 @@
define([
"underscore",
"backbone",
-], function (_, Backbone) {
+ "base/js/namespace"
+], function (_, Backbone, IPython) {
//--------------------------------------------------------------------
// WidgetManager class
@@ -193,5 +194,8 @@ define([
this._models[model_id] = widget_model;
};
+ // Backwards compatability.
+ IPython.WidgetManager = WidgetManager;
+
return {'WidgetManager': WidgetManager};
});
diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js
index 7e0840246..92bfcbe4a 100644
--- a/IPython/html/static/widgets/js/widget.js
+++ b/IPython/html/static/widgets/js/widget.js
@@ -3,8 +3,10 @@
define(["widgets/js/manager",
"underscore",
- "backbone"],
-function(widgetmanager, _, Backbone){
+ "backbone",
+ "jquery",
+ "base/js/namespace",
+], function(widgetmanager, _, Backbone, $, IPython){
var WidgetModel = Backbone.Model.extend({
constructor: function (widget_manager, model_id, comm) {
@@ -458,9 +460,14 @@ function(widgetmanager, _, Backbone){
},
});
- return {
+ var widget = {
'WidgetModel': WidgetModel,
'WidgetView': WidgetView,
'DOMWidgetView': DOMWidgetView,
};
+
+ // For backwards compatability.
+ $.extend(IPython, widget);
+
+ return widget;
});
diff --git a/IPython/html/static/widgets/js/widget_bool.js b/IPython/html/static/widgets/js/widget_bool.js
index 59d915d7e..5bb86d707 100644
--- a/IPython/html/static/widgets/js/widget_bool.js
+++ b/IPython/html/static/widgets/js/widget_bool.js
@@ -3,7 +3,9 @@
define([
"widgets/js/widget",
-], function(widget){
+ "jquery",
+ "components/bootstrap/js/bootstrap.min",
+], function(widget, $){
var CheckboxView = widget.DOMWidgetView.extend({
render : function(){
diff --git a/IPython/html/static/widgets/js/widget_button.js b/IPython/html/static/widgets/js/widget_button.js
index 45fbf6825..071c836fb 100644
--- a/IPython/html/static/widgets/js/widget_button.js
+++ b/IPython/html/static/widgets/js/widget_button.js
@@ -3,7 +3,9 @@
define([
"widgets/js/widget",
-], function(widget){
+ "jquery",
+ "components/bootstrap/js/bootstrap.min",
+], function(widget, $){
var ButtonView = widget.DOMWidgetView.extend({
render : function(){
diff --git a/IPython/html/static/widgets/js/widget_container.js b/IPython/html/static/widgets/js/widget_container.js
index 2e7d997cb..427d3de04 100644
--- a/IPython/html/static/widgets/js/widget_container.js
+++ b/IPython/html/static/widgets/js/widget_container.js
@@ -3,7 +3,8 @@
define([
"widgets/js/widget",
- "jqueryui"
+ "jqueryui",
+ "components/bootstrap/js/bootstrap.min",
], function(widget, $){
var ContainerView = widget.DOMWidgetView.extend({
diff --git a/IPython/html/static/widgets/js/widget_image.js b/IPython/html/static/widgets/js/widget_image.js
index 7bce149ac..f3a9f1788 100644
--- a/IPython/html/static/widgets/js/widget_image.js
+++ b/IPython/html/static/widgets/js/widget_image.js
@@ -3,7 +3,8 @@
define([
"widgets/js/widget",
-], function(widget){
+ "jquery",
+], function(widget, $){
var ImageView = widget.DOMWidgetView.extend({
render : function(){
diff --git a/IPython/html/static/widgets/js/widget_int.js b/IPython/html/static/widgets/js/widget_int.js
index bb9bd9031..a5fa1968f 100644
--- a/IPython/html/static/widgets/js/widget_int.js
+++ b/IPython/html/static/widgets/js/widget_int.js
@@ -3,7 +3,9 @@
define([
"widgets/js/widget",
-], function(widget){
+ "jqueryui",
+ "components/bootstrap/js/bootstrap.min",
+], function(widget, $){
var IntSliderView = widget.DOMWidgetView.extend({
render : function(){
diff --git a/IPython/html/static/widgets/js/widget_selection.js b/IPython/html/static/widgets/js/widget_selection.js
index 74b556b03..384cabd4f 100644
--- a/IPython/html/static/widgets/js/widget_selection.js
+++ b/IPython/html/static/widgets/js/widget_selection.js
@@ -4,7 +4,9 @@
define([
"widgets/js/widget",
"base/js/utils",
-], function(widget, utils){
+ "jquery",
+ "components/bootstrap/js/bootstrap.min",
+], function(widget, utils, $){
var DropdownView = widget.DOMWidgetView.extend({
render : function(){
diff --git a/IPython/html/static/widgets/js/widget_selectioncontainer.js b/IPython/html/static/widgets/js/widget_selectioncontainer.js
index 15424c14e..14c45b47a 100644
--- a/IPython/html/static/widgets/js/widget_selectioncontainer.js
+++ b/IPython/html/static/widgets/js/widget_selectioncontainer.js
@@ -4,7 +4,9 @@
define([
"widgets/js/widget",
"base/js/utils",
-], function(widget, utils){
+ "jquery",
+ "components/bootstrap/js/bootstrap.min",
+], function(widget, utils, $){
var AccordionView = widget.DOMWidgetView.extend({
render: function(){
diff --git a/IPython/html/static/widgets/js/widget_string.js b/IPython/html/static/widgets/js/widget_string.js
index 1d2cf75c8..ff09c2627 100644
--- a/IPython/html/static/widgets/js/widget_string.js
+++ b/IPython/html/static/widgets/js/widget_string.js
@@ -3,7 +3,9 @@
define([
"widgets/js/widget",
-], function(widget){
+ "jquery",
+ "components/bootstrap/js/bootstrap.min",
+], function(widget, $){
var HTMLView = widget.DOMWidgetView.extend({
render : function(){