Project

General

Profile

Feature #15818 » 2859_v2.diff

Administrator Admin, 2009-01-22 18:28

View differences:

typo3/class.db_list.inc (working copy)
var $pageRecord = array(); // Loaded with page record with version overlay if any.
var $hideTables = ''; // Tables which should not get listed
var $tableTSconfigOverTCA = array(); //TSconfig which overwrites TCA-Settings
var $tablesCollapsed = array(); // Array of collapsed / uncollapsed tables in multi table view
// Internal, dynamic:
var $JScode = ''; // JavaScript code accumulation
......
}
}
// Get configuration of collapsed tables from user uc and merge with sanitized GP vars
$this->tablesCollapsed = is_array($GLOBALS['BE_USER']->uc['moduleData']['db_list.php']) ? $GLOBALS['BE_USER']->uc['moduleData']['db_list.php'] : array();
$collapseOverride = t3lib_div::_GP('collapse');
if (is_array($collapseOverride)) {
foreach($collapseOverride as $collapseTable => $collapseValue) {
if (is_array($GLOBALS['TCA'][$collapseTable]) && ($collapseValue == 0 || $collapseValue == 1)) {
$this->tablesCollapsed[$collapseTable] = $collapseValue;
}
}
// Save modified user uc
$GLOBALS['BE_USER']->uc['moduleData']['db_list.php'] = $this->tablesCollapsed;
$GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc);
}
if ($sL>0) {
$tree = $this->getTreeObject($id,$sL,$this->perms_clause);
$this->pidSelect = 'pid IN ('.implode(',',$tree->ids).')';
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list.inc']);
}
?>
?>
typo3/stylesheet.css (working copy)
width: 40px;
}
table.typo3-dblist tr td.col-icon a {
table.typo3-dblist tr td.col-icon span {
width: 40px;
display: block;
}
table.typo3-dblist tr td.col-icon img.collapseIcon {
margin: 0px 8px 0px 2px;
}
table.typo3-dblist tr td.col-title {
width: 240px;
overflow: hidden;
typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (working copy)
background-color: transparent;
}
table.typo3-dblist tr td.col-icon img.collapseIcon {
margin: 3px 8px 0px 2px;
}
tr.firstcol td.col-control,
tr.firstcol td.col-clipboard {
border-top: 1px solid #d7d8e2;
typo3/sysext/lang/locallang_core.xml (working copy)
<label index="labels.path">Path</label>
<label index="labels.table">Table</label>
<label index="labels.upOneLevel">Up one level</label>
<label index="labels.expandTable">Expand table</label>
<label index="labels.collapseTable">Collapse table</label>
<label index="labels.enterSearchString">Search String:</label>
<label index="labels.enterSearchLevels">This page|1 level down|2 levels down|3 levels down|4 levels down</label>
<label index="labels.noEditPermission">Sorry, you didn't have proper permissions to perform this change.</label>
typo3/class.db_list_extra.inc (working copy)
$titleCol = $TCA[$table]['ctrl']['label'];
$thumbsCol = $TCA[$table]['ctrl']['thumbnail'];
$l10nEnabled = $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField'] && !$TCA[$table]['ctrl']['transOrigPointerTable'];
$tableCollapsed = (!$this->tablesCollapsed[$table]) ? FALSE : TRUE;
// prepare space icon
$iconWidth = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeWidth'] ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['iconSizeWidth'] : 12;
......
// If the count query returned any number of records, we perform the real query, selecting records.
if ($this->totalItems) {
if ($listOnlyInSingleTableMode) {
// Fetch records only if not in single table mode or if in multi table mode and not collapsed
if ($listOnlyInSingleTableMode || (!$this->table && $tableCollapsed)) {
$dbCount = $this->totalItems;
} else {
// set the showLimit to the number of records when outputting as CSV
......
}
}
} else {
// Render collapse button if in multi table mode
$collapseIcon = '';
if (!$this->table) {
$collapseIcon = '<a href="' . htmlspecialchars($this->listURL()) . '&collapse[' . $table . ']=' . ($tableCollapsed ? '0' : '1') . '"><img' . t3lib_iconWorks::skinImg($this->backPath,'gfx/select' . ($tableCollapsed ? 'all' : 'none') . '.gif') . ' class="collapseIcon" "alt="" title="' . ($tableCollapsed ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.expandTable',1) : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.collapseTable',1)) . '" /></a>';
}
// Render page up icon for page table
$theUpIcon = ($table=='pages'&&$this->id&&isset($this->pageRow['pid'])) ? '<a href="'.htmlspecialchars($this->listURL($this->pageRow['pid'])).'" onclick="setHighlight('.$this->pageRow['pid'].')"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/pages_up.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" /></a>':'';
$out.=$this->addelement(1,$theUpIcon,$theData,' class="c-headLineTable"','');
$out .= $this->addelement(1, '<span>' . $collapseIcon . $theUpIcon . '</span>', $theData, ' class="c-headLineTable"', '');
}
If (!$listOnlyInSingleTableMode) {
// Render table rows only if in multi table view and not collapsed or if in single table view
if (!$listOnlyInSingleTableMode && (!$tableCollapsed || $this->table)) {
// Fixing a order table for sortby tables
$this->currentTable = array();
$currentIdList = array();
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc']);
}
?>
?>
(2-2/3)