RELEASE 1.1.0

This commit is contained in:
Deon George
2009-06-30 20:46:00 +10:00
parent a08bc4e9e1
commit dd581eb5c8
191 changed files with 25012 additions and 10177 deletions

View File

@@ -1,15 +1,17 @@
function dateSelector(id) {
var el = document.getElementById('f_date_'+id);
var el = document.getElementById('f_date_'+id);
var format = gettype(el.id);
var epoch;
var parse = false;
var cal = new Calendar(0, null, onSelect, onClose);
var cal = new Calendar(0, null, onSelect, onClose);
if (defaults['f_time_'+id]) {
cal.showsTime = true;
} else {
cal.showsTime = false;
}
cal.weekNumbers = true;
cal.showsOtherMonths = true;
cal.create();

View File

@@ -1,18 +1,18 @@
.treemenudiv {
table.tree .treemenudiv {
display: block;
white-space: nowrap;
padding-top: 1px;
padding-bottom: 1px;
}
.phplmnormal {
table.tree .phplmnormal {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #000000;
text-decoration: none;
}
a.phplmnormal:hover {
table.tree a.phplmnormal:hover {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #000000;
@@ -20,21 +20,21 @@ a.phplmnormal:hover {
text-decoration: none;
}
a.phplm:link {
table.tree a.phplm:link {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #000000;
text-decoration: none;
}
a.phplm:visited {
table.tree a.phplm:visited {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #000000;
text-decoration: none;
}
a.phplm:hover {
table.tree a.phplm:hover {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #841212;
@@ -42,14 +42,14 @@ a.phplm:hover {
text-decoration: none;
}
a.phplm:active {
table.tree a.phplm:active {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #ff0000;
text-decoration: none;
}
a.phplmselected:link {
table.tree a.phplmselected:link {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #dd0000;
@@ -57,7 +57,7 @@ a.phplmselected:link {
text-decoration: none;
}
a.phplmselected:visited {
table.tree a.phplmselected:visited {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #dd0000;
@@ -65,7 +65,7 @@ a.phplmselected:visited {
text-decoration: none;
}
a.phplmselected:hover {
table.tree a.phplmselected:hover {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #841212;
@@ -73,7 +73,7 @@ a.phplmselected:hover {
text-decoration: none;
}
a.phplmselected:active {
table.tree a.phplmselected:active {
font-family: bitstream vera sans, luxi sans, verdana, geneva, arial, helvetica, sans-serif;
font-size: 13px;
color: #ff0000;

View File

@@ -315,7 +315,9 @@ function setLibjsdir($libjsdir)
if ($libjsdir != '' && substr($libjsdir, -1) != '/') {
$libjsdir .= '/';
}
if ($libjsdir == '' || substr($libjsdir, 0, 1) != '/') {
if ($libjsdir == '' || (substr($libjsdir, 0, 1) != '/' && substr($libjsdir, 1, 1) != ':')) {
// libjsdir != /.../...
// and libjsdir != C:\...\...
$foobar = strpos($libjsdir, $this->dirroot);
if ($foobar === false || $foobar != 0) {
$libjsdir = $this->dirroot . $libjsdir;
@@ -339,7 +341,7 @@ function setImgdir($imgdir)
if ($imgdir != '' && substr($imgdir, -1) != '/') {
$imgdir .= '/';
}
if ($imgdir == '' || substr($imgdir, 0, 1) != '/') {
if ($imgdir == '' || (substr($imgdir, 0, 1) != '/' && substr($imgdir, 1, 1) != ':')) {
$foobar = strpos($imgdir, $this->dirroot);
if ($foobar === false || $foobar != 0) {
$imgdir = $this->dirroot . $imgdir;
@@ -376,7 +378,7 @@ function setIcondir($icondir)
if ($icondir != '' && substr($icondir, -1) != '/') {
$icondir .= '/';
}
if ($icondir == '' || substr($icondir, 0, 1) != '/') {
if ($icondir == '' || (substr($icondir, 0, 1) != '/' && substr($icondir, 1, 1) != ':')) {
$foobar = strpos($icondir, $this->dirroot);
if ($foobar === false || $foobar != 0) {
$icondir = $this->dirroot . $icondir;
@@ -437,7 +439,7 @@ function setTpldirCommon($tpldir)
if ($tpldir != '' && substr($tpldir, -1) != '/') {
$tpldir .= '/';
}
if ($tpldir == '' || substr($tpldir, 0, 1) != '/') {
if ($tpldir == '' || (substr($tpldir, 0, 1) != '/' && substr($tpldir, 1, 1) != ':')) {
$foobar = strpos($tpldir, $this->dirroot);
if ($foobar === false || $foobar != 0) {
$tpldir = $this->dirroot . $tpldir;

View File

@@ -203,15 +203,25 @@ function newTreeMenu(
// corner at end of subtree or t-split
if ($not_a_leaf) {
if ($cnt == $this->_firstItem[$menu_name]) {
$img = $img_collapse_corner_first;
$alt = $alt_collapse_corner_first;
$this->_treeMenu[$menu_name] .= '<a onmousedown="' . $toggle_function_name . "('" . $cnt . "')" . '"><img align="top" border="0" class="imgs" id="jt' . $cnt . 'node" src="' . $img . '" alt="' . $alt . '" /></a>';
if ($this->tree[$cnt]['last_item'] && $this->tree[$cnt]['children']) {
// Xavier Bruyet : 2006.09.28
// Display for the first time the tree without the root node expanded
$img = $img_expand_corner_first;
$alt = $alt_expand_corner_first;
// @todo: nasty hack, should really do this better.
$parsed_href = preg_replace('/template_engine/','expand',$this->tree[$cnt]['parsed_href']);
$this->_treeMenu[$menu_name] .= '<a href="' . $parsed_href . '"><img align="top" border="0" class="imgs" id="jt' . $cnt . 'node" src="' . $img . '" alt="' . $alt . '" /></a>';
} else {
$img = $img_collapse_corner_first;
$alt = $alt_collapse_corner_first;
$this->_treeMenu[$menu_name] .= '<a onmousedown="' . $toggle_function_name . "('" . $cnt . "')" . '"><img align="top" border="0" class="imgs" id="jt' . $cnt . 'node" src="' . $img . '" alt="' . $alt . '" /></a>';
}
} else {
if ($this->tree[$cnt]['last_item'] && $this->tree[$cnt]['children']) {
$img = $img_expand_corner;
$alt = $alt_expand_corner;
// @todo: nasty hack, should really do this better.
$parsed_href = preg_replace('/template_engine.php/','expand.php',$this->tree[$cnt]['parsed_href']);
$parsed_href = preg_replace('/template_engine/','expand',$this->tree[$cnt]['parsed_href']);
$this->_treeMenu[$menu_name] .= '<a href="' . $parsed_href . '"><img align="top" border="0" class="imgs" id="jt' . $cnt . 'node" src="' . $img . '" alt="' . $alt . '" /></a>';
} else {
$img = $img_collapse_corner;
@@ -235,7 +245,7 @@ function newTreeMenu(
$img = $img_expand;
$alt = $alt_expand;
// @todo: nasty hack, should really do this better.
$parsed_href = preg_replace('/template_engine.php/','expand.php',$this->tree[$cnt]['parsed_href']);
$parsed_href = preg_replace('/template_engine/','expand',$this->tree[$cnt]['parsed_href']);
$this->_treeMenu[$menu_name] .= '<a href="' . $parsed_href . '"><img align="top" border="0" class="imgs" id="jt' . $cnt . 'node" src="' . $img . '" alt="' . $alt . '" /></a>';
} else {
@@ -331,6 +341,11 @@ function newTreeMenu(
'img_folder_closed' => $img_folder_closed,
'img_folder_open' => $img_folder_open
));
$inc = '<!-- # PHP layers menu. -->
<script type="text/javascript" language="javascript" src="js/phplayersmenu/libjs/layersmenu-browser_detection.js"></script>
<script type="text/javascript" language="javascript" src="js/phplayersmenu/libjs/layerstreemenu-cookies.js"></script>';
$toggle_function = $t->parse('out', 'tplfile');
$toggle_function =
'<script language="JavaScript" type="text/javascript">' . "\n" .
@@ -349,7 +364,7 @@ function newTreeMenu(
'// -->' . "\n" .
'</script>' . "\n";
$this->_treeMenu[$menu_name] = $toggle_function . "\n" . $this->_treeMenu[$menu_name] . "\n" . $toggle;
$this->_treeMenu[$menu_name] = $inc . "\n" . $toggle_function . "\n" . $this->_treeMenu[$menu_name] . "\n" . $toggle;
return $this->_treeMenu[$menu_name];
}

113
htdocs/js/pla_ajax.js Normal file
View File

@@ -0,0 +1,113 @@
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/js/pla_ajax.js,v 1.2 2007/12/15 07:50:31 wurley Exp $
/**
* @package phpLDAPadmin
* @author The phpLDAPadmin development team
* @author Xavier Bruyet
*/
// current request
var http_request = null;
var http_request_success_callback = '';
var http_request_error_callback = '';
// include html into a component
function includeHTML(component, html) {
if (typeof(component) != 'object' || typeof(html) != 'string') return;
component.innerHTML = html;
var scripts = component.getElementsByTagName('script');
if (!scripts) return;
// load scripts
for (var i = 0; i < scripts.length; i++) {
var scriptclone = document.createElement('script');
if (scripts[i].attributes.length > 0) {
for (var j in scripts[i].attributes) {
if (typeof(scripts[i].attributes[j]) != 'undefined'
&& typeof(scripts[i].attributes[j].nodeName) != 'undefined'
&& scripts[i].attributes[j].nodeValue != null
&& scripts[i].attributes[j].nodeValue != '') {
scriptclone.setAttribute(scripts[i].attributes[j].nodeName, scripts[i].attributes[j].nodeValue);
}
}
}
scriptclone.text = scripts[i].text;
scripts[i].parentNode.replaceChild(scriptclone, scripts[i]);
eval(scripts[i].innerHTML);
}
}
// callback function
function alertHttpRequest() {
if (http_request && (http_request.readyState == 4)) {
if (http_request.status == 200) {
response = http_request.responseText;
http_request = null;
//alert(response);
if (http_request_success_callback) {
eval(http_request_success_callback + '(response)');
}
} else {
alert('There was a problem with the request.');
cancelHttpRequest();
}
}
}
function cancelHttpRequest() {
if (http_request) {
http_request = null;
if (http_request_error_callback) {
eval(http_request_error_callback + '()');
}
}
}
// resquest
function makeGETRequest(url, parameters, successCallbackFunctionName, errorCallbackFunctionName) {
makeHttpRequest(url, parameters, 'GET', successCallbackFunctionName, errorCallbackFunctionName);
}
function makePOSTRequest(url, parameters, successCallbackFunctionName, errorCallbackFunctionName) {
makeHttpRequest(url, parameters, 'POST', successCallbackFunctionName, errorCallbackFunctionName);
}
function makeHttpRequest(url, parameters, meth, successCallbackFunctionName, errorCallbackFunctionName) {
cancelHttpRequest();
http_request_success_callback = successCallbackFunctionName;
http_request_error_callback = errorCallbackFunctionName;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance.');
return false;
}
http_request.onreadystatechange = window['alertHttpRequest'];
if (meth == 'GET') url = url + '?' + parameters;
http_request.open(meth, url, true);
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
if (meth == 'GET') parameters = null;
http_request.send(parameters);
}

27
htdocs/js/tree_hide.js Normal file
View File

@@ -0,0 +1,27 @@
var current;
function tree_unhide(whichLayer,old) {
if (current == null) current = old;
var oldtree = document.getElementById('SID_'+current).style;
oldtree.display = 'none';
if (document.getElementById) {
// this is the way the standards work
var newtree = document.getElementById(whichLayer).value;
var newtree_div = document.getElementById('SID_'+newtree).style;
newtree_div.display = 'block';
/*
} else if (document.all) {
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display ? '':'block';
} else if (document.layers) {
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display ? '':'block';
*/
}
current = newtree;
}