Show list of all notes on startup if there are no startup notes and the
notebook isn't empty.
This commit is contained in:
parent
c0cf5892be
commit
7c51c02928
4
NEWS
4
NEWS
|
@ -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
|
1.2.8: March 10, 2008
|
||||||
* No longer popping up a link info box when clicking on a note link.
|
* No longer popping up a link info box when clicking on a note link.
|
||||||
|
|
||||||
|
|
|
@ -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
|
// build up a list of all notes in this notebook, one link per note
|
||||||
var list = createDOM( "ul", { "id": "notes_list" } );
|
var list = createDOM( "ul", { "id": "notes_list" } );
|
||||||
if ( this.focused_editor )
|
if ( this.focused_editor ) {
|
||||||
appendChildNodes( list, this.create_all_notes_link( this.focused_editor.id, this.focused_editor.title || "untitled note" ) );
|
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 ) {
|
for ( var i in result.notes ) {
|
||||||
var note_tuple = result.notes[ i ]
|
var note_tuple = result.notes[ i ]
|
||||||
|
@ -1675,6 +1678,15 @@ Wiki.prototype.display_empty_message = function ( replace_messages ) {
|
||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue