mark row
This commit is contained in:
@@ -177,6 +177,8 @@ $cfgBgcolorOne = '#CCCCCC'; // table data row colour
|
||||
$cfgBgcolorTwo = '#DDDDDD'; // table data row colour, alternate
|
||||
$cfgBrowsePointerColor = '#CCFFCC'; // color of the pointer in browse mode
|
||||
// (blank for no pointer)
|
||||
$cfgBrowseMarkRow = 0; // if 1, you can click on rows to
|
||||
// visually mark them
|
||||
$cfgTextareaCols = 40; // textarea size (columns) in edit mode
|
||||
$cfgTextareaRows = 7; // textarea size (rows) in edit mode
|
||||
$cfgLimitChars = 50; // max field data length in browse mode
|
||||
|
@@ -723,8 +723,11 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
||||
// loic1: pointer code part
|
||||
$on_mouse = ($GLOBALS['cfgBrowsePointerColor'] == '')
|
||||
? ''
|
||||
: ' onmouseover="setPointer(this, \'' . $GLOBALS['cfgBrowsePointerColor'] . '\')" onmouseout="setPointer(this, \'' . $bgcolor . '\')"';
|
||||
: ' onmouseover="setPointer(this, \'' . $GLOBALS['cfgBrowsePointerColor'] . '\', \''.$bgcolor.'\')" onmouseout="setPointer(this, \'' . $bgcolor . '\', \''.$bgcolor.'\')"';
|
||||
|
||||
if ($GLOBALS['cfgBrowseMarkRow'] == '1') {
|
||||
$on_mouse = ' onmousedown="setPointer(this, \'' . $GLOBALS['cfgBrowsePointerColor'] . '\', \''.$bgcolor.'\')"';
|
||||
}
|
||||
?>
|
||||
<tr<?php echo $on_mouse; ?>>
|
||||
<?php
|
||||
|
@@ -302,10 +302,11 @@ function checkTransmitDump(theForm, theAction)
|
||||
*
|
||||
* @param object the table row
|
||||
* @param object the color to use for this row
|
||||
* @param object the background color
|
||||
*
|
||||
* @return boolean whether pointer is set or not
|
||||
*/
|
||||
function setPointer(theRow, thePointerColor)
|
||||
function setPointer(theRow, thePointerColor, theNormalBgColor)
|
||||
{
|
||||
var theCells = null;
|
||||
|
||||
@@ -324,13 +325,16 @@ function setPointer(theRow, thePointerColor)
|
||||
|
||||
var rowCellsCnt = theCells.length;
|
||||
for (var c = 0; c < rowCellsCnt; c++) {
|
||||
if (theCells[c].style.backgroundColor.toLowerCase() == thePointerColor.toLowerCase()) {
|
||||
theCells[c].style.backgroundColor = theNormalBgColor;
|
||||
} else {
|
||||
theCells[c].style.backgroundColor = thePointerColor;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} // end of the 'setPointer()' function
|
||||
|
||||
|
||||
/**
|
||||
* Checks/unchecks all tables
|
||||
*
|
||||
@@ -372,4 +376,3 @@ function setSelectOptions(the_form, the_select, do_check)
|
||||
|
||||
return true;
|
||||
} // end of the 'setSelectOptions()' function
|
||||
|
||||
|
Reference in New Issue
Block a user