<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CSEasyScriptExport.aspx.vb" Inherits="CSEasyScript.CSEasyScriptExport" %>
<%@ register tagprefix="ex" namespace="Exact.Web.UI.Controls" assembly="Exact.Web.UI.Controls" %>

<html>
<head>
    <title></title>
    <link runat="server" id="ExactCSS" href="Exact.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="jquery.js"></script>
    <script language="javascript" type="text/javascript">
        function ExportClicked() {
            if (!lvcCheckCheckedList_cCheck()) {
                SysAlert(13926, 'You haven\'t selected anything.');
                return;
            }
            SysSet('DoExport', 1);
            SysSubmit();
        }
    </script>
</head>
<body>
<ep:form id="Baco" runat="server">

<ex:InputField runat="server" ID="DoExport" CreateClientControl="True" Hidden="True" ValidationAs="Int" ValidationDefault="0" />
<ex:InputField runat="server" ID="ExportID" CreateClientControl="True" Hidden="True" ValidationAs="Guid" />

<ex:CardControl runat="server" ID="Card" Action="Show">
    <ex:header id="hdr" caption="Easy Scripts" captionid="0" CaptionSuffix=":Export" CaptionSuffixID="8577" runat="server" showsitemappath="false">
        <ex:headerbutton id="hbFavorite" buttonstyle="Favorite" />
    </ex:header>

    <ex:headerproperties runat="server" id="hdrProps" HeaderPropertiesStyle="Custom" />

    <ex:buttonbar runat="server" id="Buttons">
        <ex:button runat="server" id="btnRefresh" buttonstyle="Refresh" onClick="SysSubmit(1);" />
        <ex:button runat="server" id="btnExport" buttonstyle="Custom" Caption="Export" CaptionID="8577" onClick="ExportClicked();" />
        <ex:button runat="server" id="btnClose" buttonstyle="Close" />
    </ex:buttonbar>

    <ex:bcerrormessages runat="server" id="errmsg" Mode="Notification" />

        <ex:cardrow runat="server" id="crFilter">
            <ex:cardcolumn runat="server" id="ccFilter1">
		        <ex:cardsection runat="server" id="csFilter1" caption="Filter" captionid="1378">
				    <ex:cardfield runat="server" id="cfFilterEnabled" caption="Enabled" captionid="9086">
                        <ex:combobox runat="server" id="FilterEnabled" validationas="int" allowempty="true">
                            <ex:listitem caption="Yes" captionid="1014" value="1" />
                            <ex:listitem caption="No" captionid="1015" value="0" />										
					    </ex:combobox> 
				    </ex:cardfield>
                    <ex:cardfield runat="server" id="cfFilterTitle" caption="Title" captionid="10189">
                        <ex:imagebuttonlist runat="server" id="FilterTitleOperator" appearance="Toggle" validationas="int" validationdefault="5" imageheight="">
					        <ex:listitem value="5" caption="Starts with" captionid="390" image="startwith.svg"  />
					        <ex:listitem value="6" caption="Contains" captionid="16440" image="wildcard.svg" />
					        <ex:listitem value="0" caption="Equal to" captionid="371" image="equalto.svg" />
				        </ex:imagebuttonlist>
					    <ex:inputfield runat="server" id="FilterTitle" />
				    </ex:cardfield>
                    <ex:cardfield runat="server" id="cfFilterModified" caption="Modified" captionid="53">
					    <ex:daterange runat="server" id="FilterModified" validationas="DateTime" ShowQuickSelect="True" />
				    </ex:cardfield>
                </ex:cardsection>
            </ex:cardcolumn>
			<ex:cardcolumn runat="server" id="ccFilter2">
		        <ex:cardsection runat="server" id="csFilter2" caption="Filter" captionid="1378">
					<ex:cardfield runat="server" id="cfFilterSectionType" caption="Type" captionid="3801">
                        <ex:combobox runat="server" id="FilterSectionType" allowempty="true">
                            <ex:listitem caption="Section" captionid="11133" value="S" />
                            <ex:listitem caption="Tab" captionid="15938" value="T" />
                            <ex:listitem caption="Script" captionid="0" value="J" />
					    </ex:combobox> 
				    </ex:cardfield>
					<ex:cardfield runat="server" id="cfFilterTabPage" caption="Parent" captionid="275" CaptionSuffix=":Tab" CaptionSuffixID="0">
                        <ex:combobox runat="server" id="FilterTabPage" allowempty="true" ListValues="select ID, Caption, CaptionID from CSEasyScriptSections where SectionType = 'T' order by Caption" />
				    </ex:cardfield>
					<ex:cardfield runat="server" id="cfFilterPage" caption="Page" captionid="8435">
                        <ex:combobox runat="server" id="FilterPage" allowempty="true" />
				    </ex:cardfield>
                </ex:cardsection>
            </ex:cardcolumn>
        </ex:cardrow>

    <ex:cardrow runat="server" id="crData">
        <ex:cardcolumn runat="server" id="ccData">
            <ex:cardlistview runat="server" id="clvData" showheader="True" customizecolumns="False" customizerows="False">
	            <ex:listview runat="server" id="List" Caption="Sections" CaptionID="18537" onquery="List_OnQuery" ongetdata="List_OnGetData" showwaitmessage="True" DefaultSortColumn="colModified" DefaultSortDescending="True" Autopostback="True" enablesetting="true" ScrollBar="None" ShowPageSize="False">
                    <Columns>
                        <ex:listviewcheckboxcolumn runat="server" id="cCheck" type="selectall" selectallprefix="chk" align="Center" width="5%" />
				        <ex:listviewcolumn runat="server" id="colCaption" width="20%" caption="Title" captionid="10189" EnableSorting="True"/>
                        <ex:listviewcolumn runat="server" id="colDescription" width="20%" caption="Description" captionid="4243" EnableSorting="True"/>
						<ex:listviewcolumn runat="server" id="colType" width="5%" caption="Type" captionid="3801" />
						<ex:listviewcolumn runat="server" id="colParent" width="10%" caption="Parent" captionid="275" CaptionSuffix=":Tab" CaptionSuffixID="0" />
				        <ex:listviewcolumn runat="server" id="colPage" width="15%" caption="Page" captionid="8435" EnableSorting="True"/>
                        <ex:listviewcolumn runat="server" id="colPageType" width="5%" caption="Type" captionid="5172" EnableSorting="True"/>
				        <ex:listviewcolumn runat="server" id="colEnabled" width="5%" caption="Enabled" captionid="9086" EnableSorting="True"/>
                        <ex:listviewcolumn runat="server" id="Listviewcolumn1" captionid="2468" caption="Created" width="10%" EnableSorting="True" />
                        <ex:listviewcolumn runat="server" id="Listviewcolumn2" captionid="53" caption="Modified" width="10%" EnableSorting="True" />
                    </Columns>
		        </ex:listview>
		        <ex:bcerrormessages runat="server" id="errNoDataFound" Mode="Notification" />
            </ex:cardlistview>
        </ex:cardcolumn>
    </ex:cardrow>
</ex:CardControl>
</ep:form>
</body>
</html>