Fixed broken revisions list under "changes" button.
I really need client-side Javascript unit tests to catch exactly these sorts of regressions.
This commit is contained in:
parent
094323ee58
commit
2dcd3e1483
|
@ -206,20 +206,28 @@ Wiki.prototype.load_editor = function ( note_title, from_iframe_id, note_id, rev
|
||||||
// if the note corresponding to the link's id is already open, highlight it and bail, but only if
|
// if the note corresponding to the link's id is already open, highlight it and bail, but only if
|
||||||
// we didn't pull a title from an open link pulldown
|
// we didn't pull a title from an open link pulldown
|
||||||
if ( !pulldown_title ) {
|
if ( !pulldown_title ) {
|
||||||
var iframe = getElement( "note_" + note_id );
|
if ( revision )
|
||||||
|
var iframe = getElement( "note_" + note_id + " " + revision );
|
||||||
|
else
|
||||||
|
var iframe = getElement( "note_" + note_id );
|
||||||
|
|
||||||
if ( iframe ) {
|
if ( iframe ) {
|
||||||
iframe.editor.highlight();
|
iframe.editor.highlight();
|
||||||
link.href = "/notebooks/" + this.notebook_id + "?note_id=" + note_id;
|
if ( link )
|
||||||
|
link.href = "/notebooks/" + this.notebook_id + "?note_id=" + note_id;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the note corresponding to the link's title is already open, highlight it and bail
|
// if the note corresponding to the link's title is already open, highlight it and bail
|
||||||
var editor = this.open_editors[ note_title ];
|
if ( !revision ) {
|
||||||
if ( editor ) {
|
var editor = this.open_editors[ note_title ];
|
||||||
editor.highlight();
|
if ( editor ) {
|
||||||
link.href = "/notebooks/" + this.notebook_id + "?note_id=" + editor.id;
|
editor.highlight();
|
||||||
return;
|
if ( link )
|
||||||
|
link.href = "/notebooks/" + this.notebook_id + "?note_id=" + editor.id;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there's not a valid destination note id, then load by title instead of by id
|
// if there's not a valid destination note id, then load by title instead of by id
|
||||||
|
|
Reference in New Issue