Project

General

Profile

Feature #17225 » 5466_v11.diff

Administrator Admin, 2009-03-07 02:28

View differences:

typo3/stylesheet.css (working copy)
width: 93%;
}
div#typo3-dblist-pagination {
padding: 5px 0;
white-space: nowrap;
}
div#typo3-dblist-pagination img, div#typo3-dblist-pagination span.pageIndicator {
margin-right: 6px;
}
div#typo3-dblist-pagination img {
vertical-align: bottom;
padding-bottom: 2px;
}
div#typo3-dblist-pagination span.bar {
border-left: 1px solid #5485c3;
padding: 0 2px;
}
/* - - - - - - - - - - - - - - - - - - - - -
Web > Template
typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (working copy)
border-right: 1px solid #d7d8e2;
padding-right: 0px;
}
tr.fwd_rwd_nav td {
padding: 4px 0;
div#typo3-dblist-pagination img {
padding-bottom: 1px;
}
typo3/sysext/lang/locallang_mod_web_list.xml (working copy)
<label index="multipleLanguages">All languages</label>
<label index="Localize">Localize to:</label>
<label index="viewRecords">Viewing records of</label>
<label index="pageIndicator">Page %1$s of %2$d</label>
<label index="rangeIndicator">Records %1$d - %2$d</label>
</languageKey>
</data>
</T3locallang>
typo3/sysext/lang/locallang_common.xml (working copy)
<label index="enable">Enable</label>
<label index="file">File</label>
<label index="files">Files</label>
<label index="first">First</label>
<label index="go">Go</label>
<label index="goTo">Go to</label>
<label index="help">Help</label>
<label index="item">Item</label>
<label index="items">Items</label>
<label index="last">Last</label>
<label index="left">Left</label>
<label index="login">Login</label>
<label index="logout">Logout</label>
typo3/class.db_list_extra.inc (working copy)
$iOut = '';
$cc = 0;
foreach($accRows as $row) {
// Forward/Backwards navigation links:
list($flag,$code) = $this->fwd_rwd_nav($table);
$iOut.=$code;
// If render item, increment counter and call function
if ($flag) {
// Render item row if counter < limit
if ($cc < $this->iLimit) {
$cc++;
$iOut.= $this->renderListRow($table,$row,$cc,$titleCol,$thumbsCol);
......
$this->eCounter++;
}
// Record navigation is added to the beginning and end of the table if in single table mode
if ($this->table) {
$pageNavigation = $this->renderListNavigation();
$iOut = $pageNavigation . $iOut . $pageNavigation;
}
// The header row for the table is now created:
$out.=$this->renderListHeader($table,$currentIdList);
}
......
return $this->addelement(1, $icon, $theData, ' class="c-headLine"', '');
}
/**
* Creates a page browser for tables with many records
*
* @return string Navigation HTML
*
* @author Dmitry Pikhno <dpi@goldenplanet.com>
* @author Christian Kuhn <lolli@schwarzbu.ch>
*/
protected function renderListNavigation() {
$totalPages = ceil($this->totalItems / $this->iLimit);
$content = '';
// Show page selector if not all records fit into one page
if ($totalPages > 1) {
$first = $previous = $next = $last = $reload = '';
$listURL = $this->listURL('', $this->table);
// 1 = first page
$currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;
// Compile first, previous, next, last and refresh buttons
if ($currentPage > 1) {
$labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:first');
$first = '<a href="' . $listURL . '&pointer=0">
<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_first.gif')
. 'alt="' . $labelFirst . '" title="' . $labelFirst . '" />
</a>';
} else {
$first = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_first_disabled.gif') . 'alt="" title="" />';
}
if (($currentPage - 1) > 0) {
$labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:previous');
$previous = '<a href="' . $listURL . '&pointer=' . (($currentPage - 2) * $this->iLimit) . '">
<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_previous.gif')
. 'alt="' . $labelPrevious . '" title="' . $labelPrevious . '" />
</a>';
} else {
$previous = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_previous_disabled.gif') . 'alt="" title="" />';
}
if (($currentPage + 1) <= $totalPages) {
$labelNext = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:next');
$next = '<a href="' . $listURL . '&pointer=' . (($currentPage) * $this->iLimit) . '">
<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_next.gif')
. 'alt="' . $labelNext . '" title="' . $labelNext . '" />
</a>';
} else {
$next = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_next_disabled.gif') . 'alt="" title="" />';
}
if ($currentPage != $totalPages) {
$labelLast = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:last');
$last = '<a href="' . $listURL . '&pointer=' . (($totalPages - 1) * $this->iLimit) . '">
<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_last.gif')
. 'alt="' . $labelLast . '" title="' . $labelLast . '" />
</a>';
} else {
$last = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/control_last_disabled.gif') . 'alt="" title="" />';
}
$reload = '<a href="#" onclick="document.dblistForm.action=\''
. $listURL . '&pointer=\'+calculatePointer(); document.dblistForm.submit(); return true;">
<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/refresh_n.gif')
. 'alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:reload')
. '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:reload')
. '" /></a>';
// Add js to traverse a page select input to a pointer value
$content = '
<script type="text/JavaScript">
/*<![CDATA[*/
function calculatePointer(){
page = document.getElementById(\'jumpPage\').value;
if (page > ' . $totalPages . ') {
page = ' . $totalPages . ';
}
if (page < 1) {
page = 1;
}
pointer = (page - 1) * ' . $this->iLimit . ';
return pointer;
}
/*]]>*/
</script>
';
$pageNumberInput = '<span>
<input type="text" value="' . $currentPage
. '" size="3" id="jumpPage" name="jumpPage" onkeyup="if (event.keyCode == Event.KEY_RETURN) { document.dblistForm.action=\'' . $listURL . '&pointer=\'+calculatePointer(); document.dblistForm.submit(); } return true;" />
</span>';
$pageIndicator = '<span class="pageIndicator">'
. sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:pageIndicator'), $pageNumberInput, $totalPages)
. '</span>';
if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {
$lastElementNumber = $this->firstElementNumber + $this->iLimit;
} else {
$lastElementNumber = $this->totalItems;
}
$rangeIndicator = '<span class="pageIndicator">'
. sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:rangeIndicator'), $this->firstElementNumber + 1, $lastElementNumber)
. '</span>';
$content .= '<div id="typo3-dblist-pagination">'
. $first . $previous
. '<span class="bar">&nbsp;</span>'
. $rangeIndicator . '<span class="bar">&nbsp;</span>'
. $pageIndicator . '<span class="bar">&nbsp;</span>'
. $next . $last . '<span class="bar">&nbsp;</span>'
. $reload
. '</div>';
} // end of if pages > 1
$data = Array();
$titleColumn = $this->fieldArray[0];
$data[$titleColumn] = $content;
return ($this->addElement(1, '', $data));
}
/*********************************
*
* Rendering of various elements
(9-9/9)