forked from I2P_Developers/i2p.i2p
i2ptunnel: Move CSS to own dir, remove allowCSS() and allowJS()
This commit is contained in:
@@ -84,8 +84,6 @@ public class IndexBean {
|
||||
/** From CSSHelper */
|
||||
private static final String PROP_DISABLE_OLD = "routerconsole.disableOldThemes";
|
||||
private static final boolean DEFAULT_DISABLE_OLD = true;
|
||||
public static final String PROP_CSS_DISABLED = "routerconsole.css.disabled";
|
||||
public static final String PROP_JS_DISABLED = "routerconsole.javascript.disabled";
|
||||
private static final String PROP_PW_ENABLE = "routerconsole.auth.enable";
|
||||
|
||||
public IndexBean() {
|
||||
@@ -349,17 +347,9 @@ public class IndexBean {
|
||||
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
||||
theme = "light";
|
||||
}
|
||||
return "/themes/console/" + theme + "/";
|
||||
return "/themes/i2ptunnel/" + theme + "/";
|
||||
}
|
||||
|
||||
public boolean allowCSS() {
|
||||
return !_context.getBooleanProperty(PROP_CSS_DISABLED);
|
||||
}
|
||||
|
||||
public boolean allowJS() {
|
||||
return !_context.getBooleanProperty(PROP_JS_DISABLED);
|
||||
}
|
||||
|
||||
public int getTunnelCount() {
|
||||
if (_group == null) return 0;
|
||||
return _group.getControllers().size();
|
||||
|
||||
@@ -37,12 +37,8 @@ if (tun != null) {
|
||||
<title><%=intl._t("Hidden Services Manager")%> - <%=(__isClient ? intl._t("Edit Client Tunnel") : intl._t("Edit Hidden Service"))%></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
|
||||
|
||||
<% if (editBean.allowCSS()) {
|
||||
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
|
||||
<% }
|
||||
%>
|
||||
<style type='text/css'>
|
||||
input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||
</style>
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
</td>
|
||||
</tr><tr>
|
||||
<%
|
||||
String aStopFirst = intl._t("Tunnel and all other shared client tunnels must be stopped to change this configuration");
|
||||
String bStopFirst = intl._t("Tunnel must be stopped to change this configuration");
|
||||
String aStopFirst = intl._t("The client tunnel and all other shared client tunnels must be stopped to change this setting");
|
||||
String bStopFirst = intl._t("The client tunnel must be stopped to change this setting");
|
||||
String stopFirst = editBean.isSharedClient(curTunnel) ? aStopFirst : bStopFirst;
|
||||
boolean canChangePort = editBean.canChangePort(curTunnel);
|
||||
String tastopFirst = " title=\"" + aStopFirst + "\" ";
|
||||
@@ -688,7 +688,7 @@
|
||||
<td class="buttons" colspan="2">
|
||||
<input type="hidden" value="true" name="removeConfirm" />
|
||||
<button id="controlCancel" class="control" type="submit" name="action" value=""><%=intl._t("Cancel")%></button>
|
||||
<button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>class="control" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button>
|
||||
<button id="controlDelete" onclick="if (!confirm('Are you sure you want to delete?')) { return false; }" class="control" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button>
|
||||
<button id="controlSave" class="control" type="submit" name="action" value="Save changes"><%=intl._t("Save")%></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</td>
|
||||
</tr><tr>
|
||||
<%
|
||||
String stopFirst = intl._t("Tunnel must be stopped to change this configuration");
|
||||
String stopFirst = intl._t("The hidden service must be stopped to change this setting");
|
||||
String tstopFirst = " title=\"" + stopFirst + "\" ";
|
||||
boolean canChangeDest = editBean.canChangePort(curTunnel);
|
||||
boolean isStreamrServer = "streamrserver".equals(tunnelType);
|
||||
@@ -1015,7 +1015,7 @@
|
||||
<td class="buttons" colspan="2">
|
||||
<input type="hidden" value="true" name="removeConfirm" />
|
||||
<button id="controlCancel" class="control" type="submit" name="action" value=""><%=intl._t("Cancel")%></button>
|
||||
<button id="controlDelete" <%=(editBean.allowJS() ? "onclick=\"if (!confirm('Are you sure you want to delete?')) { return false; }\" " : "")%>class="control" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button>
|
||||
<button id="controlDelete" onclick="if (!confirm('Are you sure you want to delete?')) { return false; }" class="control" type="submit" name="action" value="Delete this proxy" title="<%=intl._t("Delete this Proxy (cannot be undone)")%>"><%=intl._t("Delete")%></button>
|
||||
<button id="controlSave" class="control" type="submit" name="action" value="Save changes"><%=intl._t("Save")%></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -10,15 +10,10 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><%=intl._t("Hidden Services Manager")%></title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
|
||||
|
||||
<% if (indexBean.allowCSS()) {
|
||||
%><link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" />
|
||||
<link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" />
|
||||
<link href="<%=indexBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
|
||||
<% }
|
||||
%>
|
||||
</head><body id="tunnelListPage">
|
||||
<div class="panel" id="overview"><h2><%=intl._t("Hidden Services Manager")%></h2><p>
|
||||
<%=intl._t("These are the local services provided by your router.")%>
|
||||
|
||||
@@ -27,12 +27,8 @@
|
||||
<title><%=intl._t("Hidden Services Manager")%> - <%=intl._t("Registration Helper")%></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
|
||||
|
||||
<% if (editBean.allowCSS()) {
|
||||
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
|
||||
<% }
|
||||
%>
|
||||
<style type='text/css'>
|
||||
input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||
</style>
|
||||
|
||||
@@ -26,11 +26,8 @@
|
||||
<title><%=intl._t("Hidden Services Manager")%> - <%=intl._t("SSL Helper")%></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
|
||||
<% if (editBean.allowCSS()) {
|
||||
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
|
||||
<% }
|
||||
%>
|
||||
<style type='text/css'>
|
||||
input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||
</style>
|
||||
|
||||
@@ -44,15 +44,10 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><%=intl._t("I2P Tunnel Manager - Tunnel Creation Wizard")%></title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
|
||||
|
||||
<% if (editBean.allowCSS()) {
|
||||
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
|
||||
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
|
||||
<% }
|
||||
%>
|
||||
</head>
|
||||
<body id="tunnelWizardPage">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user