- removed deprecated function setCheckboxesRange()
- rewrote setCheckboxes()
This commit is contained in:
@@ -7,6 +7,9 @@ $Source$
|
|||||||
|
|
||||||
2005-11-13 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
2005-11-13 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* db_details_structure.php: wrong js function call
|
* db_details_structure.php: wrong js function call
|
||||||
|
* libraries/functions.js
|
||||||
|
- removed deprecated function setCheckboxesRange()
|
||||||
|
- rewrote setCheckboxes()
|
||||||
|
|
||||||
2005-11-11 Marc Delisle <lem9@users.sourceforge.net>
|
2005-11-11 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lang/bulgarian: Update, thanks to Stanislav Yordanov - stanprog.
|
* lang/bulgarian: Update, thanks to Stanislav Yordanov - stanprog.
|
||||||
|
@@ -853,61 +853,24 @@ function setVerticalPointer(theRow, theColNum, theAction, theDefaultColor1, theD
|
|||||||
} // end of the 'setVerticalPointer()' function
|
} // end of the 'setVerticalPointer()' function
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks/unchecks all tables
|
* Checks/unchecks all checkbox in given conainer (f.e. a form, fieldset or div)
|
||||||
*
|
|
||||||
* @param string the form name
|
|
||||||
* @param boolean whether to check or to uncheck the element
|
|
||||||
*
|
*
|
||||||
|
* @param string container_id the container id
|
||||||
|
* @param boolean state new value for checkbox (true or false)
|
||||||
* @return boolean always true
|
* @return boolean always true
|
||||||
*/
|
*/
|
||||||
function setCheckboxes(the_form, do_check)
|
function setCheckboxes( container_id, state ) {
|
||||||
{
|
var checkboxes = document.getElementById(container_id).getElementsByTagName('input');
|
||||||
var elts = (typeof(document.forms[the_form].elements['selected_db[]']) != 'undefined')
|
|
||||||
? document.forms[the_form].elements['selected_db[]']
|
|
||||||
: (typeof(document.forms[the_form].elements['selected_tbl[]']) != 'undefined')
|
|
||||||
? document.forms[the_form].elements['selected_tbl[]']
|
|
||||||
: document.forms[the_form].elements['selected_fld[]'];
|
|
||||||
var elts_cnt = (typeof(elts.length) != 'undefined')
|
|
||||||
? elts.length
|
|
||||||
: 0;
|
|
||||||
|
|
||||||
if (elts_cnt) {
|
for ( var i = 0; i < checkboxes.length; i++ ) {
|
||||||
for (var i = 0; i < elts_cnt; i++) {
|
if ( checkboxes[i].type == 'checkbox' ) {
|
||||||
elts[i].checked = do_check;
|
checkboxes[i].checked = state;
|
||||||
} // end for
|
}
|
||||||
} else {
|
}
|
||||||
elts.checked = do_check;
|
|
||||||
} // end if... else
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // end of the 'setCheckboxes()' function
|
} // end of the 'setCheckboxes()' function
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks/unchecks all rows
|
|
||||||
*
|
|
||||||
* @param string the form name
|
|
||||||
* @param boolean whether to check or to uncheck the element
|
|
||||||
* @param string basename of the element
|
|
||||||
* @param integer min element count
|
|
||||||
* @param integer max element count
|
|
||||||
*
|
|
||||||
* @return boolean always true
|
|
||||||
*/
|
|
||||||
// modified 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
|
|
||||||
// - set the other checkboxes (if available) too
|
|
||||||
function setCheckboxesRange(the_form, do_check, basename, min, max)
|
|
||||||
{
|
|
||||||
for (var i = min; i < max; i++) {
|
|
||||||
if (typeof(document.forms[the_form].elements[basename + i]) != 'undefined') {
|
|
||||||
document.forms[the_form].elements[basename + i].checked = do_check;
|
|
||||||
}
|
|
||||||
if (typeof(document.forms[the_form].elements[basename + i + 'r']) != 'undefined') {
|
|
||||||
document.forms[the_form].elements[basename + i + 'r'].checked = do_check;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
} // end of the 'setCheckboxesRange()' function
|
|
||||||
|
|
||||||
// added 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
|
// added 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
|
||||||
// copy the checked from left to right or from right to left
|
// copy the checked from left to right or from right to left
|
||||||
@@ -1252,4 +1215,4 @@ function pdfPaperSize(format, axis) {
|
|||||||
if (axis == 'x') return 612.00; else return 936.00;
|
if (axis == 'x') return 612.00; else return 936.00;
|
||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
}
|
}
|
Reference in New Issue
Block a user