Archived
1
0

Reverting to previous revision. Didn't mean to checkin these changes yet, as they're not complete.

This commit is contained in:
Dan Helfman 2007-07-27 00:33:32 +00:00
parent 35459270be
commit 069532b58c

View File

@ -16,8 +16,7 @@ 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 ); }
); );
@ -122,17 +121,9 @@ 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 );
// don't actually create an editor if a particular note was provided in the result this.create_editor( note.object_id, note.contents, note.revisions_list, undefined, undefined, false, focus );
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 ) {
@ -584,7 +575,7 @@ Pulldown.prototype.shutdown = function () {
} }
function Options_pulldown( notebook_id, invoker, editor ) { Options_pulldown = function ( 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;
@ -629,7 +620,7 @@ Options_pulldown.prototype.shutdown = function () {
} }
function Changes_pulldown( notebook_id, invoker, editor ) { Changes_pulldown = function ( 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;