From 51ccb41fd0528a408d72e3b57f50ca29298cae58 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 9 Jun 2008 13:32:27 -0700 Subject: [PATCH] Fix for a bug in which "toolbar/small/undefined_button.png" was being loaded from the login page. The solution is to bail from update_toolbar() on read-only notebooks. --- static/js/Wiki.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 2a1a1e7..4a76eb7 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -1079,6 +1079,10 @@ Wiki.prototype.update_toolbar = function() { var node_names = null; var link = null; + // a read-only notebook doesn't have a visible toolbar + if ( !this.notebook.read_write ) + return; + if ( this.focused_editor ) { node_names = this.focused_editor.current_node_names(); link = this.focused_editor.find_link_at_cursor();