Commit f0b21e86 authored by Ryan Graham's avatar Ryan Graham Committed by ryan

Gateway plugin template html, css, scripts, and images

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4648 b35dd754-fafc-0310-a699-88a17e54d16e
parent 8d7c9c43
...@@ -18,10 +18,18 @@ ...@@ -18,10 +18,18 @@
<!-- Admin console meta-data --> <!-- Admin console meta-data -->
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
<sidebar id="sidebar-server-settings">
<item id="gateway-service" name="IM Gateway" url="gateway-service.jsp" <sidebar id="gateways" name="Gateways" description="Gateway setup">
description="Click to manage the service that provides access to other IM networks" /> <item id="gateway-settings"
name="Settings"
url="gateway-settings.jsp"
description="Click to manage the service that provides access to other IM networks"/>
<item id="gateway-registrations"
name="Registrations"
url="gateway-registrations.jsp"
description="Click to view and manage the user registrations to other IM networks"/>
</sidebar> </sidebar>
</tab> </tab>
</adminconsole> </adminconsole>
</plugin> </plugin>
This diff is collapsed.
<%@ page import="java.util.*,
org.jivesoftware.wildfire.XMPPServer,
org.jivesoftware.util.*,
org.jivesoftware.wildfire.gateway.GatewayPlugin"
errorPage="error.jsp"
%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<html>
<head>
<title>Gateway Settings</title>
<meta name="pageID" content="gateway-settings">
<style type="text/css">
<!-- @import url("style/gateways.css"); -->
</style>
<script language="JavaScript" type="text/javascript" src="scripts/gateways.js"></script>
</head>
<body>
<p>Select which gateways will be allowed, what features are available, and who can connect to each gateway service. Checking a gateway enables the service.</p>
<form action="" name="gatewayForm">
<!-- BEGIN gateway 1 - AIM -->
<div class="jive-gateway" id="jiveAIM">
<label for="jiveAIMcheckbox">
<input type="checkbox" name="gateway" value="aim" id="jiveAIMcheckbox" checked onClick="checkToggle(jiveAIM); return true">
<img src="/images/aim.gif" alt="" border="0">
<strong>AOL Instant Messenger</strong>
</label>
<div class="jive-gatewayButtons">
<a href="#" onclick="togglePanel(jiveAIMoptions,jiveAIMperms); return false" id="jiveAIMoptionsLink"">Options</a>
<a href="#" onclick="togglePanel(jiveAIMperms,jiveAIMoptions); return false" id="jiveAIMpermsLink">Permissions</a>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveAIMoptions" style="display: none;">
<div>
<form action="">
<input type="checkbox" name="filetransfer" value="enabled"> Enable file transfer<br>
<input type="checkbox" name="reconnect" value="enabled"> Reconnect on disconnect<br>
<input type="submit" name="submit" value="Save Options" onclick="togglePanel(jiveAIMoptions,jiveAIMperms); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveAIMoptions,jiveAIMperms); return false" class="jive-formButton">
</form>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveAIMperms" style="display: none;">
<div>
<form action="">
<input type="radio" name="userreg" value="all" checked> All users can register<br>
<input type="radio" name="userreg" value="specific"> These users and/or groups can register<br>
<input type="radio" name="userreg" value="manual"> Manual registration only (see the Registrations section to manage)<br>
<input type="submit" name="submit" value="Save Permissions" onclick="togglePanel(jiveAIMperms,jiveAIMoptions); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveAIMperms,jiveAIMoptions); return false" class="jive-formButton">
</form>
</div>
</div>
<!-- END gateway 1 - AIM -->
<!-- BEGIN gateway 2 - ICQ -->
<div class="jive-gateway" id="jiveICQ">
<label for="jiveICQcheckbox">
<input type="checkbox" name="gateway" value="icq" id="jiveICQcheckbox" checked onClick="checkToggle(jiveICQ); return true">
<img src="/images/icq.gif" alt="" border="0">
<strong>ICQ</strong>
</label>
<div class="jive-gatewayButtons">
<a href="#" onclick="togglePanel(jiveICQoptions,jiveICQperms); return false" id="jiveICQoptionsLink">Options</a>
<a href="#" onclick="togglePanel(jiveICQperms,jiveICQoptions); return false" id="jiveICQpermsLink">Permissions</a>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveICQoptions" style="display: none;">
<div>
<form action="">
<input type="checkbox" name="filetransfer" value="enabled"> Enable file transfer<br>
<input type="checkbox" name="reconnect" value="enabled"> Reconnect on disconnect<br>
<input type="submit" name="submit" value="Save Options" onclick="togglePanel(jiveICQoptions,jiveICQperms); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveICQoptions,jiveICQperms); return false" class="jive-formButton">
</form>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveICQperms" style="display: none;">
<div>
<form action="">
<input type="radio" name="userreg" value="all" checked> All users can register<br>
<input type="radio" name="userreg" value="specific"> These users and/or groups can register<br>
<input type="radio" name="userreg" value="manual"> Manual registration only (see the Registrations section to manage)<br>
<input type="submit" name="submit" value="Save Permissions" onclick="togglePanel(jiveICQperms,jiveICQoptions); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveICQperms,jiveICQoptions); return false" class="jive-formButton">
</form>
</div>
</div>
<!-- END gateway 2 - ICQ -->
<!-- BEGIN gateway 3 - MSN -->
<div class="jive-gateway" id="jiveMSN">
<label for="jiveMSNcheckbox">
<input type="checkbox" name="gateway" value="msn" id="jiveMSNcheckbox" checked onClick="checkToggle(jiveMSN); return true">
<img src="/images/msn.gif" alt="" border="0">
<strong>MSN Messenger</strong>
</label>
<div class="jive-gatewayButtons">
<a href="#" onclick="togglePanel(jiveMSNoptions,jiveMSNperms); return false" id="jiveMSNoptionsLink">Options</a>
<a href="#" onclick="togglePanel(jiveMSNperms,jiveMSNoptions); return false" id="jiveMSNpermsLink">Permissions</a>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveMSNoptions" style="display: none;">
<div>
<form action="">
<input type="checkbox" name="filetransfer" value="enabled"> Enable file transfer<br>
<input type="checkbox" name="reconnect" value="enabled"> Reconnect on disconnect<br>
<input type="submit" name="submit" value="Save Options" onclick="togglePanel(jiveMSNoptions,jiveMSNperms); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveMSNoptions,jiveMSNperms); return false" class="jive-formButton">
</form>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveMSNperms" style="display: none;">
<div>
<form action="">
<input type="radio" name="userreg" value="all" checked> All users can register<br>
<input type="radio" name="userreg" value="specific"> These users and/or groups can register<br>
<input type="radio" name="userreg" value="manual"> Manual registration only (see the Registrations section to manage)<br>
<input type="submit" name="submit" value="Save Permissions" onclick="togglePanel(jiveMSNerms,jiveMSNoptions); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveMSNerms,jiveMSNoptions); return false" class="jive-formButton">
</form>
</div>
</div>
<!-- END gateway 3 - MSN -->
<!-- BEGIN gateway 4 - Yahoo -->
<div class="jive-gateway" id="jiveYAHOO">
<label for="jiveYAHOOcheckbox">
<input type="checkbox" name="gateway" value="yahoo" id="jiveYAHOOcheckbox" checked onClick="checkToggle(jiveYAHOO); return true">
<img src="/images/yahoo.gif" alt="" border="0">
<strong>Yahoo Messenger</strong>
</label>
<div class="jive-gatewayButtons">
<a href="#" onclick="togglePanel(jiveYAHOOoptions,jiveYAHOOperms); return false" id="jiveYAHOOoptionsLink">Options</a>
<a href="#" onclick="togglePanel(jiveYAHOOperms,jiveYAHOOoptions); return false" id="jiveYAHOOpermsLink">Permissions</a>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveYAHOOoptions" style="display: none;">
<div>
<form action="">
<input type="checkbox" name="filetransfer" value="enabled"> Enable file transfer<br>
<input type="checkbox" name="reconnect" value="enabled"> Reconnect on disconnect<br>
<input type="submit" name="submit" value="Save Options" onclick="togglePanel(jiveYAHOOoptions,jiveYAHOOperms); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveYAHOOoptions,jiveYAHOOperms); return false" class="jive-formButton">
</form>
</div>
</div>
<div class="jive-gatewayPanel" id="jiveYAHOOperms" style="display: none;">
<div>
<form action="">
<input type="radio" name="userreg" value="all" checked> All users can register<br>
<input type="radio" name="userreg" value="specific"> These users and/or groups can register<br>
<input type="radio" name="userreg" value="manual"> Manual registration only (see the Registrations section to manage)<br>
<input type="submit" name="submit" value="Save Permissions" onclick="togglePanel(jiveYAHOOerms,jiveYAHOOoptions); return false" class="jive-formButton">
<input type="reset" name="cancel" value="Cancel" onclick="togglePanel(jiveYAHOOerms,jiveYAHOOoptions); return false" class="jive-formButton">
</form>
</div>
</div>
<!-- END gateway 4 - Yahoo -->
<!-- <br clear="all">
<input type="submit" name="submit" value="Save Settings"> -->
</form>
<br clear="all">
</body>
</html>
/*
togglePanel function
This is for showing and hiding the gateway options and permissions panels.
This toggles toggles an individual panel (slides up and down), or switches
between the two if one's already open.
*/
function togglePanel(thisID,thatID) {
activeLink = thisID.id+"Link";
oldLink = thatID.id+"Link";
if ($(thisID).style.display != 'none' && $(thatID).style.display == 'none') {
Effect.toggle($(thisID),'slide', {duration: .4});
$(activeLink).className = "";
} else if ($(thisID).style.display == 'none' && $(thatID).style.display != 'none') {
$(thatID).style.display = 'none';
$(thisID).style.display = 'block';
$(oldLink).className = "";
$(activeLink).className = "jive-gatewayButtonOn";
} else {
Effect.toggle($(thisID),'slide', {duration: .4});
$(activeLink).className = "jive-gatewayButtonOn";
}
}
/*
checkToggle function
this toggles the appearance and options for the gateways. When a user
unchecks a gateway the box goes grey panels aren't accessible.
*/
function checkToggle(theID) {
theCheckbox = theID.id+"checkbox";
optsLink = theID.id+"optionsLink";
permLink = theID.id+"permsLink";
optsPanel = theID.id+"options";
permPanel = theID.id+"perms";
if ($(theCheckbox).checked) {
$(theID).className = "jive-gateway";
$(optsLink).style.display = 'block';
$(permLink).style.display = 'block';
/* the below doesn't work right in IE, work on later */
//$(optsLink).setAttribute('onclick',"togglePanel($(optsPanel),$(permPanel))");
//$(permLink).setAttribute('onclick',"togglePanel($(permPanel),$(optsPanel))");
} else {
$(theID).className = "jive-gateway jive-gatewayDisabled";
/* the below doesn't work right in IE, work on later */
//$(optsLink).removeAttribute('onclick');
//$(permLink).removeAttribute('onclick');
$(optsLink).style.display = 'none';
$(permLink).style.display = 'none';
/* fix the panels so they roll up and the buttons go back to default states */
$(optsLink).className = "";
$(permLink).className = "";
if ($(optsPanel).style.display != 'none') {
Effect.toggle($(optsPanel), 'slide', {duration: .1});
} else if ($(permPanel).style.display != 'none') {
Effect.toggle($(permPanel), 'slide', {duration: .1});
}
}
}
/*
toggleAdd function
This is the function that shows / hides the add registration form
*/
function toggleAdd(theID) {
if ($(jiveAddRegPanel).style.display != 'none') {
Effect.SlideUp($(jiveAddRegPanel), {duration: .2})
$(jiveAddRegButton).className = "jive-gateway-addregBtn";
$(jiveAddRegLink).innerHTML = "Add a new registration";
} else if ($(jiveAddRegPanel).style.display == 'none') {
Effect.SlideDown($(jiveAddRegPanel), {duration: .2})
$(jiveAddRegButton).className = "jive-gateway-addregBtn jive-gateway-cancelAdd";
$(jiveAddRegLink).innerHTML = "Cancel adding new registration";
}
}
/*
toggleEdit function
This is the function that shows / hides the edit fields for an existing registration
*/
function toggleEdit(theNum) {
normalRow = "jiveRegistration"+theNum;
editRow = "jiveRegistrationEdit"+theNum;
if ($(editRow).style.display != 'none') {
$(editRow).className = "jive-registrations-edit";
$(editRow).style.display = 'none';
$(normalRow).className = "jive-registrations-normal";
} else if ($(editRow).style.display == 'none') {
$(normalRow).className = "jive-registrations-normalHidden";
$(editRow).className = "jive-registrations-editVisible";
Effect.Appear($(editRow), {duration: .2});
}
}
/*
toggleFilters function
this is for a future feature, to replace the row of filter options with a
dynamic pulldown menu.
*/
function toggleFilters() {
if ($(jiveFilterDrop).style.display != 'none') {
Effect.toggle($(jiveFilterDrop),'slide', {duration: .4});
} else {
Effect.toggle($(jiveFilterDrop),'slide', {duration: .4});
}
}
/* ********************************************* */
/* gateway block (surrounds each gateway listed) */
/* ********************************************* */
.jive-gateway {
display: block;
position: relative;
width: 550px;
background-color: #f3f7fa;
border: 1px solid #dcdcdc;
margin: 15px 0px 0px 0px;
padding: 4px 6px 4px 7px;
overflow: hidden;
-moz-border-radius: 4px;
}
.jive-gateway label {
display: block;
float: left;
padding-top: 2px;
}
.jive-gateway label img {
float: left;
margin: 0px 4px 0px 3px;
}
.jive-gateway label input {
float: left;
}
.jive-gateway label strong {
float: left;
padding-top: 1px;
}
.jive-gatewayButtons {
display: block;
position: relative;
width: auto;
float: right;
clear: none;
right: 0px;
margin-top: 0px;
}
.jive-gatewayButtons a {
display: block;
float: left;
border: 1px solid #f3f7fa;
padding: 2px 10px 2px 18px;
margin: 0px 5px 0px 0px;
background: url('/images/twisty_closed_9x9.gif') no-repeat left;
background-position: 6px;
color: #34679a;
}
.jive-gatewayButtons a:hover {
border: 1px solid #dcdcdc;
}
a.jive-gatewayButtonOn {
border: 1px solid #dcdcdc;
background: #ffffff url('/images/twisty_opened_9x9.gif') no-repeat left;
background-position: 6px;
}
/* disabled panel, when a gateway isn't selected */
.jive-gatewayDisabled {
background-color: #fcfcfc;
}
.jive-gatewayDisabled .jive-gatewayButtons a {
border: 1px solid #fcfcfc;
background: url('/images/twisty_inactive_9x9.gif') no-repeat left;
background-position: 6px;
color: #999999;
text-decoration: none;
cursor: default;
}
.jive-gatewayDisabled .jive-gatewayButtons a:hover {
border: 1px solid #fcfcfc;
}
/* ********************************************************* */
/* gateway preferences panels (both options and permissions) */
/* ********************************************************* */
.jive-gatewayPanel {
display: block;
position: relative;
width: 495px;
background: #f7f5f0 url('../images/gateway-options-panel-grad.gif') repeat-x top;
border: 1px solid #dcdcdc;
border-top: none;
margin: 0px 0px 5px 45px;
padding: 0px;
overflow: hidden;
-moz-border-radius: 0px 0px 4px 4px;
}
.jive-gatewayPanel div {
padding: 14px 15px 5px 15px;
}
.jive-gatewayPanel div form {
margin: 0px;
padding: 0px;
}
.jive-formButton {
margin: 10px 5px 5px 0px;
}
/* ******************************************** */
/* gateway filter (top of 'regsitrations' page) */
/* ******************************************** */
.jive-gateway-filter {
display: block;
position: relative;
float: left;
clear: both;
background-color: #f6f6f7;
border: 1px solid #dcdcdc;
margin: 5px 0px 5px 0px;
padding: 0px;
-moz-border-radius: 4px;
}
.jive-gateway-filter div {
display: block;
position: relative;
float: left;
padding: 3px 6px 4px 5px;
}
.jive-gateway-filter strong {
display: block;
float: left;
padding-top: 3px;
}
.jive-gateway-filter label {
display: block;
float: left;
margin: 2px 10px 0px 15px;
}
.jive-gateway-filter label input {
float: left;
}
.jive-gateway-filter label img {
float: left;
margin: 0px 4px 0px 2px;
}
.jive-gateway-filter label span {
float: left;
padding-top: 1px;
}
.jive-gateway-filter input.filterBtn {
float: right;
}
/* the below is for a future feature */.
.jive-gateway-filter-dropdownLink {
display: block;
float: left;
margin-left: 15px;
}
.jive-gateway-filter-dropdown {
display: block;
position: absolute;
margin: 0px 0px 0px 410px;
padding: 10px;
background-color: #f3f7fa;
border: 1px solid #dcdcdc;
-moz-border-radius: 3px;
z-index: 200;
}
/* *********************************************** */
/* registrations, big block table of registrations */
/* *********************************************** */
.jive-registrations {
display: block;
position: relative;
float: left;
width: 97%;
background-color: #fff;
border: 1px solid #dcdcdc;
margin: 16px 0px 20px 0px;
padding: 8px 6px 10px 7px;
overflow: hidden;
-moz-border-radius: 4px;
}
.jive-registrations a {
color: #34679a;
}
.jive-registrations form {
margin: 0px;
padding: 0px;
}
.jive-registrations-results {
display: block;
position: relative;
float: left;
font-size: 1.2em;
padding-left: 3px;
word-spacing: 3px;
}
.jive-registrations-resultsSize {
display: block;
position: relative;
float: left;
font-size: .9em;
padding-left: 28px;
}
.jive-registrations-resultsSize select {
float: left;
}
.jive-registrations-resultsSize span {
float: left;
margin: 2px 0px 0px 4px;
}
.jive-registrations-pagination {
float: right;
font-size: .9em;
padding-right: 6px;
word-spacing: 2px;
}
.jive-registrations table {
display: block;
float: left;
width: 100%;
padding: 3px 5px 3px 5px;
margin: 5px 0px 5px 0px;
}
.jive-registrations table thead th {
text-align: left;
font-size: .75em;
padding-right: 5px;
padding: 3px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
background-color: #f3f7fa;
}
.jive-registrations table thead th.border-left {
border-left: 1px solid #ccc;
}
.jive-registrations table thead th.border-right {
border-right: 1px solid #ccc;
}
.jive-registrations table tbody td {
font-size: .75em;
padding-right: 5px;
padding: 3px;
border-bottom: 1px solid #ccc;
vertical-align: top;
}
/* ****************************** */
/* user's gateway presence styles */
/* ****************************** */
.jive-gateway-online {
display: block;
float: left;
color: #000;
padding: 1px 0px 2px 25px;
}
.jive-gateway-offline {
display: block;
float: left;
color: #666;
padding: 1px 0px 2px 25px;
}
.jive-gateway-AIMon {
background: url(/images/aim.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-AIMoff {
background: url(/images/aim-gray.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-ICQon {
background: url(/images/icq.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-ICQoff {
background: url(/images/icq-gray.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-MSNon {
background: url(/images/msn.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-MSNoff {
background: url(/images/msn-gray.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-Yon {
background: url(/images/yahoo.gif) no-repeat left;
background-position: 0px 1px;
}
.jive-gateway-Yoff {
background: url(/images/yahoo-gray.gif) no-repeat left;
background-position: 0px 1px;
}
/* *************************** */
/* edit gateway registrations */
/* *************************** */
table tr.jive-registrations-normal {
display: table-row;
}
table tr.jive-registrations-normalHidden {
display: none;
}
table tr.jive-registrations-edit {
display: none;
}
table tr.jive-registrations-editVisible {
/*display: table-row;*/
}
tr.jive-registrations-edit, tr.jive-registrations-editVisible td {
background-color: #f6f6f6;
}
.jive-registrations-editUsername, .jive-registrations-editPassword {
float: left;
}
.jive-registrations-editUsername strong, .jive-registrations-editPassword strong {
font-size: .9em;
color: #203050;
}
.jive-registrations-editUsername input, .jive-registrations-editPassword input {
width: 110px;
height: 21px;
border: 1px solid #888888;
padding-left: 2px;
}
.jive-registrations-editPassword {
padding-left: 8px;
}
.jive-registrations-editButtons {
float: left;
padding-left: 15px;
}
/* *************************** */
/* add a gateway registrations */
/* *************************** */
.jive-gateway-addregBtn {
display: block;
position: relative;
float: left;
margin: 10px 0px 8px 0px;
}
.jive-gateway-addregBtn a {
display: block;
float: left;
background: url('/images/add-16x16.gif') no-repeat left;
padding-left: 20px;
color: #34679a;
font-weight: bold;
}
.jive-gateway-cancelAdd a {
background: url('/images/forbidden-16x16.gif') no-repeat left;
}
.jive-gateway-addreg {
display: block;
position: relative;
float: left;
clear: both;
width: 97%;
background-color: #f3f7fa;
border: 1px solid #dcdcdc;
margin: 0px 0px 20px 0px;
padding: 0px;
-moz-border-radius: 4px;
white-space: nowrap;
}
.jive-gateway-addreg div {
float: left;
}
.jive-gateway-addregPad {
padding: 10px 5px 3px 15px;
white-space: nowrap;
}
.jive-gateway-addreg strong {
font-size: .9em;
color: #203050;
}
.jive-registrations-addJid input,
.jive-registrations-addGateway select,
.jive-registrations-addUsername input,
.jive-registrations-addPassword input {
width: 130px;
height: 20px;
border: 1px solid #888888;
margin: 2px 7px 0px 0px;
padding: 0px 0px 0px 1px;
}
.jive-registrations-addButtons {
margin: 0px 5px 0px 10px;
white-space: nowrap;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment