PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/admin/Widgets/Blogroll.aspx

#
ASP.NET | 168 lines | 161 code | 7 blank | 0 comment | 0 complexity | 2b16c62b3033ee45cad7c753c8320319 MD5 | raw file
  1<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true"
  2    CodeFile="Blogroll.aspx.cs" Inherits="admin.Widgets.Blogroll" Title="Blogroll" %>
  3<%@ Register src="Menu.ascx" tagname="TabMenu" tagprefix="menu" %>
  4
  5<asp:Content ID="Content1" ContentPlaceHolderID="cphAdmin" runat="Server">
  6    <script type="text/javascript" src="../jquery.colorbox.js"></script>
  7    <script type="text/javascript">
  8        $(document).ready(function () {
  9            $(".showSettings").colorbox({ width: "600px", inline: true, href: "#blogrollSettings" });
 10            $(".addNew").colorbox({ width: "620px", inline: true, href: "#addBlogroll" });
 11        });
 12
 13        function closeOverlay() {
 14            $.colorbox.close();
 15        }
 16    </script>
 17	<div class="content-box-outer">
 18		<div class="content-box-right">
 19			<menu:TabMenu ID="TabMenu" runat="server" />
 20		</div>
 21		<div class="content-box-left">
 22            <h1><%=Resources.labels.blogroll %>
 23            <a href="#" class="showSettings"><%=Resources.labels.settings %></a>
 24            <a href="#" class="addNew"><%=Resources.labels.addNewBlog %></a></h1>
 25
 26            <div style="display:none;">
 27            <div id="blogrollSettings" class="overlaypanel">
 28                <h2><%=Resources.labels.settings %></h2>
 29                <ul class="fl" style="overflow:hidden;">
 30                    <li style="float:left; margin:0 20px 0 0;">
 31                        <asp:Label runat="server" AssociatedControlID="ddlVisiblePosts" CssClass="lbl" Text='<%$ Code: Resources.labels.numberOfDisplayedItems %>' />
 32                        <asp:DropDownList runat="server" ID="ddlVisiblePosts">
 33                            <asp:ListItem Text="0" />
 34                            <asp:ListItem Text="1" />
 35                            <asp:ListItem Text="2" />
 36                            <asp:ListItem Text="3" />
 37                            <asp:ListItem Text="4" />
 38                            <asp:ListItem Text="5" />
 39                            <asp:ListItem Text="6" />
 40                            <asp:ListItem Text="7" />
 41                            <asp:ListItem Text="8" />
 42                            <asp:ListItem Text="9" />
 43                            <asp:ListItem Text="10" />
 44                        </asp:DropDownList>
 45                    </li>
 46                    <li style="float:left; margin:0 20px 0 0;">
 47                        <asp:Label runat="server" AssociatedControlID="txtMaxLength" CssClass="lbl" Text='<%$ Code: Resources.labels.maxLengthOfItems %>' />
 48                        <asp:TextBox runat="server" ID="txtMaxLength" MaxLength="3" Width="50" />
 49                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtMaxLength" Display="Dynamic" ValidationGroup="settings" ErrorMessage="<%$Resources:labels,required %>"></asp:RequiredFieldValidator>
 50                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtMaxLength" Display="Dynamic"
 51                            Operator="dataTypeCheck" Type="integer" ValidationGroup="settings" ErrorMessage="<%$Resources:labels,noValidNumber %>" />
 52                    </li>
 53                    <li style="float:left; margin:0 20px 0 0;">
 54                        <asp:Label runat="server" AssociatedControlID="txtUpdateFrequency" CssClass="lbl"
 55                            Text='<%$ Code: Resources.labels.updateFrequenzy %>' />
 56                        <asp:TextBox runat="server" ID="txtUpdateFrequency" MaxLength="3" Width="50" />
 57                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtUpdateFrequency" Display="Dynamic" ValidationGroup="settings" ErrorMessage="<%$Resources:labels,required %>"></asp:RequiredFieldValidator>
 58                        <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtUpdateFrequency"  Display="Dynamic"
 59                            Operator="dataTypeCheck" Type="integer" ValidationGroup="settings" ErrorMessage="<%$Resources:labels,noValidNumber %>" />
 60                    </li>
 61                </ul>
 62                <asp:Button runat="server" ID="btnSaveSettings" ValidationGroup="settings" CssClass="btn primary" Text="Save settings" OnClientClick="colorboxDialogSubmitClicked('settings', 'blogrollSettings');" /> 
 63                <%=Resources.labels.or %> <a href="#" onclick="closeOverlay();"><%=Resources.labels.cancel %></a>
 64            </div>
 65            </div>
 66
 67            <div style="display:none;">
 68                <div id="addBlogroll" class="overlaypanel">
 69                    <h2><%=Resources.labels.addNewBlog %></h2>
 70                    <ul class="fl">
 71                        <li>
 72                            <asp:Label runat="server" AssociatedControlID="txtTitle" CssClass="lbl" Text='<%$ Code: Resources.labels.title %>' />
 73                            <asp:TextBox runat="server" ID="txtTitle" Width="500px" />
 74                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="Server" ControlToValidate="txtTitle"
 75                                ErrorMessage="<%$Resources:labels,required %>" ValidationGroup="addNew" Display="Dynamic" />
 76                        </li>
 77                        <li>
 78                            <asp:Label runat="server" AssociatedControlID="txtDescription" CssClass="lbl" Text='<%$ Code: Resources.labels.description %>' />
 79                            <asp:TextBox runat="server" ID="txtDescription" Width="500px" />
 80                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="Server" ControlToValidate="txtDescription"
 81                                ErrorMessage="<%$Resources:labels,required %>" ValidationGroup="addNew" Display="Dynamic" />
 82                        </li>
 83                        <li>
 84                            <asp:Label runat="server" AssociatedControlID="txtWebUrl" CssClass="lbl" Text='<%$ Code: Resources.labels.website %>' />
 85                            <asp:TextBox runat="server" ID="txtWebUrl" Width="500px" />
 86                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="Server" ControlToValidate="txtWebUrl"
 87                                ErrorMessage="<%$Resources:labels,required %>" Display="Dynamic" ValidationGroup="addNew" />
 88                            <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txtWebUrl"  Display="Dynamic"
 89                                ErrorMessage="<%$Resources:labels,invalid %>" EnableClientScript="false" OnServerValidate="validateWebUrl"
 90                                ValidationGroup="addnew"></asp:CustomValidator>
 91                        </li>
 92                        <li>
 93                            <asp:Label runat="server" AssociatedControlID="txtFeedUrl" CssClass="lbl" Text="RSS url" />
 94                            <asp:TextBox runat="server" ID="txtFeedUrl" Width="500px" />
 95                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="Server" ControlToValidate="txtFeedUrl"
 96                                ErrorMessage="<%$Resources:labels,required %>" Display="Dynamic" ValidationGroup="addNew" />
 97                            <asp:CustomValidator ID="CustomValidator2" runat="server" ControlToValidate="txtFeedUrl"
 98                                ErrorMessage="<%$Resources:labels,invalid %>" Display="Dynamic" EnableClientScript="false" OnServerValidate="validateFeedUrl"
 99                                ValidationGroup="addnew"></asp:CustomValidator>
