Merge pull request #3349 from bgruening/mastheadwebhookextend

Masthead Webhook bug fix
This commit is contained in:
Dannon Baker
2016-12-28 21:06:05 -05:00
committed by GitHub
5 changed files with 38 additions and 26 deletions
+19 -7
View File
@@ -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),
});
}
}
});
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long