Skip to content

Commit

Permalink
Merge pull request #3728 from martenson/backport-masthead-fix
Browse files Browse the repository at this point in the history
[16.10] backport of webhook masthead fix for datalibs and workflows
  • Loading branch information
jmchilton committed Mar 9, 2017
2 parents b41b8e3 + 02f3a27 commit 1b9a286
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 26 deletions.
26 changes: 19 additions & 7 deletions client/galaxy/scripts/layout/menu.js
Expand Up @@ -117,13 +117,25 @@ var Collection = Backbone.Collection.extend({
$.each(webhooks.models, function(index, model) {
var webhook = model.toJSON();
if (webhook.activate) {
Galaxy.page.masthead.collection.add({
id : webhook.name,
icon : webhook.config.icon,
url : webhook.config.url,
tooltip : webhook.config.tooltip,
onclick : webhook.config.function && new Function(webhook.config.function),
});
// Galaxy.page is undefined for data libraries, workflows pages
if( Galaxy.page ) {
Galaxy.page.masthead.collection.add({
id : webhook.name,
icon : webhook.config.icon,
url : webhook.config.url,
tooltip : webhook.config.tooltip,
onclick : webhook.config.function && new Function(webhook.config.function),
});
}
else if( Galaxy.masthead ) {
Galaxy.masthead.collection.add({
id : webhook.name,
icon : webhook.config.icon,
url : webhook.config.url,
tooltip : webhook.config.tooltip,
onclick : webhook.config.function && new Function(webhook.config.function),
});
}
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion static/maps/layout/menu.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b9a286

Please sign in to comment.