Project

General

Profile

Bug #22460 » 14116_v3.diff

Administrator Admin, 2010-04-30 12:07

View differences:

t3lib/class.t3lib_recordlist.php (working copy)
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;
}
}
';
typo3/class.db_list_extra.inc (working copy)
$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 {
typo3/class.file_list.inc (working copy)
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>';
}
(4-4/4)