Now ignoring link clicks that are with the right or middle mouse buttons.
This commit is contained in:
parent
ccc1cc2f2d
commit
35459270be
|
@ -250,6 +250,10 @@ Editor.prototype.key_released = function ( event ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Editor.prototype.mouse_clicked = function ( event ) {
|
Editor.prototype.mouse_clicked = function ( event ) {
|
||||||
|
// we only want to deal with left mouse button clicks
|
||||||
|
if ( event.mouse().button.middle || event.mouse().button.right )
|
||||||
|
return;
|
||||||
|
|
||||||
event.stop();
|
event.stop();
|
||||||
signal( this, "state_changed", this );
|
signal( this, "state_changed", this );
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,8 @@ function Wiki() {
|
||||||
if ( this.notebook_id ) {
|
if ( this.notebook_id ) {
|
||||||
this.invoker.invoke(
|
this.invoker.invoke(
|
||||||
"/notebooks/contents", "GET", {
|
"/notebooks/contents", "GET", {
|
||||||
"notebook_id": this.notebook_id
|
"notebook_id": this.notebook_id,
|
||||||
|
"note_id": getElement( "note_id" ).value
|
||||||
},
|
},
|
||||||
function( result ) { self.populate( result ); }
|
function( result ) { self.populate( result ); }
|
||||||
);
|
);
|
||||||
|
@ -121,9 +122,17 @@ Wiki.prototype.populate = function ( result ) {
|
||||||
var note = this.notebook.startup_notes[ i ];
|
var note = this.notebook.startup_notes[ i ];
|
||||||
if ( !note ) continue;
|
if ( !note ) continue;
|
||||||
this.startup_notes[ note.object_id ] = true;
|
this.startup_notes[ note.object_id ] = true;
|
||||||
var focus = ( i == 0 );
|
|
||||||
this.create_editor( note.object_id, note.contents, note.revisions_list, undefined, undefined, false, focus );
|
// don't actually create an editor if a particular note was provided in the result
|
||||||
|
if ( !result.note ) {
|
||||||
|
var focus = ( i == 0 );
|
||||||
|
this.create_editor( note.object_id, note.contents, note.revisions_list, undefined, undefined, false, focus );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if one particular note was provided, then just display an editor for that note
|
||||||
|
if ( result.note )
|
||||||
|
this.create_editor( result.note.object_id, result.note.contents, result.note.revisions_list, undefined, undefined, false, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.background_clicked = function ( event ) {
|
Wiki.prototype.background_clicked = function ( event ) {
|
||||||
|
@ -575,7 +584,7 @@ Pulldown.prototype.shutdown = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Options_pulldown = function ( notebook_id, invoker, editor ) {
|
function Options_pulldown( notebook_id, invoker, editor ) {
|
||||||
Pulldown.call( this, notebook_id, "options_" + editor.id, editor.options_button );
|
Pulldown.call( this, notebook_id, "options_" + editor.id, editor.options_button );
|
||||||
|
|
||||||
this.invoker = invoker;
|
this.invoker = invoker;
|
||||||
|
@ -620,7 +629,7 @@ Options_pulldown.prototype.shutdown = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Changes_pulldown = function ( notebook_id, invoker, editor ) {
|
function Changes_pulldown( notebook_id, invoker, editor ) {
|
||||||
Pulldown.call( this, notebook_id, "changes_" + editor.id, editor.changes_button );
|
Pulldown.call( this, notebook_id, "changes_" + editor.id, editor.changes_button );
|
||||||
|
|
||||||
this.invoker = invoker;
|
this.invoker = invoker;
|
||||||
|
|
Reference in New Issue
Block a user