fixed: Asset Manager shows data error when no child assets to display

changed: show 25 items per page in asset manager
This commit is contained in:
Graham Knop 2008-07-08 20:53:31 +00:00
parent 491544d5e4
commit cf1dce7a7f
3 changed files with 8 additions and 6 deletions

View file

@ -6,6 +6,8 @@
- fixed: Syndicated Content doesn't always decode text properly
- fixed: Syndicated Content caches improperly
- added File::Path 2.04 as a prerequisite
- fixed: Asset Manager shows data error when no child assets to display
- changed: show 25 items per page in asset manager
7.5.15
- fixed: Colorpicker window would not open (Martin Kamerbeek / Oqapi)

View file

@ -2,7 +2,7 @@ package WebGUI::Content::AssetManager;
use strict;
use JSON qw( from_json to_json );
use JSON qw( decode_json encode_json );
use URI;
use WebGUI::Form;
use WebGUI::Paginator;
@ -221,7 +221,7 @@ sub getMoreMenu {
};
}
return to_json \@more_fields;
return encode_json \@more_fields;
}
#----------------------------------------------------------------------------
@ -271,7 +271,7 @@ formatted in a WebGUI.AssetManager data table.
sub www_ajaxGetManagerPage {
my $session = shift;
my $i18n = WebGUI::International->new( $session, "Asset" );
my $assetInfo = {};
my $assetInfo = { assets => [] };
my $p = getManagerPaginator( $session );
for my $assetId ( @{ $p->getPageData } ) {
@ -307,7 +307,7 @@ sub www_ajaxGetManagerPage {
$assetInfo->{ dir } = lc $session->form->get( 'orderByDirection' );
$session->http->setMimeType( 'application/json' );
return to_json( $assetInfo );
return encode_json( $assetInfo );
}
#----------------------------------------------------------------------------
@ -406,7 +406,7 @@ ENDHTML
}
# And ourself
$output .= sprintf q{<li><a href="#" onclick="WebGUI.AssetManager.showMoreMenu('%s')">%s</a></li>},
$output .= sprintf q{<li><a href="#" onclick="WebGUI.AssetManager.showMoreMenu('%s'); return false;">%s</a></li>},
$currentAsset->getUrl,
$currentAsset->get( "menuTitle" ),
;

View file

@ -186,7 +186,7 @@ WebGUI.AssetManager.initManager
var assetPaginator = new YAHOO.widget.Paginator({
containers : ['pagination'],
pageLinks : 7,
rowsPerPage : 15,
rowsPerPage : 25,
template : "<strong>{CurrentPageReport}</strong> {PreviousPageLink} {PageLinks} {NextPageLink}"
});