Index: t3lib/class.t3lib_recordlist.php
===================================================================
--- t3lib/class.t3lib_recordlist.php (revision 3545)
+++ t3lib/class.t3lib_recordlist.php (working copy)
@@ -84,13 +84,15 @@
var $leftMargin = 0; // OBSOLETE - NOT USED ANYMORE. leftMargin
var $showIcon = 1;
var $no_noWrap = 0;
- var $oddColumnsTDParams =''; // If set this is
-params for odd columns in addElement. Used with db_layout / pages section
+ var $oddColumnsTDParams =''; // Deprecated since TYPO3 4.2, remove in 4.4. If set this is | -params for odd columns in addElement. Used with db_layout / pages section
+ var $oddColumnsCSSClass =''; // If set this is | CSS-classname for odd columns in addElement. Used with db_layout / pages section
var $backPath='';
var $fieldArray = Array(); // Decides the columns shown. Filled with values that refers to the keys of the data-array. $this->fieldArray[0] is the title column.
- var $addElement_tdParams = array(); // Keys are fieldnames and values are td-parameters to add in addElement();
-
+ var $addElement_tdParams = array(); // Keys are fieldnames and values are td-parameters to add in addElement(), please use $addElement_tdCSSClass for CSS-classes;
+ var $addElement_tdCSSClass = array(); // Keys are fieldnames and values are td-css-classes to add in addElement();
+
// Not used in this class - but maybe extension classes...
- var $fixedL = 50; // Max length of strings
+ var $fixedL = 30; // Max length of strings
var $script = '';
var $thumbScript = 'thumbs.php';
var $setLMargin=1; // Set to zero, if you don't want a left-margin with addElement function
@@ -120,17 +122,17 @@
* @param string $altLine is the HTML -tag for an alternative 'gfx/ol/line.gif'-icon (used in the top)
* @return string HTML content for the table row
*/
- function addElement($h,$icon,$data,$tdParams='',$lMargin='',$altLine='') {
+ function addElement($h, $icon, $data, $trParams='', $lMargin='', $altLine='') {
$noWrap = ($this->no_noWrap) ? '' : ' nowrap="nowrap"';
// Start up:
$out='
- | ';
+
';
// Show icon and lines
if ($this->showIcon) {
$out.='
- ';
+ | ';
if (!$h) {
# $out.='backPath,'gfx/ol/halfline.gif','width="18" height="8"').' alt="" />';
@@ -154,18 +156,17 @@
$lastKey='';
$c=0;
$ccount=0;
- $tdP[0] = $this->oddColumnsTDParams ? $this->oddColumnsTDParams : $tdParams;
- $tdP[1] = $tdParams;
// Traverse field array which contains the data to present:
reset($this->fieldArray);
while(list(,$vKey)=each($this->fieldArray)) {
if (isset($data[$vKey])) {
if ($lastKey) {
+ $CSSClass = ($this->oddColumnsCSSClass && $ccount%2==0)? implode(' ', array($this->addElement_tdCSSClass[$lastKey], $this->oddColumnsCSSClass)) : $this->addElement_tdCSSClass[$lastKey];
$out.='
| addElement_tdParams[$lastKey].
'>'.$data[$lastKey].' | ';
@@ -179,8 +180,10 @@
}
if ($c>1) {$colsp=' colspan="'.$c.'"';} else {$colsp='';}
}
- if ($lastKey) { $out.='
- addElement_tdParams[$lastKey].'>'.$data[$lastKey].' | '; }
+ if ($lastKey) {
+ $CSSClass = $this->oddColumnsCSSClass ? implode(' ', array($this->addElement_tdCSSClass[$lastKey], $this->oddColumnsCSSClass)) : $this->addElement_tdCSSClass[$lastKey];
+ $out.='
+ addElement_tdParams[$lastKey].'>'.$data[$lastKey].' | '; }
// End row
$out.='
@@ -377,4 +380,4 @@
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_recordlist.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_recordlist.php']);
}
-?>
\ No newline at end of file
+?>
Index: typo3/class.db_list.inc
===================================================================
--- typo3/class.db_list.inc (revision 3545)
+++ typo3/class.db_list.inc (working copy)
@@ -564,6 +564,9 @@
$code = '['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title',1).'] - '.htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table,$row),$GLOBALS['BE_USER']->uc['titleLen']));
} else {
$code = htmlspecialchars(t3lib_div::fixed_lgd_cs($code,$this->fixedL));
+ if ($code!=htmlspecialchars($origCode)) {
+ $code = ''.$code.'';
+ }
}
switch((string)$this->clickTitleMode) {
@@ -773,4 +776,4 @@
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list.inc']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list.inc']);
}
-?>
\ No newline at end of file
+?>
Index: typo3/class.db_list_extra.inc
===================================================================
--- typo3/class.db_list_extra.inc (revision 3545)
+++ typo3/class.db_list_extra.inc (working copy)
@@ -277,28 +277,34 @@
// Cleaning rowlist for duplicates and place the $titleCol as the first column always!
$this->fieldArray=array();
+ // title Column
$this->fieldArray[] = $titleCol; // Add title column
- if ($this->localizationView && $l10nEnabled) {
- $this->fieldArray[] = '_LOCALIZATION_';
- $this->fieldArray[] = '_LOCALIZATION_b';
- $addWhere.=' AND (
- '.$TCA[$table]['ctrl']['languageField'].'<=0
- OR
- '.$TCA[$table]['ctrl']['transOrigPointerField'].' = 0
- )';
- }
+ // Control-Panel
if (!t3lib_div::inList($rowlist,'_CONTROL_')) {
$this->fieldArray[] = '_CONTROL_';
}
+ // Clipboard
if ($this->showClipboard) {
$this->fieldArray[] = '_CLIPBOARD_';
}
+ // Ref
if (!$this->dontShowClipControlPanels) {
$this->fieldArray[]='_REF_';
}
+ // Path
if ($this->searchLevels) {
$this->fieldArray[]='_PATH_';
}
+ // Localization
+ if ($this->localizationView && $l10nEnabled) {
+ $this->fieldArray[] = '_LOCALIZATION_';
+ $this->fieldArray[] = '_LOCALIZATION_b';
+ $addWhere.=' AND (
+ '.$TCA[$table]['ctrl']['languageField'].'<=0
+ OR
+ '.$TCA[$table]['ctrl']['transOrigPointerField'].' = 0
+ )';
+ }
// Cleaning up:
$this->fieldArray=array_unique(array_merge($this->fieldArray,t3lib_div::trimExplode(',',$rowlist,1)));
if ($this->noControlPanels) {
@@ -368,6 +374,7 @@
if ($this->csvOutput) { // do not do paging when outputting as CSV
$this->iLimit = 0;
}
+
$queryParts = $this->makeQueryArray($table, $id,$addWhere,$selFieldList); // (API function from class.db_list.inc)
$this->setTotalItems($queryParts); // Finding the total amount of records on the page (API function from class.db_list.inc)
@@ -571,8 +578,8 @@
// Background color, if any:
$row_bgColor=
$this->alternateBgColors ?
- (($cc%2)?'' :' class="db_list_alt"') :
- '';
+ (($cc%2)?' class="db_list_normal"' :' class="db_list_alt"') :
+ ' class="db_list_normal"';
// Overriding with versions background color if any:
$row_bgColor = $row['_CSSCLASS'] ? ' class="'.$row['_CSSCLASS'].'"' : $row_bgColor;
@@ -625,6 +632,15 @@
$this->addToCSV($row,$table);
}
+ // Add classes to table cells
+ $this->addElement_tdCSSClass[$titleCol] = 'col-title';
+ $this->addElement_tdCSSClass['_CONTROL_'] = 'col-control';
+ $this->addElement_tdCSSClass['_PATH_'] = 'col-path';
+ $this->addElement_tdCSSClass['_CLIPBOARD_'] = 'col-clipboard';
+ $this->addElement_tdCSSClass['_LOCALIZATION_'] = 'col-localizationa';
+ $this->addElement_tdCSSClass['_LOCALIZATION_b'] = 'col-localizationb';
+
+
// Create element in table cells:
$iOut.=$this->addelement(1,$theIcon,$theData,$row_bgColor);
@@ -735,16 +751,17 @@
$tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
$newContentWizScriptPath = $this->backPath.t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : 'sysext/cms/layout/db_new_content_el.php';
- $theData[$fCol]=''.
+ $theIcon=''.
'backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
'';
} elseif ($table=='pages' && $this->newWizards) {
- $theData[$fCol]=''.
+ $theIcon=''.
'backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
'';
+
} else {
$params='&edit['.$table.']['.$this->id.']=new';
- $theData[$fCol]=''.
+ $theIcon=''.
'backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
'';
}
@@ -755,10 +772,12 @@
$editIdList = implode(',',$currentIdList);
if ($this->clipNumPane()) $editIdList = "'+editList('".$table."','".$editIdList."')+'";
$params='&edit['.$table.']['.$editIdList.']=edit&columnsOnly='.implode(',',$this->fieldArray).'&disHelp=1';
- $theData[$fCol].=''.
+ $theIcon.=''.
'backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$LANG->getLL('editShownColumns',1).'" alt="" />'.
'';
}
+ // add an empty entry, so column count fits again after moving this into $theIcon
+ $theData[$fCol] = ' ';
}
break;
default: // Regular fields header:
@@ -807,7 +826,7 @@
}
// Create and return header table row:
- return $this->addelement(1,'',$theData,' class="c-headLine"','');
+ return $this->addelement(1,$theIcon,$theData,' class="c-headLine"','');
}
@@ -850,6 +869,8 @@
$cells['view']=''.
'backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'" alt="" />'.
'';
+ } elseif(!$this->table) {
+ $cells['view'] = '';
}
// "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
@@ -858,6 +879,8 @@
$cells['edit']=''.
'backPath,'gfx/edit2'.(!$TCA[$table]['ctrl']['readOnly']?'':'_d').'.gif','width="11" height="12"').' title="'.$LANG->getLL('edit',1).'" alt="" />'.
'';
+ } elseif(!$this->table) {
+ $cells['edit'] = '';
}
// "Move" wizard link for pages/tt_content elements:
@@ -865,6 +888,8 @@
$cells['move']=''.
'backPath,'gfx/move_'.($table=='tt_content'?'record':'page').'.gif','width="11" height="12"').' title="'.$LANG->getLL('move_'.($table=='tt_content'?'record':'page'),1).'" alt="" />'.
'';
+ } elseif(!$this->table) {
+ $cells['move'] = '';
}
// If the extended control panel is enabled OR if we are seeing a single table:
@@ -898,6 +923,8 @@
$cells['version']=''.
$lab.
'';
+ } elseif(!$this->table) {
+ $cells['version'] = 'V';
}
}
@@ -906,6 +933,8 @@
$cells['perms']=''.
'backPath,'gfx/perm.gif','width="7" height="12"').' title="'.$LANG->getLL('permissions',1).'" alt="" />'.
'';
+ } elseif(!$this->table && $GLOBALS['BE_USER']->check('modules','web_perm')) {
+ $cells['perms'] = '';
}
// "New record after" link (ONLY if the records in the table are sorted by a "sortby"-row or if default values can depend on previous record):
@@ -921,6 +950,8 @@
'';
}
}
+ } elseif(!$this->table) {
+ $cells['new'] = '';
}
// "Up/Down" links
@@ -941,6 +972,9 @@
} else {
$cells['moveDown']='backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
}
+ } elseif(!$this->table) {
+ $cells['moveUp'] = '';
+ $cells['moveDow'] = '';
}
// "Hide/Unhide" links:
@@ -957,6 +991,8 @@
'backPath,'gfx/button_hide.gif','width="11" height="10"').' title="'.$LANG->getLL('hide'.($table=='pages'?'Page':''),1).'" alt="" />'.
'';
}
+ } elseif(!$this->table) {
+ $cells['hide'] = '';
}
// "Delete" link:
@@ -967,6 +1003,8 @@
$cells['delete']=''.
'backPath,'gfx/garbage.gif','width="11" height="12"').' title="'.$LANG->getLL('delete',1).'" alt="" />'.
'';
+ } elseif(!$this->table) {
+ $cells['delete'] = '';
}
// "Levels" links: Moving pages into new levels...
@@ -993,6 +1031,9 @@
} else {
$cells['moveRight']='backPath,'gfx/button_right.gif','width="11" height="10"',2).' alt="" />';
}
+ } elseif(!$this->table) {
+ $cells['moveLeft'] = '';
+ $cells['moveRight'] = '';
}
}
}
Index: typo3/stylesheet.css
===================================================================
--- typo3/stylesheet.css (revision 3545)
+++ typo3/stylesheet.css (working copy)
@@ -1741,6 +1741,41 @@
background-color: #ebebeb;
}
+table.typo3-dblist tr td.col-icon {
+ width: 40px;
+}
+
+table.typo3-dblist tr td.col-icon a {
+ width: 40px;
+ display: block;
+}
+
+table.typo3-dblist tr td.col-title {
+ width: 240px;
+ overflow: hidden;
+}
+
+table.typo3-dblist tr.c-headLine td.col-title a {
+ width: 240px;
+ display: block;
+ font-weight: bold;
+}
+
+table.typo3-dblist tr td.col-control {
+ width: 250px;
+ text-align: left;
+}
+
+table.typo3-dblist tr.c-headLine td.col-control a{
+ width: 250px;
+ display: block;
+}
+
+table.typo3-dblist tr td.col-clipboard {
+ width: 64px;
+ text-align: left;
+}
+
table.typo3-dblist-overview {
width: 410px;
margin-top: 10px;
Index: typo3/sysext/cms/layout/class.tx_cms_layout.php
===================================================================
--- typo3/sysext/cms/layout/class.tx_cms_layout.php (revision 3545)
+++ typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy)
@@ -285,7 +285,7 @@
// Overriding a few things:
$this->no_noWrap=0;
- $this->oddColumnsTDParams=' class="bgColor3-20"';
+ $this->oddColumnsCSSClass='bgColor3-20';
// Items
$this->eCounter=$this->firstElementNumber;
@@ -355,7 +355,7 @@
}
// Start table:
- $this->oddColumnsTDParams = '';
+ $this->oddColumnsCSSClass = '';
// CSH:
$out = t3lib_BEfunc::cshItem($this->descrTable,'func_'.$pKey,$GLOBALS['BACK_PATH']).
@@ -365,7 +365,7 @@
$out.'
';
}
- $this->oddColumnsTDParams = '';
+ $this->oddColumnsCSSClass = '';
return $out;
}
Index: typo3/sysext/t3skin/ext_tables.php
===================================================================
--- typo3/sysext/t3skin/ext_tables.php (revision 3545)
+++ typo3/sysext/t3skin/ext_tables.php (working copy)
@@ -98,6 +98,8 @@
'relDir' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/',
'forceFileExtension' => 'gif', // Force to look for PNG alternatives...
# 'scaleFactor' => 2/3, // Scaling factor, default is 1
+ 'iconSizeWidth' => 16,
+ 'iconSizeHeight' => 16,
);
// Manual setting up of alternative icons. This is mainly for module icons which has a special prefix:
@@ -154,4 +156,4 @@
}
-?>
\ No newline at end of file
+?>
Index: typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css
===================================================================
--- typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (revision 3545)
+++ typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (working copy)
@@ -9,7 +9,7 @@
}
table.typo3-dblist tr td.db_list_alt,
-typo3-page-stdlist tr td.db_list_alt {
+table.typo3-page-stdlist tr td.db_list_alt {
background-color: #E4E5F0;
}
@@ -18,15 +18,15 @@
background-color: #EFEFF4;
}
-table.typo3-dblist td.c-headLineTable,
-table.typo3-page-stdlist td.c-headLineTable {
+table.typo3-dblist tr.c-headLineTable td,
+table.typo3-page-stdlist tr.c-headLineTable td {
background-color: #B8BEC9;
background-image: url('../icons/gfx/alt_menu_mainitem_bg.gif');
background-repeat: repeat-x;
}
-table.typo3-dblist td.c-headLineTable a,
-table.typo3-page-stdlist td.c-headLineTable a {
+table.typo3-dblist tr.c-headLineTable td a,
+table.typo3-page-stdlist tr.c-headLineTable td a {
font-weight: bold;
color: #FFFFFF;
}
@@ -40,8 +40,8 @@
background-repeat: repeat-x;
}
-table.typo3-dblist td.c-table-row-spacer,
-table.typo3-page-stdlist td.c-table-row-spacer {
+table.typo3-dblist tr.c-table-row-spacer td,
+table.typo3-page-stdlist tr.c-table-row-spacer td{
display: none;
}
@@ -64,3 +64,6 @@
margin: 1px 1px 1px 10px;
float: right;
}
+
+
+