From 2d8210bb78a6baf1ceb9c8b3708622f72a36794f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 17 Mar 2008 22:23:06 +0000 Subject: [PATCH] fix a submit problem, add some comments --- lib/WebGUI/Shop/Transaction.pm | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/lib/WebGUI/Shop/Transaction.pm b/lib/WebGUI/Shop/Transaction.pm index f58a78315..d0ac1aee0 100644 --- a/lib/WebGUI/Shop/Transaction.pm +++ b/lib/WebGUI/Shop/Transaction.pm @@ -393,17 +393,21 @@ sub www_manage { return $session->privilege->insufficient() unless $admin->canManage; my $i18n = WebGUI::International->new($session, 'Shop'); my ($style, $url) = $session->quick(qw(style url)); + + # set up all the files that we need $style->setLink($url->extras('/yui/build/fonts/fonts-min.css'), {rel=>'stylesheet', type=>'text/css'}); $style->setLink($url->extras('/yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type=>'text/css'}); $style->setScript($url->extras('/yui/build/utilities/utilities.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('/yui/build/json/json.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('/yui/build/datasource/datasource-beta.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('/yui/build/datatable/datatable-beta.js'), {type=>'text/javascript'}); + $style->setScript($url->extras('/yui/build/json/json-min.js'), {type=>'text/javascript'}); + $style->setScript($url->extras('/yui/build/datasource/datasource-beta-min.js'), {type=>'text/javascript'}); + $style->setScript($url->extras('/yui/build/datatable/datatable-beta-min.js'), {type=>'text/javascript'}); + + # draw the html markup that's needed $style->setRawHeadTags(''); my $output = q|
- +
@@ -415,6 +419,8 @@ YAHOO.util.Event.onDOMReady(function () { DataTable = YAHOO.widget.DataTable, Paginator = YAHOO.widget.Paginator; |; + + # the datasource deals with the stuff returned from www_getTransactionsAsJson $output .= "var mySource = new DataSource('".$url->page('shop=transaction;method=getTransactionsAsJson')."');"; $output .= <{CurrentPageReport} {PreviousPageLink} {PageLinks} {NextPageLink} {RowsPerPageDropdown}" }); +STOP + # create the data table, and a special formatter for the view transaction urls + $output .= <get('payment method').'"},'; $output .= < STOP - + # render everything to a web page return $admin->getAdminConsole->render($output, $i18n->get('transactions')); }