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

     File:               CAD/printWhat.asp
     Description:        Laat de gebruiker selecteren wat hij wil afdrukken
                         Op het moment kan hij alleen nog uit een stylesheet kiezen
     Parameters:         alle customParams (hoewel we er nog niets mee doen)

     Context:            Modal na drukken Print knop
     Result:             "SLNKDWF" of "FG0"/"FG1" etc.
     Note:               Array fg_PrintStyles bevat de template mogelijkheden

*/ %>
<!--#include file="../Shared/common.inc"-->
<!--#include file="../shared/iface.inc"-->
<!--#include file="fgii.inc"-->
<%
   var fg_PrintStyles = new Array();
   fg_PrintStyles["FG0"] = {title: L("lcl_fg_FG0"), icon: "fa-rectangle-portrait"};
   //fg_PrintStyles["FG1"] = {title: L("lcl_fg_FG1"), icon: "fa-file-invoice"}; // FG0+checkbox
   fg_PrintStyles["FG2"] = {title: L("lcl_fg_FG2"), icon: "fa-rectangle-landscape"};
   //fg_PrintStyles["FG3"] = {title: L("lcl_fg_FG3"), icon: "fa-file-invoice"}; // FG2+checkbox
   fg_PrintStyles["SLNKDWF"] = {title: L("lcl_fg_SLNKDWF"), icon: "fa-file"};
%>
<html>
<head>
<%
   FCLTHeader.Generate();
%>
<script>
   function doReturn(stl)
    {
        var res = { style : (document.forms.u2.cLegenda.checked ? (stl=="FG0" ? "FG1" : (stl =="FG2" ? "FG3" : stl)) : stl),
                    DWGscale : parseFloat(document.forms.u2.sScale.value),
                    allFloor: document.forms.u2.cAllFloor.checked
                  }
        FcltMgr.closeDetail(window, res);
    }
</script>
</head>
<body class="fclt-modal" id="mod_cadprint">
<% MODAL_START(); %>
<form name="u2" method=post>
<% MODAL_BLOCK_START("", L("lcl_print"), { icon: "fa-print" });
 RWCHECKBOXTR("cAllFloor", "fldcheck", L("lcl_fg_alle_verd"));
 %>
    <tr>
        <td class="label">
            <label for="sScale"><%=L("lcl_fg_schaal")%></label>
        </td>
        <td>
            <select id="sScale" class="fld">
                <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>
<%
 RWCHECKBOXTR("cLegenda", "fldcheck", L("lcl_fg_withlegend"));

MODAL_BLOCK_END();
    buttons = [];
    for (stl in fg_PrintStyles)
    {
        buttons.push({ title: fg_PrintStyles[stl].title, icon: fg_PrintStyles[stl].icon, action:"doReturn('" + stl + "')" })
    }
    SIMPLE_BLOCK_START();
    CreateButtons(buttons, { isModal: true, isDialog: true })
    SIMPLE_BLOCK_END();
%>
</form>
<% MODAL_END(); %>
</body>
</html>
<% ASPPAGE_END(); %>
