Add refresh handling

This commit is contained in:
guerler
2017-06-07 09:18:29 -04:00
parent 14345a4232
commit b0fb99c080
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -339,7 +339,8 @@ class Grid( object ):
'default_filter_dict' : self.default_filter,
'advanced_search' : self.advanced_search,
'info_text' : self.info_text,
'url' : url(dict())
'url' : url(dict()),
'refresh_frames' : kwargs.get( 'refresh_frames', [] )
}
if current_item:
grid_config['current_item_id'] = current_item.id
@@ -502,7 +502,7 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesItemRatings, Uses
status, message = trans.webapp.controllers['history']._list_switch( trans, histories )
# Current history changed, refresh history frame; if switching to a dataset, set hda seek.
trans.template_context['refresh_frames'] = ['history']
kwargs['refresh_frames'] = ['history']
if operation == "switch":
hda_ids = [ trans.security.encode_id( hda.id ) for hda in hdas ]
trans.template_context[ 'seek_hda_ids' ] = hda_ids
@@ -518,7 +518,7 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesItemRatings, Uses
status, message = self._copy_datasets( trans, hda_ids, target_histories )
# Current history changed, refresh history frame.
trans.template_context['refresh_frames'] = ['history']
kwargs['refresh_frames'] = ['history']
# Render the list view
kwargs[ 'dict_format' ] = True