mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-29 12:37:40 +01:00
Partially implemented possibility of adding help bubbles to Plugin boxes
This commit is contained in:
parent
230e1f2ec3
commit
a800d1cbf8
@ -26,6 +26,8 @@ public abstract class PluginData {
|
|||||||
private String pluginIcon;
|
private String pluginIcon;
|
||||||
private String iconColor;
|
private String iconColor;
|
||||||
|
|
||||||
|
private String helpText;
|
||||||
|
|
||||||
public PluginData(ContainerSize size, String sourcePlugin) {
|
public PluginData(ContainerSize size, String sourcePlugin) {
|
||||||
this.size = size;
|
this.size = size;
|
||||||
this.sourcePlugin = sourcePlugin;
|
this.sourcePlugin = sourcePlugin;
|
||||||
@ -43,6 +45,10 @@ public abstract class PluginData {
|
|||||||
this.iconColor = iconColor;
|
this.iconColor = iconColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final String getHelpText() {
|
||||||
|
return helpText;
|
||||||
|
}
|
||||||
|
|
||||||
public final String parsePluginIcon() {
|
public final String parsePluginIcon() {
|
||||||
return pluginIcon != null ? Html.FA_COLORED_ICON.parse((iconColor != null ? iconColor : "black"), pluginIcon) : Html.FONT_AWESOME_ICON.parse("cube");
|
return pluginIcon != null ? Html.FA_COLORED_ICON.parse((iconColor != null ? iconColor : "black"), pluginIcon) : Html.FONT_AWESOME_ICON.parse("cube");
|
||||||
}
|
}
|
||||||
@ -55,6 +61,10 @@ public abstract class PluginData {
|
|||||||
return sourcePlugin;
|
return sourcePlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected final void setHelpText(String html) {
|
||||||
|
helpText = Html.HELP_BUBBLE.parse(sourcePlugin, html);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object o) {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
|
@ -55,7 +55,7 @@ public enum Html {
|
|||||||
BODY("<div class=\"body\">${0}</div>"),
|
BODY("<div class=\"body\">${0}</div>"),
|
||||||
PANEL("<div class=\"panel panel-default\">${0}</div>"),
|
PANEL("<div class=\"panel panel-default\">${0}</div>"),
|
||||||
PANEL_BODY("<div class=\"panel-body\">${0}</div>"),
|
PANEL_BODY("<div class=\"panel-body\">${0}</div>"),
|
||||||
|
HELP_BUBBLE("<div class=\"col-xs-6 col-sm-6 col-lg-6\"><a href=\"javascript:void(0)\" class=\"help material-icons pull-right\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"left\" data-container=\"body\" data-html=\"true\" data-original-title=\"${0}\" data-content=\"${1}\">help_outline</a></div>"),
|
||||||
//
|
//
|
||||||
TABLE_END("</tbody></table>"),
|
TABLE_END("</tbody></table>"),
|
||||||
TABLE("<table class=\"table table-striped\">"),
|
TABLE("<table class=\"table table-striped\">"),
|
||||||
|
Loading…
Reference in New Issue
Block a user