Index: t3lib/class.t3lib_recordlist.php
===================================================================
--- t3lib/class.t3lib_recordlist.php (revision 7428)
+++ t3lib/class.t3lib_recordlist.php (working copy)
@@ -317,33 +317,19 @@
function CBfunctions() {
return '
// checkOffCB()
- function checkOffCB(listOfCBnames) { //
- var notChecked=0;
- var total=0;
-
- // Checking how many is checked, how many is not
- var pointer=0;
- var pos = listOfCBnames.indexOf(",");
- while (pos!=-1) {
- if (!cbValue(listOfCBnames.substr(pointer,pos-pointer))) notChecked++;
- total++;
- pointer=pos+1;
- pos = listOfCBnames.indexOf(",",pointer);
+ function checkOffCB(listOfCBnames, link) { //
+ var checkBoxes, flag, i;
+ var checkBoxes = listOfCBnames.split(",");
+ if (link.rel === "") {
+ link.rel = "allChecked";
+ flag = true;
+ } else {
+ link.rel = "";
+ flag = false;
}
- if (!cbValue(listOfCBnames.substr(pointer))) notChecked++;
- total++;
-
- // Setting the status...
- var flag = notChecked*2>total;
- pointer=0;
- pos = listOfCBnames.indexOf(",");
- while (pos!=-1) {
- setcbValue(listOfCBnames.substr(pointer,pos-pointer),flag);
-
- pointer=pos+1;
- pos = listOfCBnames.indexOf(",",pointer);
+ for (i = 0; i < checkBoxes.length; i++) {
+ setcbValue(checkBoxes[i], flag);
}
- setcbValue(listOfCBnames.substr(pointer),flag);
}
// cbValue()
function cbValue(CBname) { //
@@ -353,7 +339,9 @@
// setcbValue()
function setcbValue(CBname,flag) { //
CBfullName = "CBC["+CBname+"]";
- document.dblistForm[CBfullName].checked = flag ? "on" : 0;
+ if(document.dblistForm[CBfullName]) {
+ document.dblistForm[CBfullName].checked = flag ? "on" : 0;
+ }
}
';
Index: typo3/class.db_list_extra.inc
===================================================================
--- typo3/class.db_list_extra.inc (revision 7428)
+++ typo3/class.db_list_extra.inc (working copy)
@@ -872,7 +872,7 @@
$cells['delete']=$this->linkClipboardHeaderIcon('backPath,'gfx/garbage.gif','width="11" height="12"').' title="'.$LANG->getLL('clip_deleteMarked',1).'" alt="" />',$table,'delete',sprintf($LANG->getLL('clip_deleteMarkedWarning'),$LANG->sL($TCA[$table]['ctrl']['title'])));
// The "Select all" link:
- $cells['markAll']=''.
+ $cells['markAll']=''.
'backPath,'gfx/clip_select.gif','width="12" height="12"').' title="'.$LANG->getLL('clip_markRecords',1).'" alt="" />'.
'';
} else {
Index: typo3/class.file_list.inc
===================================================================
--- typo3/class.file_list.inc (revision 7428)
+++ typo3/class.file_list.inc (working copy)
@@ -266,8 +266,8 @@
if ($this->clipObj->current!='normal' && $iOut) {
$cells[]=$this->linkClipboardHeaderIcon('',$table,'setCB');
$cells[]=$this->linkClipboardHeaderIcon('',$table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning'));
- $onClick = 'checkOffCB(\''.implode(',',$this->CBnames).'\'); return false;';
- $cells[]=''.
+ $onClick = 'checkOffCB(\''.implode(',',$this->CBnames).'\', this); return false;';
+ $cells[]=''.
''.
'';
}