From 57e3571e4b6092f4144f6bd202071d837233ba1b Mon Sep 17 00:00:00 2001
From: Gordon Ball <gordon@chronitis.net>
Date: Mon, 7 Nov 2016 19:02:34 +0100
Subject: jquery-ui 1.12 compatibility changes

---
 notebook/static/notebook/js/outputarea.js | 3 ++-
 notebook/static/notebook/js/pager.js      | 3 ++-
 notebook/templates/page.html              | 4 ----
 tools/build-main.js                       | 1 -
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js
index 97d9583..812d01d 100644
--- a/notebook/static/notebook/js/outputarea.js
+++ b/notebook/static/notebook/js/outputarea.js
@@ -2,13 +2,14 @@
 // Distributed under the terms of the Modified BSD License.
 
 define([
+    'jquery',
     '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";
 
     /**
diff --git a/notebook/static/notebook/js/pager.js b/notebook/static/notebook/js/pager.js
index cb9bf32..172ad60 100644
--- a/notebook/static/notebook/js/pager.js
+++ b/notebook/static/notebook/js/pager.js
@@ -2,9 +2,10 @@
 // Distributed under the terms of the Modified BSD License.
 
 define([
+    'jquery',
     'jquery-ui',
     'base/js/utils',
-], function($, utils) {
+], function($, ___, utils) {
     "use strict";
 
     var Pager = function (pager_selector, options) {
diff --git a/notebook/templates/page.html b/notebook/templates/page.html
index 3e03e85..19f69bd 100644
--- a/notebook/templates/page.html
+++ b/notebook/templates/page.html
@@ -66,7 +66,6 @@
             },
             "jquery-ui": {
               deps: ["jquery"],
-              exports: "$"
             }
           },
           waitSeconds: 30,
@@ -92,9 +91,6 @@
           return window.$;
       });
 
-      define("jquery-ui", function () {
-          return window.$;
-      });
       // error-catching custom.js shim.
       define("custom", function (require, exports, module) {
           try {
diff --git a/tools/build-main.js b/tools/build-main.js
index bd0316b..fa8db8a 100644
--- a/tools/build-main.js
+++ b/tools/build-main.js
@@ -53,7 +53,6 @@ var rjs_config = {
     },
     "jquery-ui": {
       deps: ["jquery"],
-      exports: "$"
     }
   },
 
