<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<CMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Authoring/
'				/ImageBrowser/ImageResources/CNCGridDecorator_ThumbnailSort.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Implements the INCGridDecorator Interface for the Resource
'			Management display-as-thumbnail page
'
' Implement INCGridDecorator Interface:
'	- Sub RenderColumnHeadTRAttrib()
'	- Sub RenderColumnHeadTDAttrib( strColumnIndex )
'	- Sub RenderColumnHeadTDContent( strColumnIndex )
'	- Sub RenderItemTRAttrib( pObject, nCollectionIndex, nDisplayIndex )
'	- Sub RenderItemTDAttrib( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
'	- Sub RenderItemTDContent( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
'	- Sub SortCollection( strSortByColumn, colObjects, bAscending )
' ********************************************************************


Class CNCGridDecorator_ThumbnailSort

	' ---- [Public] Render the column head <TR> attributes
	Public Sub RenderColumnHeadTRAttrib()
	End Sub

	' ---- [Public] Render the column head <TD> attributes
	Public Sub RenderColumnHeadTDAttrib( strColumnIndex )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_DISPLAYNAME
				Response.Write( "align='center' " )
			Case IDS_GRIDINDEX_TYPE
				Response.Write( "align='center' " )
			Case IDS_GRIDINDEX_SIZE
				Response.Write( "align='center' " )
			Case IDS_GRIDINDEX_LASTMOD
				Response.Write( "align='center' " )
		End Select

		Response.Write( "class='WBC_styclsTextColor0' " )
	End Sub

	' ---- [Public] Render the column head <TD> content
	Public Sub RenderColumnHeadTDContent( strColumnIndex )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_DISPLAYNAME
				Call WriteAsNonbreakingBlock( IDS_UI_LABEL_RESOURCE )
			Case IDS_GRIDINDEX_TYPE
				Call WriteAsNonbreakingBlock( IDS_UI_LABEL_TYPE )
			Case IDS_GRIDINDEX_SIZE
				Call WriteAsNonbreakingBlock( IDS_UI_LABEL_SIZE )
			Case IDS_GRIDINDEX_LASTMOD
				Call WriteAsNonbreakingBlock( IDS_UI_LABEL_LASTMOD )
		End Select
	End Sub

	' ---- [Public] Render the column head <TR> attributes
	Public Sub RenderItemTRAttrib( pObject, nCollectionIndex, nDisplayIndex )
	End Sub

	' ---- [Public]
	Public Sub RenderItemTDAttrib( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
	End Sub

	' ---- [Public]
	Public Sub RenderItemTDContent( pObject, nCollectionIndex, nDisplayIndex, strColumnIndex )
	End Sub

	' ---- [Public] Gives Decorator a chance to sort the collection
	Public Sub SortCollection( strSortByColumn, colObjects, bAscending )
		Select Case strSortByColumn
			Case IDS_GRIDINDEX_DISPLAYNAME
				Call colObjects.SortByDisplayName( bAscending )
			Case IDS_GRIDINDEX_TYPE
				Call colObjects.SortByExtension( bAscending )
			Case IDS_GRIDINDEX_SIZE
				Call colObjects.SortBySize( bAscending )
			Case IDS_GRIDINDEX_LASTMOD
				Call colObjects.SortByLastModifiedDate( bAscending )
		End Select
	End Sub

End Class

%>