From 078d3f5be658c192ef5772777cd82ce16388fc8d Mon Sep 17 00:00:00 2001 From: Ashley Teoh Date: Wed, 28 Feb 2018 22:07:49 -0500 Subject: [PATCH 1/2] add title attributes to widgets and disable clicking trusted button --- notebook/static/notebook/js/notificationarea.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/js/notificationarea.js b/notebook/static/notebook/js/notificationarea.js index 2cebb44b6f..3d85bda2c5 100644 --- a/notebook/static/notebook/js/notificationarea.js +++ b/notebook/static/notebook/js/notificationarea.js @@ -394,12 +394,17 @@ define([ // Notebook trust events this.events.on('trust_changed.Notebook', function (event, trusted) { if (trusted) { - tnw.set_message(i18n.msg._("Trusted")); + tnw.set_message(i18n.msg._("Trusted"), undefined, function() { + return false; + }, {'title':'Javascript enabled for notebook display'}); + // don't allow 'Trusted' button to be clicked + $(tnw.selector).attr('disabled', true) + $(tnw.selector).css( 'cursor', 'help'); } else { tnw.set_message(i18n.msg._("Not Trusted"), undefined, function() { that.notebook.trust_notebook(); return false; - }); + }, {'title':'Javascript disabled for notebook display'}); } }); }; From 978e16a12a00f9dd59babca16e19056d29316516 Mon Sep 17 00:00:00 2001 From: Ashley Teoh Date: Wed, 28 Feb 2018 22:11:04 -0500 Subject: [PATCH 2/2] whitespace --- notebook/static/notebook/js/notificationarea.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/static/notebook/js/notificationarea.js b/notebook/static/notebook/js/notificationarea.js index 3d85bda2c5..c8fadc687b 100644 --- a/notebook/static/notebook/js/notificationarea.js +++ b/notebook/static/notebook/js/notificationarea.js @@ -399,7 +399,7 @@ define([ }, {'title':'Javascript enabled for notebook display'}); // don't allow 'Trusted' button to be clicked $(tnw.selector).attr('disabled', true) - $(tnw.selector).css( 'cursor', 'help'); + $(tnw.selector).css('cursor', 'help'); } else { tnw.set_message(i18n.msg._("Not Trusted"), undefined, function() { that.notebook.trust_notebook();