Fix all the tests

This commit is contained in:
Jonathan Frederic 2014-07-03 09:01:41 -07:00
parent 2478fac032
commit b15633a89e
12 changed files with 39 additions and 13 deletions

View File

@ -6,6 +6,7 @@ define([
'jquery',
'base/js/utils',
'notebook/js/tour',
'components/bootstrap/js/bootstrap.min',
], function(IPython, $, utils, tour) {
"use strict";

View File

@ -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;

View File

@ -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};
});

View File

@ -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;
});

View File

@ -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(){

View File

@ -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(){

View File

@ -3,7 +3,8 @@
define([
"widgets/js/widget",
"jqueryui"
"jqueryui",
"components/bootstrap/js/bootstrap.min",
], function(widget, $){
var ContainerView = widget.DOMWidgetView.extend({

View File

@ -3,7 +3,8 @@
define([
"widgets/js/widget",
], function(widget){
"jquery",
], function(widget, $){
var ImageView = widget.DOMWidgetView.extend({
render : function(){

View File

@ -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(){

View File

@ -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(){

View File

@ -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(){

View File

@ -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(){