<%
' ********************************************************************
' 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/
'			QuickJump/ConnectedPagesQuickJump/CNCGridDecorator_ConnectedPagesQuickJumpSelDlg.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Implements the INCGridDecorator Interface for the quickJump
'			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 )
'	- Sub RenderEmptyGrid()
' ********************************************************************

Class CNCGridDecorator_AuthPreviewConnectedSelDlg

	' ---- [Public] Render the column head <TR> attributes
	Public Sub RenderColumnHeadTRAttrib()
		Response.Write( "class='WBC_styclsBackground2' " )
	End Sub

	' ---- [Public] Render the column head <TD> attributes
	Public Sub RenderColumnHeadTDAttrib( strColumnIndex )
		Response.Write( "class='WBC_styclsHeavyTextColor1' align='center' " )
	End Sub

	' ---- [Public] Render the column head <TD> content
	Public Sub RenderColumnHeadTDContent( strColumnIndex )
		Select Case strColumnIndex
			Case IDS_GRIDINDEX_QUICKJUMP_DISPLAYNAME
				Response.Write( IDS_UI_LABEL_DISPLAYNAME )
			Case IDS_GRIDINDEX_QUICKJUMP_GOTO
				Response.Write( IDS_UI_LABEL_GOTO )
			Case IDS_GRIDINDEX_QUICKJUMP_LOCATION
				Response.Write( IDS_UI_LABEL_LOCATION )
		End Select
	End Sub

	' ---- [Public] Render the column head <TR> attributes
	Public Sub RenderItemTRAttrib( pObject, nCollectionIndex, nDisplayIndex )
		If (nDisplayIndex Mod 2 = 0) Then
			Response.Write( "class='WBC_styclsAlternateRowBg1' " )
		Else
			Response.Write( "class='WBC_styclsAlternateRowBg2' " )
		End If
	End Sub


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


		Select Case strColumnIndex
			Case IDS_GRIDINDEX_QUICKJUMP_GOTO
				Response.Write( "align='center' " )
		End Select

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

	End Sub

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

		Dim strGoToURL
		strGoToURL = GetWBCBasicEditURL(pObject)

		Select Case strColumnIndex

			Case IDS_GRIDINDEX_QUICKJUMP_DISPLAYNAME
				Response.write("<a target='_self' href='#' ")
				Response.write("onclick='WBC_openWindowOnFocus(""" & GetPreviewUrl(pObject) & """, ""_blank"", WBC_getPoppedUpWindowFeatures(IDS_WIN_PREVIEW_FEATURES, window.top)); return false;'>")
				Response.write("<img border=0 src='" & IDS_QUICKJUMP_IMG_PATH & IDS_IMG_ICON_PREVIEW & "'></a> ")
				Call g_pASPPageManager.ASPUtilsObject.MBCSWrite( g_pASPPageManager.ASPUtilsObject.HTMLEncode(pObject.DisplayName), g_pASPPageManager.CodePage )

			Case IDS_GRIDINDEX_QUICKJUMP_GOTO
				Response.write("<a href='#' onClick='javascript:WBC_onSelectGoto(" & """" & strGoToURL & """" &")'>")
				Response.write("<img border=0 src='" & IDS_QUICKJUMP_IMG_PATH & IDS_IMG_ICON_GOTO & "'> </a>")

			Case IDS_GRIDINDEX_QUICKJUMP_LOCATION
				Call g_pASPPageManager.ASPUtilsObject.MBCSWrite( g_pASPPageManager.ASPUtilsObject.HTMLEncode(pObject.Parent.DisplayPath), g_pASPPageManager.CodePage )

		End Select

	 End Sub

	' ---- [Public] Gives Decorator a chance to sort the collection
	Public Sub SortCollection( strSortByColumn, colObjects, bAscending )
		Select Case strSortByColumn
			Case IDS_GRIDINDEX_QUICKJUMP_DISPLAYNAME
				Call colObjects.SortByDisplayName( bAscending )
			Case IDS_GRIDINDEX_QUICKJUMP_LOCATION
				Call colObjects.SortByDisplayPath( bAscending )
		End Select
	End Sub

	' ---- [Public] Render the Grid content area when there are no items to show
	Public Sub RenderEmptyGrid()
		Response.Write( "<span class='WBC_styclsTextColor1'>" & IDS_UI_NO_CONNECTED_POSTINGS_AVAILABLE & "</span>" )
	End Sub
End Class

%>