Skip to content

Commit e9da502

Browse files
authored
Merge pull request #3386 from ashleytqy/trusted-widget-edits
Adding description for 'Trusted' widgets
2 parents 1b99df9 + 978e16a commit e9da502

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

notebook/static/notebook/js/notificationarea.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,17 @@ define([
394394
// Notebook trust events
395395
this.events.on('trust_changed.Notebook', function (event, trusted) {
396396
if (trusted) {
397-
tnw.set_message(i18n.msg._("Trusted"));
397+
tnw.set_message(i18n.msg._("Trusted"), undefined, function() {
398+
return false;
399+
}, {'title':'Javascript enabled for notebook display'});
400+
// don't allow 'Trusted' button to be clicked
401+
$(tnw.selector).attr('disabled', true)
402+
$(tnw.selector).css('cursor', 'help');
398403
} else {
399404
tnw.set_message(i18n.msg._("Not Trusted"), undefined, function() {
400405
that.notebook.trust_notebook();
401406
return false;
402-
});
407+
}, {'title':'Javascript disabled for notebook display'});
403408
}
404409
});
405410
};

0 commit comments

Comments
 (0)