-
Notifications
You must be signed in to change notification settings - Fork 999
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9822 from jmchilton/masthead_improvements_1
More reactive, tested Masthead.
- Loading branch information
Showing
9 changed files
with
422 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Webhooks from "mvc/webhooks"; | ||
import Utils from "utils/utils"; | ||
|
||
export function loadWebhookMenuItems(items) { | ||
Webhooks.load({ | ||
type: "masthead", | ||
callback: function (webhooks) { | ||
webhooks.each((model) => { | ||
const webhook = model.toJSON(); | ||
if (webhook.activate) { | ||
const obj = { | ||
id: webhook.id, | ||
icon: webhook.config.icon, | ||
url: webhook.config.url, | ||
tooltip: webhook.config.tooltip, | ||
/*jslint evil: true */ | ||
onclick: webhook.config.function && new Function(webhook.config.function), | ||
visible: true, | ||
target: "_parent", | ||
}; | ||
items.push(obj); | ||
// Append masthead script and styles to Galaxy main | ||
Utils.appendScriptStyle(webhook); | ||
} | ||
}); | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.