100                        </li>
101                        <li>
102                            <asp:Label runat="server" AssociatedControlID="cblXfn" CssClass="lbl" Text="XFN tag" />
103                            <asp:CheckBoxList runat="server" ID="cblXfn" CssClass="nowidth" RepeatLayout="Table" RepeatDirection="Horizontal" RepeatColumns="6" >
104                                <asp:ListItem Text="contact" />
105                                <asp:ListItem Text="acquaintance " />
106                                <asp:ListItem Text="friend " />
107                                <asp:ListItem Text="met" />
108                                <asp:ListItem Text="co-worker" />
109                                <asp:ListItem Text="colleague " />
110                                <asp:ListItem Text="co-resident" />
111                                <asp:ListItem Text="neighbor " />
112                                <asp:ListItem Text="child" />
113                                <asp:ListItem Text="parent" />
114                                <asp:ListItem Text="sibling" />
115                                <asp:ListItem Text="spouse" />
116                                <asp:ListItem Text="kin" />
117                                <asp:ListItem Text="muse" />
118                                <asp:ListItem Text="crush" />
119                                <asp:ListItem Text="date" />
120                                <asp:ListItem Text="sweetheart" />
121                                <asp:ListItem Text="me" />
122                            </asp:CheckBoxList>
123                        </li>
124                    </ul>
125                    <asp:Button runat="server" ID="btnSave" ValidationGroup="addNew" CssClass="btn primary" OnClientClick="colorboxDialogSubmitClicked('addNew', 'addBlogroll');" Text="Add blog" /> 
126                    <%=Resources.labels.or %> <a href="#" onclick="closeOverlay();"><%=Resources.labels.cancel %></a>
127
128                </div>
129            </div>
130
131            <asp:GridView runat="server" ID="grid" CssClass="beTable" BorderStyle="solid"
132                RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" GridLines="None"
133                Width="100%" AlternatingRowStyle-BackColor="#f8f8f8" AlternatingRowStyle-BorderColor="#f8f8f8"
134                HeaderStyle-BackColor="#F1F1F1" CellPadding="3" AutoGenerateColumns="False" OnRowDeleting="grid_RowDeleting"
135                OnRowCommand="grid_RowCommand">
136                <Columns>
137                    <asp:TemplateField>
138                        <ItemTemplate>
139                            <asp:HyperLink ID="feedLink" runat="server" ImageUrl="~/pics/rssButton.png" NavigateUrl='<%# Eval("FeedUrl").ToString() %>'
140                                Text="<%# string.Empty %>"></asp:HyperLink>
141                        </ItemTemplate>
142                    </asp:TemplateField>
143                    <asp:TemplateField>
144                        <ItemTemplate>
145                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("BlogUrl").ToString() %>'
146                                Text='<%# Eval("Title") %>'></asp:HyperLink>
147                        </ItemTemplate>
148                    </asp:TemplateField>
149                    <asp:TemplateField>
150                        <ItemTemplate>
151                            <asp:Literal ID="Literal1" runat="server" Text='<%# Eval("Description") %>'></asp:Literal>
152                        </ItemTemplate>
153                    </asp:TemplateField>
154                    <asp:CommandField ShowDeleteButton="True" DeleteText="<%$Resources:labels, delete %>" ControlStyle-CssClass="deleteAction" />
155                    <asp:TemplateField ControlStyle-BackColor="Transparent">
156                        <ItemTemplate>
157                            <asp:ImageButton ID="ibMoveUp" ImageUrl="~/admin/images/action-up.png" runat="server"
158                                CommandArgument="<%# ((GridViewRow)Container).RowIndex %>" CommandName="moveUp" />
159                            <asp:ImageButton ID="ibMoveDown" ImageUrl="~/admin/images/action-down.png" runat="server"
160                                CommandArgument="<%# ((GridViewRow)Container).RowIndex %>" CommandName="moveDown" />
161                        </ItemTemplate>
162                    </asp:TemplateField>
163
164                </Columns>
165            </asp:GridView>
166        </div>
167    </div>
168</asp:Content>