witten
/
luminotes
Archived
1
0
Fork 0

Fixed incorrect arguments passed to create_editor(), which, among other things, caused hiding "all notes" to yield an error message.

This commit is contained in:
Dan Helfman 2007-10-31 06:41:23 +00:00
parent ad58956f34
commit 6ad00cecf6
1 changed files with 4 additions and 5 deletions

View File

@ -758,7 +758,7 @@ Wiki.prototype.hide_editor = function ( event, editor ) {
this.display_empty_message(); this.display_empty_message();
} else { } else {
// before hiding an editor, save it // before hiding an editor, save it
if ( this.notebook.read_write ) if ( this.notebook.read_write && editor.read_write )
this.save_editor( editor ); this.save_editor( editor );
editor.shutdown(); editor.shutdown();
@ -998,7 +998,7 @@ Wiki.prototype.display_search_results = function ( result ) {
} }
// otherwise, create an editor for the one note // otherwise, create an editor for the one note
this.create_editor( note.object_id, note.contents, note.deleted_from_id, note.revision, this.notebook.read_write, true, true ); this.create_editor( note.object_id, note.contents, note.deleted_from_id, note.revision, undefined, this.notebook.read_write, true, true );
return; return;
} }
@ -1036,7 +1036,7 @@ Wiki.prototype.display_search_results = function ( result ) {
); );
} }
this.search_results_editor = this.create_editor( "search_results", "<h3>search results</h3>" + list.innerHTML, undefined, undefined, false, true, true ); this.search_results_editor = this.create_editor( "search_results", "<h3>search results</h3>" + list.innerHTML, undefined, undefined, undefined, false, true, true );
} }
Wiki.prototype.display_all_notes_list = function ( result ) { Wiki.prototype.display_all_notes_list = function ( result ) {
@ -1069,8 +1069,7 @@ Wiki.prototype.display_all_notes_list = function ( result ) {
} }
var list_holder = createDOM( "div", {}, list ); var list_holder = createDOM( "div", {}, list );
this.all_notes_editor = this.create_editor( "all_notes", "<h3>all notes</h3>" + list_holder.innerHTML, undefined, undefined, false, true, true ); this.all_notes_editor = this.create_editor( "all_notes", "<h3>all notes</h3>" + list_holder.innerHTML, undefined, undefined, undefined, false, true, true );
} }
Wiki.prototype.display_message = function ( text, nodes ) { Wiki.prototype.display_message = function ( text, nodes ) {