8561 Checkboxes and labels are aligned badly if in one line
[Packages/TYPO3.CMS.git] / typo3 / class.db_list_extra.inc
index 90cc779..f6813de 100755 (executable)
@@ -149,11 +149,11 @@ class localRecordList extends recordList {
 
                        // CSH
                if (!strlen($this->id)) {
-                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH']);
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH'], '', TRUE);
                } elseif(!$this->id) {
-                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH']);
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH'], '', TRUE);
                } else {
-                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH']);
+                       $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH'], '', TRUE);
                }
 
                if (isset($this->id)) {
@@ -616,7 +616,13 @@ class localRecordList extends recordList {
                        foreach($this->fieldArray as $fCol)     {
                                if ($fCol==$titleCol)   {
                                        $recTitle = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);
-                                       $theData[$fCol] = $this->linkWrapItems($table,$row['uid'],$recTitle,$row);
+                                               // If the record is edit-locked by another user, we will show a little warning sign:
+                                       if (($lockInfo = t3lib_BEfunc::isRecordLocked($table, $row['uid']))) {
+                                               $warning = '<a href="#" onclick="' . htmlspecialchars('alert(' . $GLOBALS['LANG']->JScharCode($lockInfo['msg']) . '); return false;') . '">' .
+                                                       '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/recordlock_warning3.gif', 'width="17" height="12"') . ' title="' . htmlspecialchars($lockInfo['msg']) . '" alt="" />' .
+                                                       '</a>';
+                                       }
+                                       $theData[$fCol] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
                                } elseif ($fCol == 'pid') {
                                        $theData[$fCol]=$row[$fCol];
                                } elseif ($fCol == '_PATH_') {
@@ -1025,8 +1031,14 @@ class localRecordList extends recordList {
                                if (
                                        ($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16))
                                        )       {
-                                       $params='&cmd['.$table.']['.$row['uid'].'][delete]=1';
-                                       $cells['delete']='<a href="#" onclick="'.htmlspecialchars('if (confirm('.$LANG->JScharCode($LANG->getLL('deleteWarning').t3lib_BEfunc::referenceCount($table,$row['uid'],' (There are %s reference(s) to this record!)')).')) {jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');} return false;').'">'.
+                                       $titleOrig = t3lib_BEfunc::getRecordTitle($table,$row,FALSE,TRUE);
+                                       $titleLength = $GLOBALS['BE_USER']->uc['titleLen'];
+                                       if (!$titleLength || !t3lib_div::testInt($titleLength) || $titleLength < 0) {
+                                               $titleLength = 30;
+                                       }
+                                       $title = t3lib_div::slashJS(t3lib_div::fixed_lgd_cs($titleOrig, $titleLength),1);
+                                       $params = '&cmd['.$table.']['.$row['uid'].'][delete]=1';
+                                       $cells['delete']='<a href="#" onclick="'.htmlspecialchars('if (confirm('.$LANG->JScharCode($LANG->getLL('deleteWarning').' "'. $title.'" '.t3lib_BEfunc::referenceCount($table,$row['uid'],' (There are %s reference(s) to this record!)')).')) {jumpToUrl(\''.$SOBE->doc->issueCommand($params,-1).'\');} return false;').'">'.
                                                        '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/garbage.gif','width="11" height="12"').' title="'.$LANG->getLL('delete',1).'" alt="" />'.
                                                        '</a>';
                                } elseif(!$this->table) {
@@ -1064,12 +1076,6 @@ class localRecordList extends recordList {
                        }
                }
 
-                       // If the record is edit-locked by another user, we will show a little warning sign:
-               if ($lockInfo=t3lib_BEfunc::isRecordLocked($table,$row['uid'])) {
-                       $cells['locked'] = '<a href="#" onclick="'.htmlspecialchars('alert('.$LANG->JScharCode($lockInfo['msg']).');return false;').'">'.
-                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/recordlock_warning3.gif','width="17" height="12"').' title="'.htmlspecialchars($lockInfo['msg']).'" alt="" />'.
-                                       '</a>';
-               }
 
                /**
                 * @hook                        recStatInfoHooks: Allows to insert HTML before record icons on various places
@@ -1292,11 +1298,9 @@ class localRecordList extends recordList {
                $setFields=is_array($this->setFields[$table]) ? $this->setFields[$table] : array();
 
                        // Request fields from table:
-               $fields = $this->makeFieldList($table);
+               $fields = $this->makeFieldList($table, false, true);
 
                        // Add pseudo "control" fields
-               $fields[]='tstamp';
-               $fields[]='crdate';
                $fields[]='_PATH_';
                $fields[]='_REF_';
                $fields[]='_LOCALIZATION_';