From: Joe Hunt Date: Fri, 16 Jan 2009 01:47:07 +0000 (+0000) Subject: Changed db_pager_view to only use one table (sometimes bad layout) X-Git-Tag: v2.4.2~19^2~1607 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=fcd76fd649bd40f4111ee419ad2125c28e183d14 Changed db_pager_view to only use one table (sometimes bad layout) --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3e8b25d1..53e0b1a1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -20,8 +20,12 @@ Legend: $ -> Affected files 15-Jan-2009 Joe Hunt -! Adjustment of db pager width. Copyright notes. +! Adjustment of db pager width. Copyright notes. $ All files with db pager + /db_pager_view.inc + /themes/default/default.css + /themes/aqua/default.css + /themes/cool/default.css 15-Jan-2009 Janusz Dobrowolski ! Rewritten reconciliation page. diff --git a/includes/ui/db_pager_view.inc b/includes/ui/db_pager_view.inc index dfd2ecc5..573cae28 100644 --- a/includes/ui/db_pager_view.inc +++ b/includes/ui/db_pager_view.inc @@ -59,7 +59,7 @@ function display_db_pager(&$pager) { } } /* show a table of records returned by the sql */ - start_table("$table_style width=".$pager->width); + start_table("$table_style width=$pager->width"); table_header($headers, 'nowrap'); if($pager->header_fun) { // if set header handler @@ -153,18 +153,22 @@ function display_db_pager(&$pager) { end_row(); } - end_table(); - start_table("$table_style align='center' class='navibar' width=".$pager->width); - start_row(); + //end_table(); + //start_table("$table_style align='center' class='navibar' width=100%"); + /* + start_row("class='navibar'"); + $colspan = count($pager->columns); if($pager->rec_count) { $from = ($pager->curr_page-1)*$pager->page_len+1; $to = $from + $pager->page_len - 1; if ($to > $pager->rec_count) $to = $pager->rec_count; $all = $pager->rec_count; + $lcols = ($colspan > 4 ? 3 : 2); label_cell(sprintf( _('Records %d-%d of %d'), $from, $to, $all), - "style='border:none'"); - echo ""; + "colspan=$lcols class='navibar' style='border:none'"); + //echo ""; + echo ""; $but_pref = $pager->name.'_page_'; start_table("align='right'"); start_row(); @@ -176,9 +180,37 @@ function display_db_pager(&$pager) { end_table(); echo ""; } else { - label_cell( _('No records')); + label_cell( _('No records'), "colspan=$colspan class='navibar'"); } end_row(); + */ + start_row("class='navibar'"); + $colspan = count($pager->columns); + if($pager->rec_count) { + echo ""; + echo "
"; + $but_pref = $pager->name.'_page_'; + start_table(); + start_row(); + echo navi_button_cell($but_pref.'first', _('First'), $pager->first_page, 'right'); + echo navi_button_cell($but_pref.'prev', _('Prev'), $pager->prev_page,'right'); + echo navi_button_cell($but_pref.'next', _('Next'), $pager->next_page,'right'); + echo navi_button_cell($but_pref.'last', _('Last'), $pager->last_page, 'right'); + end_row(); + end_table(); + echo "
"; + $from = ($pager->curr_page-1)*$pager->page_len+1; + $to = $from + $pager->page_len - 1; + if ($to > $pager->rec_count) + $to = $pager->rec_count; + $all = $pager->rec_count; + echo sprintf( _('Records %d-%d of %d'), $from, $to, $all); + echo ""; + } else { + label_cell( _('No records'), "colspan=$colspan class='navibar'"); + } + end_row(); + end_table(); if (isset($pager->marker_txt)) diff --git a/themes/aqua/default.css b/themes/aqua/default.css index 77b80f18..e7693f2c 100644 --- a/themes/aqua/default.css +++ b/themes/aqua/default.css @@ -389,16 +389,12 @@ button.navibutton { } .navibar { + color: #000; padding: 0 3px; border: 1px solid #8cacbb; border-collapse: collapse; background-color: #d5cea7; } -table.navibar td { - color: #000; - border: 0px none; -} - .listsubmit { display: none; diff --git a/themes/cool/default.css b/themes/cool/default.css index 4105d5de..7951e3da 100644 --- a/themes/cool/default.css +++ b/themes/cool/default.css @@ -393,17 +393,13 @@ button.navibutton { } .navibar { + color: #fff; padding: 0 3px; border: 1px solid #cccccc; border-collapse: collapse; background-color: #788da1; } -table.navibar td { - color: #fff; - border: 0px none; -} - .listsubmit { display: none; diff --git a/themes/default/default.css b/themes/default/default.css index f58c3cff..0877db95 100644 --- a/themes/default/default.css +++ b/themes/default/default.css @@ -389,17 +389,13 @@ button.navibutton { } .navibar { + color: #000; padding: 0 3px; border: 1px solid #8cacbb; border-collapse: collapse; background-color: #dee7ec; } -table.navibar td { - color: #000; - border: 0px none; -} - .listsubmit { display: none; }