From 7dc7034861ef2c3e7c4e044403b70ccecb4cf405 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 23 Oct 2008 19:03:45 +0000 Subject: [PATCH] fixed pagination in asset manager --- lib/WebGUI/Content/AssetManager.pm | 5 ++- .../build/assetManager/assetManager.js | 43 ++++++------------- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index c4214d25d..6997e25ae 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -402,7 +402,10 @@ sub www_manage { my $extras = $session->url->extras; $session->style->setRawHeadTags( < + + + + diff --git a/www/extras/yui-webgui/build/assetManager/assetManager.js b/www/extras/yui-webgui/build/assetManager/assetManager.js index 3cc944cf2..2dd9a6aef 100644 --- a/www/extras/yui-webgui/build/assetManager/assetManager.js +++ b/www/extras/yui-webgui/build/assetManager/assetManager.js @@ -48,8 +48,7 @@ WebGUI.AssetManager.findRow WebGUI.AssetManager.formatActions ( ) Format the Edit and More links for the row */ -WebGUI.AssetManager.formatActions -= function ( elCell, oRecord, oColumn, orderNumber ) { +WebGUI.AssetManager.formatActions = function ( elCell, oRecord, oColumn, orderNumber ) { elCell.innerHTML = 'Edit' + ' | ' @@ -93,8 +92,7 @@ WebGUI.AssetManager.formatActions WebGUI.AssetManager.formatAssetIdCheckbox ( ) Format the checkbox for the asset ID. */ -WebGUI.AssetManager.formatAssetIdCheckbox -= function ( elCell, oRecord, oColumn, orderNumber ) { +WebGUI.AssetManager.formatAssetIdCheckbox = function ( elCell, oRecord, oColumn, orderNumber ) { elCell.innerHTML = ''; }; @@ -103,8 +101,7 @@ WebGUI.AssetManager.formatAssetIdCheckbox WebGUI.AssetManager.formatAssetSize ( ) Format the asset class name */ -WebGUI.AssetManager.formatAssetSize -= function ( elCell, oRecord, oColumn, orderNumber ) { +WebGUI.AssetManager.formatAssetSize = function ( elCell, oRecord, oColumn, orderNumber ) { elCell.innerHTML = oRecord.getData( "assetSize" ); }; @@ -112,8 +109,7 @@ WebGUI.AssetManager.formatAssetSize WebGUI.AssetManager.formatClassName ( ) Format the asset class name */ -WebGUI.AssetManager.formatClassName -= function ( elCell, oRecord, oColumn, orderNumber ) { +WebGUI.AssetManager.formatClassName = function ( elCell, oRecord, oColumn, orderNumber ) { elCell.innerHTML = ' ' + oRecord.getData( "className" ); }; @@ -122,8 +118,7 @@ WebGUI.AssetManager.formatClassName WebGUI.AssetManager.formatLockedBy ( ) Format the asset class name */ -WebGUI.AssetManager.formatLockedBy -= function ( elCell, oRecord, oColumn, orderNumber ) { +WebGUI.AssetManager.formatLockedBy = function ( elCell, oRecord, oColumn, orderNumber ) { var extras = WebGUI.AssetManager.extrasUrl; elCell.innerHTML = oRecord.getData( 'lockedBy' ) @@ -142,8 +137,7 @@ WebGUI.AssetManager.formatLockedBy WebGUI.AssetManager.formatRank ( ) Format the input for the rank box */ -WebGUI.AssetManager.formatRank -= function ( elCell, oRecord, oColumn, orderNumber ) { +WebGUI.AssetManager.formatRank = function ( elCell, oRecord, oColumn, orderNumber ) { var rank = oRecord.getData("lineage").match(/[1-9][0-9]{0,5}$/); elCell.innerHTML = '' + ( oRecord.getData( 'childCount' ) > 0 ? "+" : " " ) + ' ' @@ -206,8 +197,7 @@ WebGUI.AssetManager.formatTitle WebGUI.AssetManager.initManager ( ) Initialize the www_manage page */ -WebGUI.AssetManager.initManager -= function (o) { +WebGUI.AssetManager.initManager = function (o) { var assetPaginator = new YAHOO.widget.Paginator({ containers : ['pagination'], pageLinks : 7, @@ -280,7 +270,6 @@ WebGUI.AssetManager.initManager WebGUI.AssetManager.DataSource, { initialRequest : 'recordOffset=0', - generateRequest : WebGUI.AssetManager.BuildQueryString, dynamicData : true, paginator : assetPaginator, sortedBy : WebGUI.AssetManager.DefaultSortedBy @@ -336,8 +325,7 @@ WebGUI.AssetManager.initManager WebGUI.AssetManager.removeHighlightFromRow ( child ) Remove the highlight from a row by removing the "highlight" class. */ -WebGUI.AssetManager.removeHighlightFromRow -= function ( child ) { +WebGUI.AssetManager.removeHighlightFromRow = function ( child ) { var row = WebGUI.AssetManager.findRow( child ); if ( YAHOO.util.Dom.hasClass( row, "highlight" ) ) { YAHOO.util.Dom.removeClass( row, "highlight" ); @@ -349,8 +337,7 @@ WebGUI.AssetManager.removeHighlightFromRow Check the assetId checkbox in the row that contains the given child. Used when something in the row changes. */ -WebGUI.AssetManager.selectRow -= function ( child ) { +WebGUI.AssetManager.selectRow = function ( child ) { // First find the row var node = WebGUI.AssetManager.findRow( child ); WebGUI.AssetManager.addHighlightToRow( child ); @@ -369,8 +356,7 @@ WebGUI.AssetManager.selectRow WebGUI.AssetManager.toggleHighlightForRow ( checkbox ) Toggle the highlight for the row based on the state of the checkbox */ -WebGUI.AssetManager.toggleHighlightForRow -= function ( checkbox ) { +WebGUI.AssetManager.toggleHighlightForRow = function ( checkbox ) { if ( checkbox.checked ) { WebGUI.AssetManager.addHighlightToRow( checkbox ); } @@ -384,8 +370,7 @@ WebGUI.AssetManager.toggleHighlightForRow Toggles the entire row by finding the checkbox and doing what needs to be done. */ -WebGUI.AssetManager.toggleRow -= function ( child ) { +WebGUI.AssetManager.toggleRow = function ( child ) { var row = WebGUI.AssetManager.findRow( child ); // Find the checkbox