From 1453900e015f80a40f877cd896bc2fb4dc225909 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 20 Mar 2008 05:17:33 +0000 Subject: [PATCH] renamed www_view to www_manage, and added more JS --- lib/WebGUI/Shop/Tax.pm | 44 +++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm index eafbac434..4fd9eb380 100644 --- a/lib/WebGUI/Shop/Tax.pm +++ b/lib/WebGUI/Shop/Tax.pm @@ -376,14 +376,14 @@ sub www_getTaxesAsJson { #------------------------------------------------------------------- -=head2 www_view ( ) +=head2 www_manage ( ) User interface to manage taxes. Provides a list of current taxes, and forms for adding new tax info, exporting and importing sets of taxes, and deleting individual tax data. =cut -sub www_view { +sub www_manage { my $self = shift; my $session = $self->session; my $admin = WebGUI::Shop::Admin->new($session); @@ -423,20 +423,22 @@ EODIV ##Build datasource with URL. $output .= sprintf <<'EODSURL', $url->page('shop=tax;method=getTaxesAsJson'); var mySource = new DataSource('%s'); -EODSURL - $output .= <{CurrentPageReport} {PreviousPageLink} {PageLinks} {NextPageLink} {RowsPerPageDropdown}" }); + + ##Configure the table to use the paginator. + var myTableConfig = { + initialRequest : ';startIndex=0', + generateRequest : buildQueryString, + paginationEventHandler : DataTable.handleDataSourcePagination, + paginator : myPaginator + }; STOP - ##Build column headers. $output .= sprintf <<'EOCHJS', $i18n->get('country'), $i18n->get('state'), $i18n->get('city'), $i18n->get('code'); -var taxColumnDefs = [ - {key:"country", label:"%s"}, - {key:"state", label:"%s"}, - {key:"city", label:"%s"}, - {key:"code", label:"%s"} -]; + ##Build column headers. + var taxColumnDefs = [ + {key:"country", label:"%s"}, + {key:"state", label:"%s"}, + {key:"city", label:"%s"}, + {key:"code", label:"%s"} + ]; EOCHJS + $output .= <