witten
/
luminotes
Archived
1
0
Fork 0

Fixed bug where clicking "all notes" in an empty notebook didn't show a message that the notebook is empty.

This commit is contained in:
Dan Helfman 2007-11-18 23:06:51 +00:00
parent 86322f4358
commit 079f7e6f98
1 changed files with 11 additions and 9 deletions

View File

@ -1152,7 +1152,7 @@ Wiki.prototype.display_all_notes_list = function ( result ) {
this.clear_messages();
this.clear_pulldowns();
if ( this.display_empty_message() == true )
if ( this.display_empty_message( true ) == true )
return;
if ( this.all_notes_editor )
@ -1307,21 +1307,23 @@ Wiki.prototype.delete_all_editors = function ( event ) {
}
this.zero_total_notes_count();
this.display_empty_message();
this.display_empty_message( true );
event.stop();
}
Wiki.prototype.display_empty_message = function () {
Wiki.prototype.display_empty_message = function ( replace_messages ) {
var iframes = getElementsByTagAndClassName( "iframe", "note_frame" );
// if there are any messages already open, bail
var messages = getElementsByTagAndClassName( "div", "message" );
if ( messages.length > 0 ) return false;
if ( !replace_messages ) {
// if there are any messages already open, bail
var messages = getElementsByTagAndClassName( "div", "message" );
if ( messages.length > 0 ) return false;
// if there are any errors open, bail
var errors = getElementsByTagAndClassName( "div", "error" );
if ( errors.length > 0 ) return false;
// if there are any errors open, bail
var errors = getElementsByTagAndClassName( "div", "error" );
if ( errors.length > 0 ) return false;
}
// if there are any open editors, bail
for ( var i in iframes ) {