Moved files

This commit is contained in:
Deon George
2009-06-30 19:39:45 +10:00
parent df48b8ff9b
commit bbcd2cb3b6
313 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
// $Header: /cvsroot/phpldapadmin/phpldapadmin/entry_chooser.js,v 1.3 2005/02/10 12:34:26 wurley Exp $
function dnChooserPopup(form_element,rdn)
{
mywindow=open('entry_chooser.php','myname','resizable=no,width=600,height=370,scrollbars=1');
mywindow.location.href = 'entry_chooser.php?form_element=' + form_element + '&rdn=' + rdn;
if (mywindow.opener == null) mywindow.opener = self;
}

View File

@@ -0,0 +1,21 @@
function trim(inputString) {
// Removes leading and trailing spaces from the passed string. Also removes
// consecutive spaces and replaces it with one space. If something besides
// a string is passed in (null, custom object, etc.) then return the input.
if (typeof inputString != "string") { return inputString; }
var retValue = inputString;
var ch = retValue.substring(0, 1);
while (ch == " ") { // Check for spaces at the beginning of the string
retValue = retValue.substring(1, retValue.length);
ch = retValue.substring(0, 1);
}
ch = retValue.substring(retValue.length-1, retValue.length);
while (ch == " ") { // Check for spaces at the end of the string
retValue = retValue.substring(0, retValue.length-1);
ch = retValue.substring(retValue.length-1, retValue.length);
}
while (retValue.indexOf(" ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
retValue = retValue.substring(0, retValue.indexOf(" ")) + retValue.substring(retValue.indexOf(" ")+1, retValue.length); // Again, there are two spaces in each of the strings
}
return retValue; // Return the trimmed string back to the user
}

View File

@@ -0,0 +1,29 @@
function fixIEPNG( img )
{
img.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"
+ img.src + "', enabled=true)";
img.src="blank.gif";
}
function checkPNGs()
{
// test to see if the browser is IE
var agent = navigator.userAgent.toLowerCase();
var is_ie = (( agent.indexOf("msie") != -1 ) &&
( agent.indexOf("opera") == -1 ));
// if IE, use DirectX to correctly display a PNG
if ( !is_ie ) return;
// go through each image in the page and fix them
for ( var i = 0; i < document.images.length; i++ )
{
// only if the image is a png
var img = document.images[ i ];
if ( img.src.indexOf( "png" ) != -1 )
fixIEPNG( img );
}
}
checkPNGs();

76
htdocs/js/search_util.js Normal file
View File

@@ -0,0 +1,76 @@
// File: search_util.js
// Purpose:
// This JavaScript file defines some functions used by the two search forms for
// auto-populating the base DN dynamically when a server is selected from the
// drop-down.
// $Header: /cvsroot/phpldapadmin/phpldapadmin/search_util.js,v 1.2 2004/03/19 20:17:51 i18phpldapadmin Exp $
//the array to store the server
var servers = new Array();
//---------------------------------------------------------------------
// Definition of the object server
//---------------------------------------------------------------------
//constructor of the server
//param id the id of the server
//param name the name of the server
//param base_dn the base dn of the server
function server(id,name,base_dn){
//the properties of the object
this.id =id;
this.name = name;
this.base_dn = base_dn;
// the method of the server
this.getId=getId;
this.setId=setId;
this.getName = getName;
this.setName = setName;
this.setBaseDn = setBaseDn;
this.getBaseDn = getBaseDn;
}
// set the id of the server
function setId(id){
this.id = id;
}
//return the id of the server
function getId(){
return this.id;
}
// set the name of the server
function setName(name){
this.name = name;
}
// return the name of the server
function getName(){
return this.name;
}
// return the base dn of the server
function getBaseDn(){
return this.base_dn;
}
// set the base dn of the server
function setBaseDn(base_dn){
this.base_dn = base_dn;
}
//-----------------------------------------------------------------------
// End of the definition of the server
//-----------------------------------------------------------------------
// add a server object to the array of server
function addToServersList(obj_server){
servers[servers.length] = obj_server;
}