From 069532b58ceeb1368dd4902ea933fd6db0819ec0 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 27 Jul 2007 00:33:32 +0000 Subject: [PATCH] Reverting to previous revision. Didn't mean to checkin these changes yet, as they're not complete. --- static/js/Wiki.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index dd487d2..1a997ee 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -16,8 +16,7 @@ function Wiki() { if ( this.notebook_id ) { this.invoker.invoke( "/notebooks/contents", "GET", { - "notebook_id": this.notebook_id, - "note_id": getElement( "note_id" ).value + "notebook_id": this.notebook_id }, function( result ) { self.populate( result ); } ); @@ -122,17 +121,9 @@ Wiki.prototype.populate = function ( result ) { var note = this.notebook.startup_notes[ i ]; if ( !note ) continue; this.startup_notes[ note.object_id ] = true; - - // 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 ); - } + 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 ) { @@ -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 ); 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 ); this.invoker = invoker;