Added 'More Info' links to the descriptions of many operations for #265

This commit is contained in:
George J 2018-05-05 00:43:42 +01:00
parent 403296cc59
commit c7f13ff67f
3 changed files with 108 additions and 2 deletions

View file

@ -20,6 +20,7 @@ const HTMLOperation = function(name, config, app, manager) {
this.name = name;
this.description = config.description;
this.infoURL = config.infoURL;
this.manualBake = config.manualBake || false;
this.config = config;
this.ingList = [];
@ -50,8 +51,14 @@ HTMLOperation.prototype.toStubHtml = function(removeIcon) {
let html = "<li class='operation'";
if (this.description) {
let popoverContent = this.description;
if (this.infoURL) {
popoverContent += "<hr><a href='" + this.infoURL + "' target='_blank'>More Information</a>";
}
html += " data-container='body' data-toggle='popover' data-placement='auto right'\
data-content=\"" + this.description + "\" data-html='true' data-trigger='hover'";
data-content=\"" + popoverContent + "\" data-html='true' data-trigger='hover'";
}
html += ">" + this.name;