commit/galaxy-central: carlfeberhard: Fix to 31f05a1: restore event handler code based on builtin v. registry
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/18e4aea56a74/ Changeset: 18e4aea56a74 User: carlfeberhard Date: 2014-11-13 21:53:43+00:00 Summary: Fix to 31f05a1: restore event handler code based on builtin v. registry Affected #: 2 files diff -r 6f0438d759afd9c36dd80755fa41f145cf370231 -r 18e4aea56a74618c69b6407a52af03ce179c914b templates/webapps/galaxy/page/display.mako --- a/templates/webapps/galaxy/page/display.mako +++ b/templates/webapps/galaxy/page/display.mako @@ -10,8 +10,11 @@ // (b) ... $('.embedded-item').each( function() { var container = $(this); - if( container.hasClass( 'history' ) - || container.hasClass( 'visualization' ) ){ return; } + if( container.hasClass( 'history' ) ){ return; } + //note: we can't do the same override for visualizations + // bc builtins (like trackster) need the handlers/ajax below to work. + // instead: (for registry visualizations) we'll clear the handlers below + // and add new ones (in embed_in_frame.mako) ...ugh. // Show embedded item. var show_embedded_item = function() { diff -r 6f0438d759afd9c36dd80755fa41f145cf370231 -r 18e4aea56a74618c69b6407a52af03ce179c914b templates/webapps/galaxy/visualization/embed_in_frame.mako --- a/templates/webapps/galaxy/visualization/embed_in_frame.mako +++ b/templates/webapps/galaxy/visualization/embed_in_frame.mako @@ -61,7 +61,7 @@ /** 4 elements change when expanding - toggle them all, add the iframe and prevent the url change */ function toggleExpanded( ev ){ var $embeddedObj = $( thisScript ).prev(); - $embeddedObj.find( '.expand-content-btn' ).toggleClass( 'toggle-expand' ).toggleClass( 'toggle' ); + $embeddedObj.find( '.expand-content-btn' ).toggleClass( 'toggle-expand' ).toggleClass( 'toggle' ).show(); $embeddedObj.find( ".summary-content" ).slideToggle( "fast" ); $embeddedObj.find( ".annotation" ).slideToggle( "fast" ); $embeddedObj.find( ".expanded-content" ).slideToggle( "fast" ); @@ -71,8 +71,10 @@ // add expansion to +/- btn and title $(function(){ - $embeddedObj.find( '.expand-content-btn' ).click( toggleExpanded ); - $embeddedObj.find( '.toggle-embed' ).click( toggleExpanded ); + var $embeddedObj = $( thisScript ).prev(); + // clear the handlers (w/ off) created in page/display/mako for visualizations + $embeddedObj.find( '.expand-content-btn' ).off().click( toggleExpanded ); + $embeddedObj.find( '.toggle-embed' ).off().click( toggleExpanded ); }); })(); </script> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org