<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CSEasyWMGroupDef.aspx.vb" Inherits="CSEasyWM.CSEasyWMGroupDef" %>
<%@ register tagprefix="ex" namespace="Exact.Web.UI.Controls" assembly="Exact.Web.UI.Controls" %>
<html>
<head>
	<meta name="save" content="history" />
	<link rel="stylesheet" type="text/css" href="Exact.css" />
    <script language="javascript" type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.SelectAllCheckbox').hide();
            $('#btnClose').removeAttr('onclick');
            $('#btnClose').click(function () {
                ClosePopup(true);
            });

            $('body').keydown(function (e) {
                if (new SysHandleKey(e).IsEscapeKey())
                    ClosePopup(true);
            });

            $('[name="List$cCheck"]').removeAttr('onclick');
            $('[name="List$cCheck"]').click(function () {
                SysListCheck($(this).get(0), 'List$cCheck', 'cCheck');
                SysSubmit(1);
            });
        });

        function ClosePopup(doRefresh) {
            var r;
            if (doRefresh)
                r = new Array('refresh');
            else
                r = new Array();

            if (opener && !opener.closed) {
                top.opener.SysDialog.returnValue = r;
                top.opener.SysDialog.returnFunc()
                window.close();
            }
            else {
                window.parent.returnValue = r;
                window.parent.SysCloseModalPopup();
            }
        }

        function ChangeSortOrder(RecordID, MoveUp) {
            SysSet('DisplayOrderRecordID', RecordID);
            SysSet('DisplayOrderMoveUp', MoveUp);
            SysSubmit(1);
        }
    </script>
</head>
<body>

<ep:form id="frm" runat="server">

<ex:InputField runat="server" Hidden="True" ID="GroupID" ValidationAs="Guid" />
<ex:InputField runat="server" Hidden="True" ID="DisplayOrderMoveUp" ValidationAs="Int" ValidationDefault="-1" />
<ex:InputField runat="server" Hidden="True" ID="DisplayOrderRecordID" ValidationAs="Guid" />

<ex:CardControl runat="server" ID="Card" Action="Show">
    <ex:Header runat="server" ID="hdr" caption="WordMerge Definitions" captionid="421004">
    </ex:Header>

    <ex:ButtonBar runat="server" ID="Buttons">
        <ex:Button runat="server" ID="btnClose" ButtonStyle="Close" />
    </ex:ButtonBar>

    <ex:bcerrormessages runat="server" id="errMsg" />

    <ex:cardrow runat="server" id="cr">
	    <ex:cardcolumn runat="server" id="cc">
		    <ex:cardsection runat="server" id="csGeneral" caption="Definition Group Item" captionid="421051">
			    <ex:cardfield runat="server" id="cfGroupIDTitle" caption="Definition Group" captionid="421049">
				    <ex:inputfield runat="server" id="GroupIDTitle" ReadOnly="True" />
			    </ex:cardfield>
            </ex:cardsection>
            <ex:CardListView runat="server" id="clvDefinitions" caption="WordMerge Definitions" captionid="421004">
	            <ex:listview runat="server" id="List" onquery="List_OnQuery" ongetdata="List_OnGetData" showwaitmessage="True" autopostback="True" enablesetting="False" ShowPageSize="False" ScrollBar="None" PageSize="9999">
                    <Columns>
			            <ex:listviewcheckboxcolumn runat="server" id="cCheck" type="selectall" selectallprefix="chk" align="Center" width="5%" />
                        <ex:listviewcolumn id="colDisplayorder" caption="Sorting" captionid="1272" sorting="none" width="5%" />
                        <ex:listviewcolumn id="colChangeDisplayorderUp" caption="Sorting" captionid="1272" captionsuffix=":Up" captionsuffixid="31309" sorting="none" width="5%" />
                        <ex:listviewcolumn id="colChangeDisplayorderDown" caption="Sorting" captionid="1272" captionsuffix=":Down" captionsuffixid="10519" sorting="none" width="5%" />
			            <ex:listviewcolumn id="colTitle" caption="Title" captionid="10189" sorting="none" />
                    </Columns>
		        </ex:listview>
		        <ex:bcerrormessages runat="server" id="errNoDataFound" Mode="Notification" />
            </ex:CardListView>
	    </ex:cardcolumn>
    </ex:cardrow>
</ex:CardControl>
</ep:form>
</body>
</html>
