Load jquery and friends globally

Jonathan Frederic 10 years ago
parent e409dd1a2c
commit 1ae63ce185

@ -3,8 +3,7 @@
define([
'base/js/utils',
'jquery',
], function(utils, $){
], function(utils){
"use strict";
var LoginWidget = function (selector, options) {

@ -5,9 +5,6 @@ define(function(require) {
"use strict";
var CodeMirror = require('codemirror/lib/codemirror');
var $ = require('jquery');
// bootstrap is required for calling .modal(...) on elements
require('bootstrap');
/**
* A wrapper around bootstrap modal for easier use

@ -9,7 +9,7 @@
// events.on("event.Namespace", function () { do_stuff(); });
// });
define(['base/js/namespace', 'jquery'], function(IPython, $) {
define(['base/js/namespace'], function(IPython) {
"use strict";
var Events = function () {};

@ -9,10 +9,9 @@
*/
define([
'jquery',
'base/js/utils',
'underscore',
], function($, utils, _) {
], function(utils, _) {
"use strict";

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/notificationwidget',
], function($, notificationwidget) {
], function(notificationwidget) {
"use strict";
// store reference to the NotificationWidget class

@ -1,9 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
], function($) {
define([], function() {
"use strict";
/**

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/events',
], function($, events){
], function(events){
"use strict";
var Page = function () {

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'components/google-caja/html-css-sanitizer-minified',
], function($, sanitize) {
], function(sanitize) {
"use strict";
var noop = function (x) { return x; };

@ -2,12 +2,11 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'codemirror/lib/codemirror',
'moment',
// silently upgrades CodeMirror
'codemirror/mode/meta',
], function($, CodeMirror, moment){
], function(CodeMirror, moment){
"use strict";
// keep track of which extensions have been loaded already

@ -2,7 +2,6 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'codemirror/lib/codemirror',
'codemirror/mode/meta',
@ -16,7 +15,7 @@ define([
'codemirror/keymap/sublime',
'codemirror/keymap/vim',
],
function($,
function(
utils,
CodeMirror
) {

@ -2,7 +2,6 @@
// Distributed under the terms of the Modified BSD License.
require([
'jquery',
'base/js/namespace',
'base/js/utils',
'base/js/page',
@ -13,9 +12,7 @@ require([
'edit/js/menubar',
'edit/js/savewidget',
'edit/js/notificationarea',
'custom/custom',
], function(
$,
IPython,
utils,
page,
@ -28,6 +25,8 @@ require([
notificationarea
){
"use strict";
requirejs(['custom/custom'], function() {});
page = new page.Page();
var base_url = utils.get_body_data('baseUrl');

@ -2,14 +2,12 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/namespace',
'base/js/utils',
'base/js/dialog',
'codemirror/lib/codemirror',
'codemirror/mode/meta',
'bootstrap',
], function($, IPython, utils, dialog, CodeMirror) {
], function(IPython, utils, dialog, CodeMirror) {
"use strict";
var MenuBar = function (selector, options) {

@ -2,12 +2,11 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'base/js/dialog',
'base/js/keyboard',
'moment',
], function($, utils, dialog, keyboard, moment) {
], function(utils, dialog, keyboard, moment) {
"use strict";
var SaveWidget = function (selector, options) {

@ -1,11 +1,10 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
require([
'jquery',
'base/js/dialog',
'underscore',
'base/js/namespace'
], function ($, dialog, _, IPython) {
], function (dialog, _, IPython) {
'use strict';
$('#notebook_about').click(function () {
// use underscore template to auto html escape

@ -34,7 +34,6 @@ define(function(require){
Object.seal(this);
};
var $ = require('jquery');
var events = require('base/js/events');
/**

@ -10,13 +10,12 @@
define([
'jquery',
'base/js/utils',
'codemirror/lib/codemirror',
'codemirror/addon/edit/matchbrackets',
'codemirror/addon/edit/closebrackets',
'codemirror/addon/comment/comment'
], function($, utils, CodeMirror, cm_match, cm_closeb, cm_comment) {
], function(utils, CodeMirror, cm_match, cm_closeb, cm_comment) {
"use strict";
var overlayHack = CodeMirror.scrollbarModel.native.prototype.overlayHack;

@ -3,9 +3,8 @@
define([
'base/js/namespace',
'jquery',
'base/js/events'
], function(IPython, $, events) {
], function(IPython, events) {
"use strict";
var CellToolbar = function (options) {

@ -2,10 +2,9 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'notebook/js/celltoolbar',
'base/js/dialog',
], function($, celltoolbar, dialog) {
], function(celltoolbar, dialog) {
"use strict";
var CellToolbar = celltoolbar.CellToolbar;

@ -9,9 +9,8 @@
// $.getScript('/static/js/celltoolbarpresets/example.js');
// ```
define([
'jquery',
'notebook/js/celltoolbar',
], function($, celltoolbar) {
], function(celltoolbar) {
"use strict";
var CellToolbar = celltoolbar.CellToolbar;

@ -2,11 +2,10 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'notebook/js/celltoolbar',
'base/js/dialog',
'base/js/keyboard',
], function($, celltoolbar, dialog, keyboard) {
], function(celltoolbar, dialog, keyboard) {
"use strict";
var CellToolbar = celltoolbar.CellToolbar;

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'notebook/js/celltoolbar',
], function($, celltoolbar) {
], function(celltoolbar) {
"use strict";

@ -11,7 +11,6 @@
define([
'base/js/namespace',
'jquery',
'base/js/utils',
'base/js/keyboard',
'services/config',
@ -23,7 +22,6 @@ define([
'codemirror/mode/python/python',
'notebook/js/codemirror-ipython'
], function(IPython,
$,
utils,
keyboard,
configmod,

@ -5,7 +5,6 @@ define(function(require){
"use strict";
var QH = require("notebook/js/quickhelp");
var $ = require("jquery");
/**
* Humanize the action name to be consumed by user.

@ -2,12 +2,11 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'base/js/keyboard',
'notebook/js/contexthint',
'codemirror/lib/codemirror',
], function($, utils, keyboard, CodeMirror) {
], function(utils, keyboard, CodeMirror) {
"use strict";
// easier key mapping

@ -2,12 +2,11 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/namespace',
'base/js/dialog',
'base/js/utils',
'require',
], function($, IPython, dialog, utils, require) {
], function(IPython, dialog, utils, require) {
"use strict";
var KernelSelector = function(selector, notebook) {

@ -9,10 +9,9 @@
*/
define([
'jquery',
'base/js/utils',
'base/js/keyboard',
], function($, utils, keyboard) {
], function(utils, keyboard) {
"use strict";
// Main keyboard manager for the notebook

@ -23,9 +23,7 @@ require([
'codemirror/lib/codemirror',
'notebook/js/about',
'typeahead',
'notebook/js/searchandreplace',
// only loaded, not used, please keep sure this is loaded last
'custom/custom'
'notebook/js/searchandreplace'
], function(
IPython,
$,
@ -48,12 +46,12 @@ require([
CodeMirror,
about,
typeahead,
searchandreplace,
// please keep sure that even if not used, this is loaded last
custom
searchandreplace
) {
"use strict";
requirejs(['custom/custom'], function() {});
// BEGIN HARDCODED WIDGETS HACK
// Try to load the new extension
utils.load_extension('widgets/extension').catch(function () {

@ -3,10 +3,9 @@
define([
'require',
'jquery',
'./toolbar',
'./celltoolbar'
], function(require, $, toolbar, celltoolbar) {
], function(require, toolbar, celltoolbar) {
"use strict";
var MainToolBar = function (selector, options) {

@ -2,10 +2,9 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'base/js/dialog',
], function($, utils, dialog) {
], function(utils, dialog) {
"use strict";
var init = function () {

@ -2,14 +2,13 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/namespace',
'base/js/dialog',
'base/js/utils',
'./celltoolbar',
'./tour',
'moment',
], function($, IPython, dialog, utils, celltoolbar, tour, moment) {
], function(IPython, dialog, utils, celltoolbar, tour, moment) {
"use strict";
var MenuBar = function (selector, options) {

@ -7,7 +7,6 @@
define(function (require) {
"use strict";
var IPython = require('base/js/namespace');
var $ = require('jquery');
var _ = require('underscore');
var utils = require('base/js/utils');
var dialog = require('base/js/dialog');

@ -1,10 +1,9 @@
define([
'jquery',
'base/js/utils',
'base/js/dialog',
'base/js/notificationarea',
'moment'
], function($, utils, dialog, notificationarea, moment) {
], function(utils, dialog, notificationarea, moment) {
"use strict";
var NotificationArea = notificationarea.NotificationArea;

@ -2,13 +2,12 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery-ui',
'base/js/utils',
'base/js/security',
'base/js/keyboard',
'notebook/js/mathjaxutils',
'components/marked/lib/marked',
], function($, utils, security, keyboard, mathjaxutils, marked) {
], function(utils, security, keyboard, mathjaxutils, marked) {
"use strict";
/**

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery-ui',
'base/js/utils',
], function($, utils) {
], function(utils) {
"use strict";
var Pager = function (pager_selector, options) {

@ -2,10 +2,9 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'base/js/dialog',
], function($, utils, dialog) {
], function(utils, dialog) {
"use strict";
var platform = utils.platform;

@ -2,12 +2,11 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'base/js/dialog',
'base/js/keyboard',
'moment',
], function($, utils, dialog, keyboard, moment) {
], function(utils, dialog, keyboard, moment) {
"use strict";
var SaveWidget = function (selector, options) {

@ -1,6 +1,6 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
define(['jquery'], function($){
define([], function() {
"use strict";
var ScrollManager = function(notebook, options) {

@ -3,7 +3,6 @@
define([
'base/js/utils',
'jquery',
'notebook/js/cell',
'base/js/security',
'services/config',
@ -15,7 +14,6 @@ define([
'notebook/js/codemirror-ipythongfm'
], function(
utils,
$,
cell,
security,
configmod,

@ -1,9 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'jquery'
], function($) {
define([], function() {
"use strict";
/**

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
], function($, utils) {
], function(utils) {
"use strict";
// tooltip constructor

@ -1,10 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'bootstraptour',
], function($, Tour) {
define([], function() {
"use strict";
var tour_style = "<div class='popover tour'>\n" +

@ -2,10 +2,9 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
],
function($, utils) {
function(utils) {
"use strict";
var ConfigSection = function(section_name, options) {
this.section_name = section_name;

@ -4,7 +4,6 @@
define(function(require) {
"use strict";
var $ = require('jquery');
var utils = require('base/js/utils');
var Contents = function(options) {

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
], function($, utils) {
], function(utils) {
"use strict";
//-----------------------------------------------------------------------

@ -2,12 +2,11 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'./comm',
'./serialize',
'base/js/events'
], function($, utils, comm, serialize, events) {
], function(utils, comm, serialize, events) {
"use strict";
/**

@ -2,10 +2,9 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
'services/kernels/kernel',
], function($, utils, kernel) {
], function(utils, kernel) {
"use strict";
/**

@ -2,15 +2,12 @@
// Distributed under the terms of the Modified BSD License.
require([
'jquery',
'termjs',
'base/js/utils',
'base/js/page',
'services/config',
'terminal/js/terminado',
'custom/custom',
], function(
$,
termjs,
utils,
page,
@ -18,6 +15,7 @@ require([
terminado
){
"use strict";
requirejs(['custom/custom'], function() {});
page = new page.Page();
var common_config = new configmod.ConfigSection('common',

@ -3,9 +3,8 @@
define([
'base/js/namespace',
'jquery',
'tree/js/notebooklist',
], function(IPython, $, notebooklist) {
], function(IPython, notebooklist) {
"use strict";
var KernelList = function (selector, options) {

@ -2,7 +2,6 @@
// Distributed under the terms of the Modified BSD License.
require([
'jquery',
'base/js/namespace',
'base/js/dialog',
'base/js/events',
@ -16,12 +15,7 @@ require([
'tree/js/terminallist',
'tree/js/newnotebook',
'auth/js/loginwidget',
// only loaded, not used:
'jquery-ui',
'bootstrap',
'custom/custom',
], function(
$,
IPython,
dialog,
events,
@ -36,6 +30,7 @@ require([
newnotebook,
loginwidget){
"use strict";
requirejs(['custom/custom'], function() {});
IPython.NotebookList = notebooklist.NotebookList;

@ -2,11 +2,10 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/namespace',
'base/js/utils',
'base/js/dialog',
], function ($, IPython, utils, dialog) {
], function (IPython, utils, dialog) {
"use strict";
var NewNotebookWidget = function (selector, options) {

@ -3,12 +3,11 @@
define([
'base/js/namespace',
'jquery',
'base/js/utils',
'base/js/dialog',
'base/js/events',
'base/js/keyboard',
], function(IPython, $, utils, dialog, events, keyboard) {
], function(IPython, utils, dialog, events, keyboard) {
"use strict";
var NotebookList = function (selector, options) {

@ -2,9 +2,8 @@
// Distributed under the terms of the Modified BSD License.
define([
'jquery',
'base/js/utils',
], function($, utils) {
], function(utils) {
"use strict";
var SesssionList = function (options) {

@ -4,9 +4,8 @@
define([
'base/js/namespace',
'base/js/utils',
'jquery',
'tree/js/notebooklist',
], function(IPython, utils, $, notebooklist) {
], function(IPython, utils, notebooklist) {
"use strict";
var TerminalList = function (selector, options) {

@ -16,6 +16,10 @@
{% endblock %}
<link rel="stylesheet" href="{{ base_url }}custom/custom.css" type="text/css" />
<script src="{{static_url("components/es6-promise/promise.min.js")}}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("components/jquery/jquery.min.js") }}" type="text/javascript" charset="utf-8"></script> <!-- window.$ -->
<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/requirejs/require.js") }}" type="text/javascript" charset="utf-8"></script>
<script>
require.config({

Loading…
Cancel
Save