mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-14 04:01:58 +01:00
Removed Deprecated Html Enums
This commit is contained in:
parent
1baa4d14c0
commit
a86230b750
@ -30,7 +30,6 @@ public enum Html {
|
||||
COLOR_F("<span class=\"white\">"),
|
||||
//
|
||||
FONT_AWESOME_ICON("<i class=\"fa fa-${0}\" aria-hidden=\"true\"></i>"),
|
||||
@Deprecated MINOTAR_SMALL_IMG("<img style=\"float: left; padding: 2px 2px 0px 2px\" alt=\"${0}\" src=\"https://minotar.net/avatar/${0}/19\">"),
|
||||
SPAN("${0}</span>"),
|
||||
BUTTON("<a class=\"button\" href=\"${0}\">${1}</a>"),
|
||||
BUTTON_CLASS("class=\"button\""),
|
||||
@ -38,11 +37,6 @@ public enum Html {
|
||||
LINK_EXTERNAL("<a class=\"link\" target=\"_blank\" href=\"${0}\">${1}</a>"),
|
||||
LINK_CLASS("class=\"link\""),
|
||||
IMG("<img src=\"${0}\">"),
|
||||
@Deprecated COLUMNS_DIV_WRAPPER("<div class=\"columns\">${0}</div>"),
|
||||
@Deprecated COLUMN_DIV_WRAPPER("<div class=\"about box column\">${0}</div>"),
|
||||
@Deprecated HEADER("<div class=\"headerbox\" style=\"width: 95%;\"><div class=\"header-icon\"><div class=\"header-label\"><i class=\"fa fa-cube\" aria-hidden=\"true\"></i><span class=\"header-text\"> ${0}</span></div></div></div>"),
|
||||
@Deprecated PLUGIN_DATA_WRAPPER("<div class=\"plugin-data\">${0}</div>"),
|
||||
@Deprecated PLUGIN_CONTAINER_START("<div class=\"plugin-container\">"),
|
||||
//
|
||||
TABLE_START_2("<table class=\"sortable table\"><thead><tr><th>${0}</th><th>${1}</th></tr></thead><tbody>"),
|
||||
TABLE_START_3("<table class=\"sortable table\"><thead><tr><th>${0}</th><th>${1}</th><th>${2}</th></tr></thead><tbody>"),
|
||||
@ -57,8 +51,7 @@ public enum Html {
|
||||
TABLELINE_PLAYERS("<tr><td>${0}</td><td>${1}</td><td sorttable_customkey=\"${2}\">${3}</td><td>${4}</td><td sorttable_customkey=\"${5}\">${6}</td>" + "<td sorttable_customkey=\"${7}\">${8}</td><td>${9}</td></tr>"),
|
||||
TABLELINE_3_CUSTOMKEY("<tr><td sorttable_customkey=\"${0}\">${1}</td><td sorttable_customkey=\"${2}\">${3}</td><td sorttable_customkey=\"${4}\">${5}</td></tr>"),
|
||||
TABLELINE_3_CUSTOMKEY_1("<tr><td sorttable_customkey=\"${0}\">${1}</td><td>${2}</td><td>${3}</td></tr>"),
|
||||
@Deprecated ERROR_TABLE_2(TABLELINE_2.parse("No data", "No data")),
|
||||
TABLE_END("</tbody></table>"); // KILLDATA_NONE("No Kills"),
|
||||
TABLE_END("</tbody></table>");
|
||||
|
||||
private final String html;
|
||||
|
||||
|
@ -2,8 +2,6 @@ package main.java.com.djrapitops.plan.utilities.html;
|
||||
|
||||
import main.java.com.djrapitops.plan.Plan;
|
||||
import main.java.com.djrapitops.plan.Settings;
|
||||
import main.java.com.djrapitops.plan.locale.Locale;
|
||||
import main.java.com.djrapitops.plan.locale.Msg;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.WebServer;
|
||||
import main.java.com.djrapitops.plan.utilities.file.FileUtil;
|
||||
import org.apache.commons.lang.text.StrSubstitutor;
|
||||
@ -120,7 +118,7 @@ public class HtmlUtils {
|
||||
* @param placeholders
|
||||
* @return
|
||||
*/
|
||||
// TODO REWRITE
|
||||
@Deprecated // TODO Move to HtmlStructure
|
||||
public static String getPluginsTabLayout(List<String> pluginNames, Map<String, List<String>> placeholders) {
|
||||
boolean sizeIsEvenNumber = pluginNames.size() % 2 == 0;
|
||||
StringBuilder html = new StringBuilder();
|
||||
@ -129,33 +127,34 @@ public class HtmlUtils {
|
||||
for (int i = 0; i < evenSize; i++) {
|
||||
String name = pluginNames.get(i);
|
||||
if (i % 2 == 0) {
|
||||
temp = Html.COLUMN_DIV_WRAPPER.parse(getContent(name, placeholders.get(name)));
|
||||
// temp = Html.COLUMN_DIV_WRAPPER.parse(getContent(name, placeholders.get(name)));
|
||||
} else {
|
||||
html.append(Html.COLUMNS_DIV_WRAPPER.parse(temp + Html.COLUMN_DIV_WRAPPER.parse(getContent(name, placeholders.get(name)))));
|
||||
// html.append(Html.COLUMNS_DIV_WRAPPER.parse(temp + Html.COLUMN_DIV_WRAPPER.parse(getContent(name, placeholders.get(name)))));
|
||||
}
|
||||
}
|
||||
if (!sizeIsEvenNumber) {
|
||||
int lastIndex = pluginNames.size() - 1;
|
||||
String name = pluginNames.get(lastIndex);
|
||||
html.append(Html.COLUMNS_DIV_WRAPPER.parse(Html.COLUMN_DIV_WRAPPER.parse(getContent(name, placeholders.get(name))) + Html.COLUMN_DIV_WRAPPER.parse("")));
|
||||
// html.append(Html.COLUMNS_DIV_WRAPPER.parse(Html.COLUMN_DIV_WRAPPER.parse(getContent(name, placeholders.get(name))) + Html.COLUMN_DIV_WRAPPER.parse("")));
|
||||
}
|
||||
String returnValue = html.toString();
|
||||
if (returnValue.isEmpty()) {
|
||||
return Html.COLUMNS_DIV_WRAPPER.parse(
|
||||
Html.COLUMN_DIV_WRAPPER.parse(
|
||||
Html.PLUGIN_DATA_WRAPPER.parse(
|
||||
Locale.get(Msg.HTML_NO_PLUGINS).toString()
|
||||
)
|
||||
)
|
||||
);
|
||||
// return Html.COLUMNS_DIV_WRAPPER.parse(
|
||||
// Html.COLUMN_DIV_WRAPPER.parse(
|
||||
// Html.PLUGIN_DATA_WRAPPER.parse(
|
||||
// Locale.get(Msg.HTML_NO_PLUGINS).toString()
|
||||
// )
|
||||
// )
|
||||
// );
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@Deprecated // TODO Move to HtmlStructure
|
||||
private static String getContent(String name, List<String> placeholders) {
|
||||
StringBuilder html = new StringBuilder();
|
||||
html.append(Html.HEADER.parse(name));
|
||||
html.append(Html.PLUGIN_CONTAINER_START.parse());
|
||||
// html.append(Html.HEADER.parse(name));
|
||||
// html.append(Html.PLUGIN_CONTAINER_START.parse());
|
||||
placeholders.forEach(html::append);
|
||||
html.append("</div>");
|
||||
return html.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user