improved the pointer feature for the left frame

This commit is contained in:
Loïc Chapeaux
2001-12-07 21:02:43 +00:00
parent 69f3059fc5
commit a6ea8d3321
3 changed files with 40 additions and 3 deletions

View File

@@ -13,6 +13,8 @@ $Source$
* main.php3, line 191: a valid MySQL administration system may lead to have
the db creation form displayed with an existing table. Bug fixed thanks
to Rob Mangiafico <rmang at lexiconn.com>.
* left.php; libraries/left.js: improved the pointer feature for the left
frame.
2001-12-06 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* db_details.php3, mult_submits.inc.php3, tbl_printview.php3: beautify

View File

@@ -211,7 +211,7 @@ if ($num_dbs > 1) {
} // end if
// Displays the database name
$on_mouse = (($cfgLeftPointerColor == '') ? '' : 'onmouseover="if (typeof(this.style) != \'undefined\') {this.style.backgroundColor=\'' . $cfgLeftPointerColor . '\'}" onmouseout="if (typeof(this.style) != \'undefined\') {this.style.backgroundColor=\'' . $cfgLeftBgColor . '\'}"');
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (capable) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (capable) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"');
echo "\n";
echo ' <div id="el' . $j . 'Parent" class="parent"' . $on_mouse . '>';
@@ -233,7 +233,7 @@ if ($num_dbs > 1) {
<span class="heada"><?php echo $db; ?><bdo dir="<?php echo($text_dir); ?>">&nbsp;&nbsp;</bdo></span><span class="headaCnt">(<?php echo $num_tables_disp; ?>)</span></a></nobr>
</div>
<div id="el<?php echo $j;?>Child" class="child" style="margin-bottom: 5px">
<div id="el<?php echo $j;?>Child" class="child" style="margin-bottom: 5px"<?php echo $on_mouse; ?>>
<?php
// Displays the list of tables from the current database

View File

@@ -155,7 +155,7 @@ function initIt()
/**
* Collapses/expands a database when the user require this to be done
*
* @param string the name of the room to act on
* @param string the name of the database to act on
* @param boolean whether to expand or to collapse the database content
*
* @access public
@@ -205,6 +205,41 @@ function expandBase(el, unexpand)
} // end of the 'expandBase()' function
/**
* Hilight/un-hilight a database when the mouse pass over/out it
*
* @param string the name of the database to act on
* @param boolean the color to be used
*
* @access public
*/
function hilightBase(el, theColor)
{
if (!isDOM && !isIE4) {
return;
}
if (isDOM) {
var whichDb = document.getElementById(el + 'Parent');
var whichTables = document.getElementById(el + 'Child');
}
else if (isIE4) {
var whichDb = document.all(el + 'Parent');
var whichTables = document.all(el + 'Child');
}
if (typeof(whichDb.style) == 'undefined') {
return;
}
else {
whichDb.style.backgroundColor = theColor;
whichTables.style.backgroundColor = theColor;
}
return true;
} // end of the 'hilightBase()' function
/**
* Add styles for positioned layers
*/