<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/WFAdmin/AdmMaster.Master" CodeBehind="MenuTranslations.aspx.vb" Inherits="WebFoundations.WFPortal.UI.MenuTranslations" %>
<%@ 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 = '';
        function ShowNewForm() {
            window.radopen("TranslationEdit.aspx", "EditDialog");
        }
        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:LinkButton ID="lnkExport" runat="server" CssClass="export" /></li>
    </ul>
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <asp:ObjectDataSource ID="TranslationODS" runat="server" SelectMethod="GetItems"
        TypeName="WebFoundations.WFPortal.Management.ObjectDataSources.Translation"
        EnablePaging="True" SortParameterName="column" SelectCountMethod="CountItems"
        MaximumRowsParameterName="MaximumRows" StartRowIndexParameterName="StartRowIndex"></asp:ObjectDataSource>
    <asp:UpdateProgress runat="server" AssociatedUpdatePanelID="updateform">
        <ProgressTemplate>
            <div class="up-loading"></div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="updateform" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <telerik:RadGrid ID="grdTranslation" runat="server"
                AutoGenerateColumns="false" DataSourceID="TranslationODS" AllowSorting="True"
                GridLines="None" AllowPaging="True" PageSize="15">
                <MasterTableView DataSourceID="TranslationODS">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id" ItemStyle-HorizontalAlign="center" />
                        <telerik:GridBoundColumn DataField="Language" HeaderText="Language" UniqueName="Language" ItemStyle-HorizontalAlign="center" />
                        <telerik:GridBoundColumn DataField="NameKey" HeaderText="NameKey" UniqueName="NameKey" ItemStyle-HorizontalAlign="center" />
                        <telerik:GridBoundColumn DataField="Message" HeaderText="Message" UniqueName="Message" 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="Locations" IgnorePaging="True" OpenInNewWindow="True" />
            </telerik:RadGrid>
            <asp:HiddenField ID="PostBackHidden" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <wff:WindowManager ID="EditWindow" runat="server">
        <Windows>
            <telerik:RadWindow ID="EditDialog" runat="server" Height="410px" Width="450px" ReloadOnShow="true" Modal="true" />
        </Windows>
    </wff:WindowManager>
</asp:Content>

