From 3498a5193cfad3e8c6e4fb255cfcefd6707d34ef Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Wed, 12 Aug 2015 12:38:36 -0700 Subject: [PATCH] Get all of the apps working except notebookapp --- bower.json | 15 ++++++++------- notebook/build.js | 17 ++++++++++------- notebook/static/edit/js/main.js | 6 ++++-- notebook/static/notebook/js/main.js | 4 +++- notebook/static/terminal/js/main.js | 1 - notebook/static/terminal/js/terminado.js | 7 ++++--- notebook/static/tree/js/main.js | 4 +++- package.json | 15 +++++++++++---- 8 files changed, 43 insertions(+), 26 deletions(-) diff --git a/bower.json b/bower.json index dbebe4be0..3178b3e86 100644 --- a/bower.json +++ b/bower.json @@ -2,20 +2,21 @@ "name": "jupyter-notebook-deps", "version": "0.0.1", "dependencies": { - "backbone": "components/backbone#~1.2", - "bootstrap": "components/bootstrap#~3.3", - "bootstrap-tour": "0.9.0", - "codemirror": "~5.5", "es6-promise": "~1.0", "font-awesome": "components/font-awesome#~4.2.0", + "requirejs": "~2.1", "google-caja": "5669", + "MathJax": "components/MathJax#~2.5", + "bootstrap": "components/bootstrap#~3.3", + "bootstrap-tour": "0.9.0", "jquery": "components/jquery#~2.0", "jquery-ui": "components/jqueryui#~1.10", + + "term.js": "chjj/term.js#~0.0.4", + "backbone": "components/backbone#~1.2", + "codemirror": "~5.5", "marked": "~0.3", - "MathJax": "components/MathJax#~2.5", "moment": "~2.8.4", - "requirejs": "~2.1", - "term.js": "chjj/term.js#~0.0.4", "text-encoding": "~0.1", "underscore": "components/underscore#~1.5", "jquery-typeahead": "~2.0.0" diff --git a/notebook/build.js b/notebook/build.js index 2e885e008..b53848e2d 100644 --- a/notebook/build.js +++ b/notebook/build.js @@ -4,15 +4,18 @@ var browserify = require('browserify'); var aliasifyConfig = { aliases: { - underscore : 'components/underscore/underscore-min', - backbone : 'components/backbone/backbone-min', - jquery: 'components/jquery/jquery.min', + // underscore : 'components/underscore/underscore-min', + // backbone : 'components/backbone/backbone-min', + // jquery: 'components/jquery/jquery.min', bootstrap: 'components/bootstrap/js/bootstrap.min', bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min', - jqueryui: 'components/jquery-ui/ui/minified/jquery-ui.min', - moment: 'components/moment/moment', - codemirror: 'components/codemirror', - termjs: 'components/term.js/src/term' + // jqueryui: 'components/jquery-ui/ui/minified/jquery-ui.min', + // moment: 'components/moment/moment', + // codemirror: 'components/codemirror', + // termjs: 'components/term.js/src/term' + + jqueryui: 'jquery-ui', + termjs: 'term.js' }, verbose: false } diff --git a/notebook/static/edit/js/main.js b/notebook/static/edit/js/main.js index eac072379..934f440b1 100644 --- a/notebook/static/edit/js/main.js +++ b/notebook/static/edit/js/main.js @@ -3,7 +3,9 @@ "use strict"; // Contents must be loaded at runtime. -requirejs(['contents'], function(contents_service) { +// jQuery must also be loaded at runtime and available globally +// in order for bootstrap to work... +requirejs(['contents', 'bootstrap'], function(contents_service) { var $ = require('jquery'); var IPython = require('base/js/namespace'); var utils = require('base/js/utils'); @@ -24,7 +26,7 @@ requirejs(['contents'], function(contents_service) { config.load(); var common_config = new configmod.ConfigSection('common', {base_url: base_url}); common_config.load(); - contents = new contents.Contents({ + var contents = new contents_service.Contents({ base_url: base_url, common_config: common_config }); diff --git a/notebook/static/notebook/js/main.js b/notebook/static/notebook/js/main.js index c5b17503b..ec7f9b0c3 100644 --- a/notebook/static/notebook/js/main.js +++ b/notebook/static/notebook/js/main.js @@ -3,7 +3,9 @@ "use strict"; // Contents must be loaded at runtime. -requirejs(['contents'], function(contents_service) { +// jQuery must also be loaded at runtime and available globally +// in order for bootstrap to work... +requirejs(['contents', 'jquery'], function(contents_service) { var IPython = require('base/js/namespace'); var $ = require('jquery'); var notebook = require('notebook/js/notebook'); diff --git a/notebook/static/terminal/js/main.js b/notebook/static/terminal/js/main.js index a9b9caf6f..8c4300dcf 100644 --- a/notebook/static/terminal/js/main.js +++ b/notebook/static/terminal/js/main.js @@ -3,7 +3,6 @@ "use strict"; var $ = require('jquery'); - var termjs = require('termjs'); var utils = require('base/js/utils'); var page = require('base/js/page'); var configmod = require('services/config'); diff --git a/notebook/static/terminal/js/terminado.js b/notebook/static/terminal/js/terminado.js index 62be993ea..4742c1b69 100644 --- a/notebook/static/terminal/js/terminado.js +++ b/notebook/static/terminal/js/terminado.js @@ -1,11 +1,12 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. "use strict"; - + var termjs = require('termjs'); + exports.make_terminal = function(element, size, ws_url) { var ws = new WebSocket(ws_url); - Terminal.brokenBold = true; - var term = new Terminal({ + termjs.Terminal.brokenBold = true; + var term = new termjs.Terminal({ cols: size.cols, rows: size.rows, screenKeys: false, diff --git a/notebook/static/tree/js/main.js b/notebook/static/tree/js/main.js index ec9ea6c36..a2c7f2673 100644 --- a/notebook/static/tree/js/main.js +++ b/notebook/static/tree/js/main.js @@ -3,7 +3,9 @@ "use strict"; // Contents must be loaded at runtime. -requirejs(['contents'], function(contents_service) { +// jQuery must also be loaded at runtime and available globally +// in order for bootstrap to work... +requirejs(['contents', 'jquery'], function(contents_service) { var $ = require('jquery'); var IPython = require('base/js/namespace'); diff --git a/package.json b/package.json index c40b83a69..e69ae5e30 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,16 @@ "bower": "*", "browserify": "^11.0.1", "concurrently": "^0.1.1", - "less": "~2" - }, - "dependencies": { - "jquery": "^2.1.4" + "less": "~2", + + "jquery": "~2.0", + "jquery-ui": "~1.10", + "term.js": "~0.0.4", + "backbone": "~1.2", + "codemirror": "~5.5", + "marked": "~0.3", + "moment": "~2.8.4", + "text-encoding": "~0.1", + "underscore": "~1.5" } }