implement more restrictive selector, use jquery each isntead of _

thanks to jmchilton and dannon
This commit is contained in:
Martin Cech
2017-12-20 13:23:28 -05:00
parent 40a5ddde01
commit cb9fe3efe8
6 changed files with 12 additions and 9 deletions
@@ -268,8 +268,11 @@ define( [ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view
_templateHelp: function( options ) {
var $tmpl = $( '<div/>' ).addClass( 'ui-form-help' ).append( options.help );
$tmpl.find( 'a' ).attr( 'target', '_blank' );
_.each($tmpl.find("img"), function(img) {
$(img).attr("src", Galaxy.root + $(img).attr("src"));
$tmpl.find("img").each( function() {
var img_src = $(this).attr("src");
if (img_src.indexOf("admin_toolshed") !== -1){
$(this).attr("src", Galaxy.root + img_src);
}
});
return $tmpl;
},