Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BadgesDisplay.ascx.cs" Inherits="Roblox.Website.UserControls.BadgesDisplay" %>
- <h2 class="title"><span>Player Badges</span></h2>
- <div class="badge-container">
- <asp:UpdatePanel ID="BadgesUpdatePanel" class="badge-update-panel" runat="server">
- <ContentTemplate>
- <div id="roblox-badge-loading" class="BadgesLoading_Container badge-loading-indicator">
- <img src="/images/ProgressIndicator4.gif" alt="Loading..." />
- </div>
- <div class="BadgesListView_Container badge-list-view-container" style="<%: BadgeListView.Items.Count > 6 ? "height:300px;" : string.Empty %>">
- <asp:ListView
- ID="BadgeListView"
- ItemType="Roblox.UserAsset"
- DataSourceID="BadgeDataSource"
- runat="server">
- <ItemTemplate>
- <div class="TileBadges">
- <rbx:AssetImage
- ID="AssetThumbnailHyperLink"
- Asset='<%# Item.Asset %>'
- NavigateUrl='<%# Roblox.Asset.GetSEOURL(Item.Asset) %>'
- Width="75"
- Height="75"
- runat="server" />
- <div class="AssetDetails" style="display:none;" id="badgeInfo<%# Item.AssetID %>">
- <div class="AssetName notranslate"><asp:HyperLink
- ID="AssetNameHyperLink"
- ToolTip="click to view"
- NavigateUrl='<%# Roblox.Asset.GetSEOURL(Item.Asset) %>'
- Text='<%# Item.Asset.Name %>'
- runat="server" /></div>
- <div class="AssetCreator"><span class="Label">Creator:</span> <span class="Detail notranslate" ><asp:HyperLink
- ID="AssetCreatorHyperLink"
- NavigateUrl='<%# Eval("Asset.CreatorID", "~/User.aspx?ID={0}") %>'
- Text='<%# Item.Asset.Creator.Name %>'
- runat="server" /></span></div>
- </div>
- </div>
- </ItemTemplate>
- <EmptyDataTemplate>
- <div class="NoResults">This user hasn't earned any user-created badges.</div>
- </EmptyDataTemplate>
- </asp:ListView>
- </div>
- <asp:ObjectDataSource
- ID="BadgeDataSource"
- TypeName="Roblox.UserAsset"
- SelectMethod="GetUserAssets"
- SelectCountMethod="GetTotalNumberOfUserAssets"
- StartRowIndexParameterName="startRowIndex"
- MaximumRowsParameterName="maximumRows"
- EnablePaging="true"
- OnSelecting="BadgeDataSource_Selecting"
- runat="server">
- <SelectParameters>
- <asp:Parameter Name="keyword" DefaultValue="" Type="String" />
- <asp:Parameter Name="sortExpression" DefaultValue="" Type="String" />
- </SelectParameters>
- </asp:ObjectDataSource>
- <div class="BadgesPager_Container badge-pager-container">
- <asp:DataPager
- ID="BadgeDataPagerFooter"
- PageSize="15"
- PagedControlID="BadgeListView"
- runat="server">
- <Fields>
- <asp:NextPreviousPagerField
- ShowFirstPageButton="false"
- ShowPreviousPageButton="true"
- ShowNextPageButton="false"
- ShowLastPageButton="false"
- PreviousPageText=""
- ButtonType="Link"
- ButtonCssClass="pager previous" />
- <asp:TemplatePagerField>
- <PagerTemplate>
- <span style="display: inline-block; padding: 5px; vertical-align: top">
- Page
- <asp:Label
- ID="CurrentPageLabel"
- Text='<%# Container.StartRowIndex / Container.PageSize + 1 %>'
- runat="server" />
- of
- <asp:Label
- ID="TotalPagesLabel"
- Text='<%# Math.Ceiling((double)Container.TotalRowCount / Container.PageSize) %>'
- runat="server" />
- </span>
- </PagerTemplate>
- </asp:TemplatePagerField>
- <asp:NextPreviousPagerField
- ShowFirstPageButton="false"
- ShowPreviousPageButton="false"
- ShowNextPageButton="true"
- ShowLastPageButton="false"
- NextPageText=""
- ButtonType="Link"
- ButtonCssClass="pager next" />
- </Fields>
- </asp:DataPager>
- </div>
- </ContentTemplate>
- </asp:UpdatePanel>
- <div style="clear:both;"></div>
- </div>
- <script type="text/javascript">
- $('#' + '<%= BadgesUpdatePanel.ClientID %>').bind('click', function (e) {
- var target = $(e.target);
- if (target.parentsUntil('.BadgesUpdatePanel', '.BadgesPager_Container').length > 0 && target[0].tagName == 'INPUT') {
- //put up loading sign
- $('.BadgesListView_Container').css("visibility", "hidden");
- $('#roblox-badge-loading').css("display", "block");
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment