diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 64e14ae..3c1376b 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -206,7 +206,8 @@ Wiki.prototype.populate = function ( result ) { connect( "insertUnorderedList", "onclick", function ( event ) { self.toggle_button( event, "insertUnorderedList" ); } ); connect( "insertOrderedList", "onclick", function ( event ) { self.toggle_button( event, "insertOrderedList" ); } ); connect( "createLink", "onclick", this, "toggle_link_button" ); - connect( "newNote", "onclick", this, "create_blank_editor" ); + connect( "newNote", "onmousedown", function ( event ) { addElementClass( "newNote", "button_down" ); } ); + connect( "newNote", "onmouseup", this, "create_blank_editor" ); // grab the next available object id this.invoker.invoke( "/next_id", "POST", null, @@ -265,6 +266,8 @@ Wiki.prototype.background_clicked = function ( event ) { Wiki.prototype.create_blank_editor = function ( event ) { if ( event ) event.stop(); + removeElementClass( "newNote", "button_down" ); + // if we're within the trash, don't allow new note creation if ( this.notebook.name == "trash" ) { this.display_error( "You can't create notes in the trash." );