From ab8f837ce95a31d89c8e7033cd2da33a090c5916 Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Fri, 24 Jun 2016 15:23:32 +0200 Subject: [PATCH 1/4] switch from MathJax configuration TeX-AMS_HTML-full to TeX-AMS-MML_HTMLorMML-full --- notebook/base/handlers.py | 2 +- notebook/notebookapp.py | 2 +- setupbase.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 notebook/base/handlers.py mode change 100644 => 100755 notebook/notebookapp.py mode change 100644 => 100755 setupbase.py diff --git a/notebook/base/handlers.py b/notebook/base/handlers.py old mode 100644 new mode 100755 index 9a33f5777..e76992539 --- a/notebook/base/handlers.py +++ b/notebook/base/handlers.py @@ -161,7 +161,7 @@ class IPythonHandler(AuthenticatedHandler): @property def mathjax_config(self): - return self.settings.get('mathjax_config', 'TeX-AMS_HTML-full,Safe') + return self.settings.get('mathjax_config', 'TeX-AMS-MML_HTMLorMML-full,Safe') @property def base_url(self): diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py old mode 100644 new mode 100755 index a0972475c..356413e58 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -762,7 +762,7 @@ class NotebookApp(JupyterApp): else: self.log.info("Using MathJax: %s", new) - mathjax_config = Unicode("TeX-AMS_HTML-full,Safe", config=True, + mathjax_config = Unicode("TeX-AMS-MML_HTMLorMML-full,Safe", config=True, help="""The MathJax.js configuration file that is to be used.""" ) diff --git a/setupbase.py b/setupbase.py old mode 100644 new mode 100755 index 20846aaef..081084b4d --- a/setupbase.py +++ b/setupbase.py @@ -167,7 +167,7 @@ def find_package_data(): mj = lambda *path: pjoin(components, 'MathJax', *path) static_data.extend([ mj('MathJax.js'), - mj('config', 'TeX-AMS_HTML-full.js'), + mj('config', 'TeX-AMS-MML_HTMLorMML-full.js'), mj('config', 'Safe.js'), ]) From fc072a221bc8bf77e86f5b6d235e45a4d84347ad Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Thu, 4 Aug 2016 16:20:58 -0700 Subject: [PATCH 2/4] Display "trusted" and "untrusted" notifications --- .../static/notebook/js/notificationarea.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/notebook/static/notebook/js/notificationarea.js b/notebook/static/notebook/js/notificationarea.js index 33b9ab237..e850af087 100644 --- a/notebook/static/notebook/js/notificationarea.js +++ b/notebook/static/notebook/js/notificationarea.js @@ -24,6 +24,7 @@ define([ NotebookNotificationArea.prototype.init_notification_widgets = function () { this.init_kernel_notification_widget(); this.init_notebook_notification_widget(); + this.init_trusted_notebook_notification_widget(); }; /** @@ -338,5 +339,27 @@ define([ }); }; + /** + * Initialize the notification widget for trusted notebook messages. + * + * @method init_trusted_notebook_notification_widget + */ + NotebookNotificationArea.prototype.init_trusted_notebook_notification_widget = function () { + var that = this; + var tnw = this.widget('trusted'); + + // Notebook trust events + this.events.on('trust_changed.Notebook', function (event, trusted) { + if (trusted) { + tnw.info("Trusted"); + } else { + tnw.danger("Not Trusted", undefined, function() { + that.notebook.trust_notebook(); + return false; + }); + } + }); + }; + return {'NotebookNotificationArea': NotebookNotificationArea}; }); From 055499563cf5347fdcbba5c2cd4a58c58d1f8c7c Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Fri, 5 Aug 2016 09:30:54 -0700 Subject: [PATCH 3/4] Use classic style for trusted notification --- notebook/static/notebook/js/notificationarea.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/js/notificationarea.js b/notebook/static/notebook/js/notificationarea.js index e850af087..36b3dd60d 100644 --- a/notebook/static/notebook/js/notificationarea.js +++ b/notebook/static/notebook/js/notificationarea.js @@ -351,9 +351,9 @@ define([ // Notebook trust events this.events.on('trust_changed.Notebook', function (event, trusted) { if (trusted) { - tnw.info("Trusted"); + tnw.set_message("Trusted"); } else { - tnw.danger("Not Trusted", undefined, function() { + tnw.set_message("Not Trusted", undefined, function() { that.notebook.trust_notebook(); return false; }); From b5552575c97c8d701b62ca249675854e114a63e2 Mon Sep 17 00:00:00 2001 From: Steve Miller Date: Mon, 8 Aug 2016 10:15:38 -0700 Subject: [PATCH 4/4] Update notebookapp.py Typo --- notebook/notebookapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 9a5f3d122..aee89cfcb 100644 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -528,7 +528,7 @@ class NotebookApp(JupyterApp): ) client_ca = Unicode(u'', config=True, - help="""The full path to a certificate authority certifificate for SSL/TLS client authentication.""" + help="""The full path to a certificate authority certificate for SSL/TLS client authentication.""" ) cookie_secret_file = Unicode(config=True,