<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFAdmin/AdmMaster.Master" CodeBehind="Menus.aspx.vb" Inherits="WebFoundations.WFPortal.UI.Menus2" %>
<%@ Register Src="../../WFControls/WFPagePicker.ascx" TagName="WFPagePicker" TagPrefix="uc1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="wff" Namespace="WebFoundations.ServerControls" Assembly="WebFoundations.ServerControls" %>
<asp:Content ContentPlaceHolderID="TagHead" runat="server">
    <script type="text/javascript">
        var MySelectedItem = 0;
        function postBackDelete(hiddenFieldID) {
            var hiddenField = $get(hiddenFieldID);
            if (hiddenField) {
                hiddenField.value = 'DELETE' + MySelectedItem;
                MySelectedItem = 0;
                __doPostBack(hiddenFieldID, '');
            }
        }
        function postBackHiddenField(hiddenFieldID) {
            var hiddenField = $get(hiddenFieldID);
            if (hiddenField) {
                hiddenField.value = (new Date()).getTime();
                __doPostBack(hiddenFieldID, '');
            }
        }
    </script>
</asp:Content>

<asp:Content ContentPlaceHolderID="ActionContent" runat="server">
    <ul>
        <li>
            <asp:HyperLink ID="lnkadd" runat="server" CssClass="add" /></li>
        <li>
            <asp:HyperLink ID="lnkedit" runat="server" CssClass="edit" /></li>
        <li>
            <asp:HyperLink ID="lnkdelete" runat="server" CssClass="delete" /></li>
        <li>
            <asp:HyperLink ID="lnkrefresh" runat="server" CssClass="refresh" /></li>
        <li>
            <asp:HyperLink ID="lnkupload" runat="server" CssClass="upload" /></li>
        <li>
            <asp:LinkButton ID="lnkdownload" runat="server" CssClass="download" /></li>
        <li>
            <asp:HyperLink ID="lnktranslations" runat="server" CssClass="translations" /></li>
        <li>
            <asp:LinkButton ID="lnkclearcache" runat="server" CssClass="clear-cache" /></li>
    </ul>
</asp:Content>

<asp:Content ContentPlaceHolderID="FilterContent" runat="server">
    <uc1:WFPagePicker ID="portalpicker" runat="server" AddSelect="false" AdminMode="true" AutoSelectLast="true" ShowArea="false" ShowPage="false" />
    <asp:Button ID="btnbuscar" runat="server" CssClass="search" />
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:ObjectDataSource ID="MenuODS" runat="server" SelectMethod="GetItems"
        TypeName="WebFoundations.WFPortal.Management.ObjectDataSources.Menu"
        EnablePaging="True" SortParameterName="column" SelectCountMethod="CountItems"
        MaximumRowsParameterName="MaximumRows" StartRowIndexParameterName="StartRowIndex">
        <SelectParameters>
            <asp:ControlParameter ControlID="ctl00$FilterContent$portalpicker" Name="PortalId" PropertyName="CurrentPortal" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updateform">
        <ProgressTemplate>
            <div class="up-loading"></div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="updateform" runat="server">
        <ContentTemplate>
            <telerik:RadGrid ID="grdMenu" runat="server"
                AutoGenerateColumns="false" DataSourceID="MenuODS" AllowSorting="True"
                GridLines="None" AllowPaging="True" PageSize="15">
                <MasterTableView DataSourceID="MenuODS">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id" ItemStyle-HorizontalAlign="center" />
                        <telerik:GridBoundColumn DataField="MenuAlias" HeaderText="MenuAlias" UniqueName="MenuAlias" ItemStyle-HorizontalAlign="center" />
                        <telerik:GridBoundColumn DataField="Languages" HeaderText="Languages" UniqueName="Languages" ItemStyle-HorizontalAlign="center" />
                        <telerik:GridBoundColumn DataField="SystemMenu" HeaderText="SystemMenu" UniqueName="SystemMenu" ItemStyle-HorizontalAlign="center" />
                    </Columns>
                </MasterTableView>
                <ClientSettings AllowColumnsReorder="false" AllowDragToGroup="false"
                    AllowColumnHide="false"
                    Selecting-AllowRowSelect="true" Scrolling-AllowScroll="false"
                    Scrolling-UseStaticHeaders="true">
                </ClientSettings>
                <ExportSettings ExportOnlyData="True" FileName="Roles" IgnorePaging="True" OpenInNewWindow="True" />
            </telerik:RadGrid><asp:HiddenField ID="PostBackHidden" runat="server"></asp:HiddenField>
            <asp:HiddenField ID="SelectedPortalId" runat="server"></asp:HiddenField>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ctl00$FilterContent$btnbuscar" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="PostBackHidden" EventName="ValueChanged" />
        </Triggers>
    </asp:UpdatePanel>
    <wff:WindowManager ID="EditWindow" runat="server">
        <Windows>
            <telerik:RadWindow ID="EditDialog" runat="server" Height="700px" Width="900px"   ReloadOnShow="true" Modal="true" />
            <telerik:RadWindow ID="ImportDialog" runat="server" Height="200px" Width="450px" ReloadOnShow="true" Modal="true" />
        </Windows>
    </wff:WindowManager>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="FooterContent" runat="server" />
