diff --git a/client/galaxy/scripts/layout/menu.js b/client/galaxy/scripts/layout/menu.js index c4cc2214a37..5230a2fca2d 100644 --- a/client/galaxy/scripts/layout/menu.js +++ b/client/galaxy/scripts/layout/menu.js @@ -1,5 +1,5 @@ /** Masthead Collection **/ -define(['layout/generic-nav-view', 'mvc/webhooks', 'utils/localization'], function( GenericNav, Webhooks, _l ) { +define(['layout/generic-nav-view', 'mvc/webhooks', 'utils/localization', 'utils/utils'], function( GenericNav, Webhooks, _l, Utils ) { var Collection = Backbone.Collection.extend({ model: Backbone.Model.extend({ defaults: { @@ -137,6 +137,9 @@ var Collection = Backbone.Collection.extend({ else if( Galaxy.masthead ) { Galaxy.masthead.collection.add(obj); } + + // Append masthead script and styles to Galaxy main + Utils.appendScriptStyle( webhook ); } }); }); diff --git a/client/galaxy/scripts/utils/utils.js b/client/galaxy/scripts/utils/utils.js index 82ba71e1843..d9031167736 100644 --- a/client/galaxy/scripts/utils/utils.js +++ b/client/galaxy/scripts/utils/utils.js @@ -277,6 +277,18 @@ define( [], function() { + minutes; }; + /** Append script and style tags to Galaxy main application */ + function appendScriptStyle( data ) { + // create a script tag inside head tag + if( data.script && data.script !== "" ) { + $( '