+2010-04-30 Steffen Kamper <info@sk-typo3.de>
+
+ * Fixed bug #14116: Selecting/deselecting all records does not work with translated records (thanks to Reinhard Führicht)
+
2010-04-29 Jeff Segars <jeff@webempoweredchurch.org>
* Fixed bug #11005: Browse Links Popup shows no files when all file types are allowed
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) { //
// 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;
+ }
}
';
$cells['delete']=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg($this->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']='<a href="#" onclick="'.htmlspecialchars('checkOffCB(\''.implode(',',$this->CBnames).'\'); return false;').'">'.
+ $cells['markAll'] = '<a class="cbcCheckAll" rel="" href="#" onclick="' . htmlspecialchars('checkOffCB(\'' . implode(',', $this->CBnames) . '\', this); return false;') . '">' .
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/clip_select.gif','width="12" height="12"').' title="'.$LANG->getLL('clip_markRecords',1).'" alt="" />'.
'</a>';
} else {
if ($this->clipObj->current!='normal' && $iOut) {
$cells[]=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg('','gfx/clip_copy.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_selectMarked',1).'" alt="'.$GLOBALS['LANG']->getLL('clip_selectMarked',1).'" />',$table,'setCB');
$cells[]=$this->linkClipboardHeaderIcon('<img'.t3lib_iconWorks::skinImg('','gfx/garbage.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_deleteMarked',1).'" alt="'.$GLOBALS['LANG']->getLL('clip_deleteMarked',1).'" />',$table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning'));
- $onClick = 'checkOffCB(\''.implode(',',$this->CBnames).'\'); return false;';
- $cells[]='<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
+ $onClick = 'checkOffCB(\'' . implode(',', $this->CBnames) . '\', this); return false;';
+ $cells[] = '<a class="cbcCheckAll" rel="" href="#" onclick="' . htmlspecialchars($onClick) . '">'.
'<img'.t3lib_iconWorks::skinImg('','gfx/clip_select.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->getLL('clip_markRecords',1).'" alt="'.$GLOBALS['LANG']->getLL('clip_markRecords',1).'" />'.
'</a>';
}