summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
Diffstat (limited to 'skins')
-rw-r--r--skins/default/images/buttons/ldap_act.pngbin0 -> 335 bytes
-rw-r--r--skins/default/images/buttons/ldap_pas.pngbin0 -> 335 bytes
-rw-r--r--skins/default/includes/ldapscripts.html73
-rw-r--r--skins/default/ldapsearchform.css54
-rw-r--r--skins/default/templates/ldappublicsearch.html31
5 files changed, 158 insertions, 0 deletions
diff --git a/skins/default/images/buttons/ldap_act.png b/skins/default/images/buttons/ldap_act.png
new file mode 100644
index 000000000..b09f26707
--- /dev/null
+++ b/skins/default/images/buttons/ldap_act.png
Binary files differ
diff --git a/skins/default/images/buttons/ldap_pas.png b/skins/default/images/buttons/ldap_pas.png
new file mode 100644
index 000000000..b09f26707
--- /dev/null
+++ b/skins/default/images/buttons/ldap_pas.png
Binary files differ
diff --git a/skins/default/includes/ldapscripts.html b/skins/default/includes/ldapscripts.html
new file mode 100644
index 000000000..0dfda6cb7
--- /dev/null
+++ b/skins/default/includes/ldapscripts.html
@@ -0,0 +1,73 @@
+<script type="text/javascript">
+var ldap_server_select = document.getElementById('rcfmd_ldap_public_servers');
+if (ldap_server_select) {
+ // attach event to ldap server drop down
+ ldap_server_select.onchange = function() {
+ updateLdapSearchFields(this);
+ return false;
+ }
+}
+
+// update the fields on page load
+updateLdapSearchFields(ldap_server_select);
+
+/**
+ * function to change the attributes of the ldap server search fields select box
+ * this function is triggered by an onchange event in the server select box
+ */
+function updateLdapSearchFields(element) {
+
+ // get the search fields select element
+ var search_fields = document.getElementById('rcfmd_ldap_public_search_field');
+
+ // get rid of the current options for the select
+ for (i = search_fields.length - 1; i>=0; i--)
+ search_fields.remove(i);
+
+ // get the array containing this servers search fields
+ var server_fields = rcmail.env[element.value + '_search_fields'];
+
+ // add a new option for each of the possible search fields for the selected server
+ for (i = 0; i < server_fields.length; i++) {
+
+ // the last array value is for fuzzy search, so skip that one
+ if (i < (server_fields.length - 1)) {
+ var new_option = document.createElement('option');
+ new_option.text = server_fields[i];
+ new_option.value = server_fields[i];
+
+ // standards compliant browsers
+ try {
+ search_fields.add(new_option, null);
+ }
+ // for the standards challenged one...
+ catch(e) {
+ search_fields.add(new_option);
+ }
+ } else {
+ // ok, last member of array, so check the value of fuzzy_search
+ var fuzzy_search = server_fields[i];
+ var search_check_box = document.getElementById('rcmfd_ldap_public_search_type');
+
+ if (fuzzy_search == 'fuzzy') {
+ // we should enable the check box
+ if (search_check_box.disabled)
+ search_check_box.disabled = false;
+
+ // make sure the checkbox is unchecked
+ if (search_check_box.checked)
+ search_check_box.checked = false;
+
+ } else {
+ // we should disable the check box
+ if (!search_check_box.disabled)
+ search_check_box.disabled = true;
+
+ // check the checkbox (just a visual clue for the user)
+ if (!search_check_box.checked)
+ search_check_box.checked = true;
+ }
+ }
+ }
+}
+</script>
diff --git a/skins/default/ldapsearchform.css b/skins/default/ldapsearchform.css
new file mode 100644
index 000000000..9661442eb
--- /dev/null
+++ b/skins/default/ldapsearchform.css
@@ -0,0 +1,54 @@
+/***** RoundCube|Mail address book task styles *****/
+
+
+body.iframe,
+{
+ background-color: #F9F9F9;
+}
+
+#ldapsearch-title
+{
+ height: 12px !important;
+/* height: 20px; */
+ padding: 4px 20px 3px 20px;
+ border-bottom: 1px solid #999999;
+ color: #333333;
+ font-size: 11px;
+ font-weight: bold;
+ background-color: #EBEBEB;
+ background-image: url(images/listheader_aqua.gif);
+}
+
+#ldapsearch-details
+{
+ padding: 15px 20px 10px 20px;
+}
+
+#ldapsearch-details table td.title
+{
+ color: #666666;
+ font-weight: bold;
+ text-align: right;
+ padding-right: 10px;
+}
+
+#ldapAddressList
+{
+ width: 100%;
+ table-layout: fixed;
+ /* css hack for IE */
+ width: expression(document.getElementById('addresslist').clientWidth);
+}
+
+#ldapAddressList table
+{
+ border-top: 1px solid #999999;
+}
+
+#ldap-search-results div
+{
+ width: 100%;
+ color: red;
+ background-color: green;
+}
+
diff --git a/skins/default/templates/ldappublicsearch.html b/skins/default/templates/ldappublicsearch.html
new file mode 100644
index 000000000..70570c06f
--- /dev/null
+++ b/skins/default/templates/ldappublicsearch.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<link rel="stylesheet" type="text/css" href="/common.css" />
+<link rel="stylesheet" type="text/css" href="/ldapsearchform.css" />
+</head>
+<body class="iframe">
+
+<div id="ldapsearch-title"><roundcube:label name="ldappublicsearchform" /></div>
+
+<div id="ldapsearch-details">
+<roundcube:object name="ldappublicsearch" size="40" />
+<p>
+<roundcube:button command="ldappublicsearch" type="input" class="button" label="ldappublicsearch" />
+<input type="button" value="<roundcube:label name="cancel" />" class="button" onclick="history.back()" />&nbsp;
+<br /></p>
+</div>
+
+
+<div id="ldapsearch-results">
+<roundcube:object name="ldappublicaddresslist"
+ id="ldappublicaddresslist"
+ cellspacing="0"
+ summary="Ldap email address list" />
+</div>
+
+<roundcube:include file="/includes/ldapscripts.html" />
+
+</body>
+</html>