mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Improve ajax deleting refreshing of dataset contents.
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user