Improve ajax deleting refreshing of dataset contents.

This commit is contained in:
Daniel Blankenberg
2008-10-06 11:48:35 -04:00
parent 15c4a863c2
commit 2bb78ef755
2 changed files with 12 additions and 13 deletions
+1 -1
View File
@@ -289,7 +289,7 @@ assign_mapper( context, History, History.table,
properties=dict( galaxy_sessions=relation( GalaxySessionToHistoryAssociation ),
datasets=relation( HistoryDatasetAssociation, backref="history", order_by=asc(HistoryDatasetAssociation.table.c.hid) ),
active_datasets=relation( HistoryDatasetAssociation, primaryjoin=( ( HistoryDatasetAssociation.table.c.history_id == History.table.c.id ) & ( not_( HistoryDatasetAssociation.table.c.deleted ) ) ), order_by=asc( HistoryDatasetAssociation.table.c.hid ), lazy=False, viewonly=True ),
activatable_datasets=relation( HistoryDatasetAssociation, primaryjoin=( ( HistoryDatasetAssociation.table.c.history_id == History.table.c.id ) & ( not_( Dataset.table.c.purged ) ) ), order_by=asc( HistoryDatasetAssociation.table.c.hid ), lazy=False, viewonly=True )
activatable_datasets=relation( HistoryDatasetAssociation, primaryjoin=( ( HistoryDatasetAssociation.table.c.history_id == History.table.c.id ) & ( not_( Dataset.table.c.purged ) ) ), order_by=asc( HistoryDatasetAssociation.table.c.hid ), lazy=True, viewonly=True )
) )
assign_mapper( context, User, User.table,
+11 -12
View File
@@ -91,19 +91,18 @@
url: "${h.url_for( action='delete_async', id='XXX' )}".replace( 'XXX', data_id ),
error: function() { alert( "Delete failed" ) },
success: function() {
if ( "${show_deleted}" == "True" ){
var to_update = {};
to_update[data_id] = "none";
updater( to_update );
%if show_deleted:
var to_update = {};
to_update[data_id] = "none";
updater( to_update );
%else:
q( "#historyItem-" + data_id ).fadeOut( "fast", function() {
q( "div#historyItemContainer-" + data_id ).remove();
if ( q( "div.historyItemContainer" ).length < 1 ) {
q ( "div#emptyHistoryMessage" ).show();
}
else {
q( "#historyItem-" + data_id ).fadeOut( "fast", function() {
q( "div#historyItemContainer-" + data_id ).remove();
if ( q( "div.historyItemContainer" ).length < 1 ) {
q ( "div#emptyHistoryMessage" ).show();
}
});
}
});
%endif
}
});
return false;