<%@ language="javascript" %>
<%
/*  $Revision$
    $Id$

    File:               Printoptions.asp
    Description:        Dialoog voor standaard SLNKDWF print opties
    Parameters:
    Context:            (Altijd) vanuit Toonimg.js
    Note:
 */
 %>
<!-- #include file="./SLNKDWF.inc" -->
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<%
    FCLTHeader.Requires({ plugins:["jQuery"],
                          js:["./PrintOptions.js"],
                          css: ["./SLNKDwf.css"] });

   var qryWhat = getQParam("qryWhat");
%>
<html>
    <head>
<%  FCLTHeader.Generate(); %>
        <title>SLNKDwf print options</title>
        <script type="text/javascript">
            var qryWhat = "<%=safe.jsstring(qryWhat)%>"; // Used inside PrintOptions.asp
            var qrySchaal = "<%=L("lcl_fg_schaal")%>"; // Will be used in PrintOprions.js
            $(function () {
                Preview();
                $("#Eview").on('load', onload);
             });
        </script>
    </head>

<body class='fclt-modal' id='slnkprintbody' onKeyPress="return _onKeyPress(event)">
  <%MODAL_START(); %>
    <form id="theForm">
      <% MODAL_BLOCK_START("printoptions", L("lcl_cad_preview_setting"), { icon: "fa-wrench" }); %>
      	<tr>
      		<td class='label'><label><%=L("lcl_fg_afdrukformaat")%></label></td>
          <td>
          	<select id="sPaperSize" class="fld" onChange="onChangePaper()">
              <option value="A0">A0 <%=L("lcl_fg_papier")%></option>
              <option value="A1">A1 <%=L("lcl_fg_papier")%></option>
              <option value="A2">A2 <%=L("lcl_fg_papier")%></option>
              <option value="A3">A3 <%=L("lcl_fg_papier")%></option>
              <option value="A4" selected>A4 <%=L("lcl_fg_papier")%></option>
            </select>
          </td>
        </tr>
        <tr>
        	<td class='label'><label for="sScale"><%=L("lcl_fg_schaal")%></label></td>
        	<td>
            <select id="sScale" class="fld" onChange="onChangeScale()">
              <option value="-1"><%=L("lcl_fg_schaal_max")%></option>
              <option value="0" selected><%=L("lcl_fg_schaal_huidig")%></option>
              <option value=".01">100:1</option>
              <option value=".05">20:1</option>
              <option value=".10">10:1</option>
              <option value=".20">5:1</option>
              <option value=".5">2:1</option>
              <option value="1">1:1</option>
              <option value="2">1:2</option>
              <option value="5">1:5</option>
              <option value="10">1:10</option>
              <option value="20">1:20</option>
              <option value="50">1:50</option>
              <option value="100">1:100</option>
              <option value="200">1:200</option>
              <option value="500">1:500</option>
              <option value="1000">1:1000</option>
              <option value="2000">1:2000</option>
              <option value="5000">1:5000</option>
              <option value="10000">1:10000</option>
            </select>
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <label for="rPortrait"><INPUT type="radio" name="rPortrait" id="rPortrait" value="portait" onClick="Preview()"><%=L("lcl_fg_portrait")%></label>
            <label for="rLandscape"><INPUT type="radio" name="rPortrait" id="rLandscape" CHECKED value="landscape" onClick="Preview()"><%=L("lcl_fg_landscape")%></label>
          </td>
        </tr>
        <tr>
        	<td class='label'><label><%=L("lcl_fg_papierformaat")%></label></td>
        	<td>
            <select id="sPaperDest" class="fld" onChange="Preview()">
              <option value="A0">A0 <%=L("lcl_fg_papier")%></option>
              <option value="A1">A1 <%=L("lcl_fg_papier")%></option>
              <option value="A2">A2 <%=L("lcl_fg_papier")%></option>
              <option value="A3">A3 <%=L("lcl_fg_papier")%></option>
              <option value="A4" selected>A4 <%=L("lcl_fg_papier")%></option>
            </select>
          	<input type="hidden" id="xSheets" size="1">
          	<input type="hidden" id="ySheets" size="1">
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <INPUT TYPE="checkbox" ID="cForceBW" onClick="Preview()"><%=L("lcl_fg_forceer_zw")%>
          </td>
        </tr>
<%  MODAL_BLOCK_END();
    var buttons = [];
    buttons.push( {title: L("lcl_print"),  action: "onPrint()", importance: 1, icon: "fa-print"});
    buttons.push( {title: L("lcl_cancel"), action: "FcltMgr.closeDetail(window, {cancel: true })", importance: 3, icon: "fa-fclt-cancel"});
    SIMPLE_BLOCK_START();
      CreateButtons(buttons, { entersubmit: true, isModal: true } );
    SIMPLE_BLOCK_END();

    MODAL_BLOCK_START("printpreview", L("lcl_cad_preview"), { icon: "fa-image" }); %>
    <tr>
      <td style='text-align:center;'>
          <div id="idPaper">
            <img id="Eview" style="position:absolute;"
                alt="<%=safe.htmlattr(L("lcl_xsl_preview"))%>"
                ondragstart="return false;"
                onmouseenter="if(parent.document.hasFocus()) this.parentElement.focus();"
                onmousedown="return _onMouseDown(event);"
                onmousemove="_onMouseMove(event);"
                onmouseup="_onMouseUp(event);"
            >
          </div>
          <div id='txtScale'></div>
       </td>
     </tr>
<%   MODAL_BLOCK_END() %>
   </form>
   <% MODAL_END(); %>
</body>
</html><% ASPPAGE_END(); %>
