witten
/
luminotes
Archived
1
0
Fork 0

Show list of all notes on startup if there are no startup notes and the

notebook isn't empty.
This commit is contained in:
Dan Helfman 2008-03-11 04:52:23 +00:00
parent c0cf5892be
commit 7c51c02928
2 changed files with 18 additions and 2 deletions

4
NEWS
View File

@ -1,3 +1,7 @@
1.2.9: March 10, 2008
* Show list of all notes on startup if there are no startup notes and the
notebook isn't empty.
1.2.8: March 10, 2008
* No longer popping up a link info box when clicking on a note link.

View File

@ -1328,8 +1328,11 @@ Wiki.prototype.display_all_notes_list = function ( result ) {
// build up a list of all notes in this notebook, one link per note
var list = createDOM( "ul", { "id": "notes_list" } );
if ( this.focused_editor )
appendChildNodes( list, this.create_all_notes_link( this.focused_editor.id, this.focused_editor.title || "untitled note" ) );
if ( this.focused_editor ) {
var focused_title = this.focused_editor.title;
if ( focused_title != "all notes" && focused_title != "search results" && focused_title != "share this notebook" )
appendChildNodes( list, this.create_all_notes_link( this.focused_editor.id, this.focused_editor.title || "untitled note" ) );
}
for ( var i in result.notes ) {
var note_tuple = result.notes[ i ]
@ -1675,6 +1678,15 @@ Wiki.prototype.display_empty_message = function ( replace_messages ) {
return true;
}
if ( !replace_messages ) {
var self = this;
this.invoker.invoke(
"/notebooks/all_notes", "GET", { "notebook_id": this.notebook.object_id },
function( result ) { self.display_all_notes_list( result ); }
);
return true;
}
return false;
}