mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #3349 from bgruening/mastheadwebhookextend
Masthead Webhook bug fix
This commit is contained in:
@@ -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
Reference in New Issue
Block a user