There's now a link to the trash in the "This note has been moved to the trash." message.
This commit is contained in:
parent
c7d4643264
commit
ce4c49d87e
|
@ -655,7 +655,10 @@ Wiki.prototype.delete_editor = function ( event, editor ) {
|
||||||
"value": "undo",
|
"value": "undo",
|
||||||
"title": "undo deletion"
|
"title": "undo deletion"
|
||||||
} );
|
} );
|
||||||
this.display_message( "The note has been moved to the trash.", [ undo_button ] )
|
var trash_link = createDOM( "a", {
|
||||||
|
"href": "/notebooks/" + this.notebook.trash.object_id + "?parent_id=" + this.notebook.object_id,
|
||||||
|
}, "trash" );
|
||||||
|
this.display_message( 'The note has been moved to the', [ trash_link, ". ", undo_button ] )
|
||||||
var self = this;
|
var self = this;
|
||||||
connect( undo_button, "onclick", function ( event ) { self.undelete_editor_via_undo( event, editor ); } );
|
connect( undo_button, "onclick", function ( event ) { self.undelete_editor_via_undo( event, editor ); } );
|
||||||
}
|
}
|
||||||
|
@ -853,22 +856,22 @@ Wiki.prototype.display_all_notes_list = function ( result ) {
|
||||||
this.create_editor( "all_notes", "<h3>all notes</h3>" + list.innerHTML, undefined, undefined, undefined, false, true, true );
|
this.create_editor( "all_notes", "<h3>all notes</h3>" + list.innerHTML, undefined, undefined, undefined, false, true, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.display_message = function ( text, buttons ) {
|
Wiki.prototype.display_message = function ( text, nodes ) {
|
||||||
this.clear_messages();
|
this.clear_messages();
|
||||||
this.clear_pulldowns();
|
this.clear_pulldowns();
|
||||||
|
|
||||||
var inner_div = DIV( { "class": "message_inner" }, text + " " );
|
var inner_div = DIV( { "class": "message_inner" }, text + " " );
|
||||||
for ( var i in buttons )
|
for ( var i in nodes )
|
||||||
appendChildNodes( inner_div, buttons[ i ] );
|
appendChildNodes( inner_div, nodes[ i ] );
|
||||||
|
|
||||||
var div = DIV( { "class": "message" }, inner_div );
|
var div = DIV( { "class": "message" }, inner_div );
|
||||||
div.buttons = buttons;
|
div.nodes = nodes;
|
||||||
|
|
||||||
appendChildNodes( "notes", div );
|
appendChildNodes( "notes", div );
|
||||||
ScrollTo( div );
|
ScrollTo( div );
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.display_error = function ( text, buttons ) {
|
Wiki.prototype.display_error = function ( text, nodes ) {
|
||||||
this.clear_messages();
|
this.clear_messages();
|
||||||
this.clear_pulldowns();
|
this.clear_pulldowns();
|
||||||
|
|
||||||
|
@ -881,11 +884,11 @@ Wiki.prototype.display_error = function ( text, buttons ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var inner_div = DIV( { "class": "error_inner" }, text + " " );
|
var inner_div = DIV( { "class": "error_inner" }, text + " " );
|
||||||
for ( var i in buttons )
|
for ( var i in nodes )
|
||||||
appendChildNodes( inner_div, buttons[ i ] );
|
appendChildNodes( inner_div, nodes[ i ] );
|
||||||
|
|
||||||
var div = DIV( { "class": "error" }, inner_div );
|
var div = DIV( { "class": "error" }, inner_div );
|
||||||
div.buttons = buttons;
|
div.nodes = nodes;
|
||||||
|
|
||||||
appendChildNodes( "notes", div );
|
appendChildNodes( "notes", div );
|
||||||
ScrollTo( div );
|
ScrollTo( div );
|
||||||
|
@ -898,8 +901,8 @@ Wiki.prototype.clear_messages = function () {
|
||||||
var result = results[ i ];
|
var result = results[ i ];
|
||||||
blindUp( result, options = { "duration": 0.5, afterFinish: function () {
|
blindUp( result, options = { "duration": 0.5, afterFinish: function () {
|
||||||
try {
|
try {
|
||||||
for ( var j in result.buttons )
|
for ( var j in result.nodes )
|
||||||
disconnectAll( result.buttons[ j ] );
|
disconnectAll( result.nodes[ j ] );
|
||||||
removeElement( result );
|
removeElement( result );
|
||||||
} catch ( e ) { }
|
} catch ( e ) { }
|
||||||
} } );
|
} } );
|
||||||
|
|
Reference in New Issue
Block a user