From 05b79d357ac6ecbcbed4ad731a27152fb152b789 Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Fri, 7 Oct 2011 11:47:00 -0400 Subject: [PATCH] Grid UI fixes: (a) make operation buttons work after refresh and (b) show message each time. --- templates/grid_base.mako | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/grid_base.mako b/templates/grid_base.mako index 7ea91674f0d..48668e61c4c 100644 --- a/templates/grid_base.mako +++ b/templates/grid_base.mako @@ -116,8 +116,8 @@ async_ops['${operation.label.lower()}'] = "True"; %endfor - // Initialize grid controls - function init_grid_controls() { + // Init operation buttons. + var init_operation_buttons = function() { // Initialize operation buttons. $('input[name=operation]:submit').each(function() { $(this).click( function() { @@ -132,6 +132,11 @@ do_operation(webapp, operation_name, item_ids); }); }); + }; + + // Initialize grid controls + function init_grid_controls() { + init_operation_buttons(); // Initialize submit image elements. $('.submit-image').each( function() { @@ -569,6 +574,7 @@ // Init grid. init_grid_elements(); + init_operation_buttons(); make_popup_menus(); // Hide loading overlay. @@ -577,7 +583,7 @@ // Show message if there is one. var message = $.trim( parsed_response_text[2] ); if (message != "") { - $('#grid-message').html( message ); + $('#grid-message').html( message ).show(); setTimeout( function() { $('#grid-message').hide(); }, 5000); } }