AKZA#55674 srtcontrole Eenheid = Jaarlijks en ins_srtcontrole_mode = Moment modus (0) is ins_srtcontroledl_xcp_bits voortaan in bitjes (Zodat je ook meerdere maanden kunt selecteren)
svn path=/Website/branches/v2018.2/; revision=40324
This commit is contained in:
@@ -241,6 +241,23 @@ if (srtcont_key > 0)
|
||||
$("#insInsp" + pday).prop('checked', true);
|
||||
}
|
||||
|
||||
function onClickCbMnth(pmonth)
|
||||
{ // Minimaal 1 checkbox moet aangevinkt zijn. De laatste uit vinken kan niet.
|
||||
if (!document.getElementById("insInspJan").checked &&
|
||||
!document.getElementById("insInspFeb").checked &&
|
||||
!document.getElementById("insInspMaa").checked &&
|
||||
!document.getElementById("insInspApr").checked &&
|
||||
!document.getElementById("insInspMei").checked &&
|
||||
!document.getElementById("insInspJun").checked &&
|
||||
!document.getElementById("insInspJul").checked &&
|
||||
!document.getElementById("insInspAug").checked &&
|
||||
!document.getElementById("insInspSep").checked &&
|
||||
!document.getElementById("insInspOkt").checked &&
|
||||
!document.getElementById("insInspNov").checked &&
|
||||
!document.getElementById("insInspDec").checked)
|
||||
$("#insInsp" + pmonth).prop('checked', true);
|
||||
}
|
||||
|
||||
function onChangeEenheid()
|
||||
{
|
||||
var mode = $("#sel_srtcontrole option:selected")[0].getAttribute("modus");
|
||||
@@ -381,7 +398,22 @@ if (srtcont_key > 0)
|
||||
$(".trbits4").show();
|
||||
$(".trnotholiday").hide();
|
||||
// Als bits geen maand waarde heeft dan selecteer huidige maand.
|
||||
$("#maandbits").val(bits >= 1 && bits <= 12? bits : (new Date().getMonth() + 1));
|
||||
var maandbits = bits;
|
||||
if ((maandbits & 4095) == 0) maandbits = Math.pow(2, new Date().getMonth());
|
||||
|
||||
$("#insInspJan").prop('checked', (maandbits & 1) == 1);
|
||||
$("#insInspFeb").prop('checked', (maandbits & 2) == 2);
|
||||
$("#insInspMaa").prop('checked', (maandbits & 4) == 4);
|
||||
$("#insInspApr").prop('checked', (maandbits & 8) == 8);
|
||||
$("#insInspMei").prop('checked', (maandbits & 16) == 16);
|
||||
$("#insInspJun").prop('checked', (maandbits & 32) == 32);
|
||||
$("#insInspJul").prop('checked', (maandbits & 64) == 64);
|
||||
$("#insInspAug").prop('checked', (maandbits & 128) == 128);
|
||||
$("#insInspSep").prop('checked', (maandbits & 256) == 256);
|
||||
$("#insInspOkt").prop('checked', (maandbits & 512) == 512);
|
||||
$("#insInspNov").prop('checked', (maandbits & 1024) == 1024);
|
||||
$("#insInspDec").prop('checked', (maandbits & 2048) == 2048);
|
||||
|
||||
$("#periodereartext").text("<%=L("lcl_ins_controle_period_rearyearin")%>");
|
||||
$("#periode").addClass("required");
|
||||
break;
|
||||
@@ -871,20 +903,30 @@ if (srtcont_key > 0)
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<%
|
||||
sql = "";
|
||||
for (var i = 1; i <= 12; i++)
|
||||
{
|
||||
sql += (i > 1? " UNION " : "") + "SELECT " + i + ", " + safe.quoted_sql(calendar_names.months[i - 1]) + " FROM DUAL";
|
||||
}
|
||||
FCLTselector("maandbits",
|
||||
sql,
|
||||
{ initKey: 1,
|
||||
required: false,
|
||||
readonly: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp,
|
||||
suppressEmpty: !this_ins.canChangeXcp && !this_ins.hasAnyWriteXcp
|
||||
});
|
||||
%>
|
||||
<input type="checkbox" class="fldInspJan" name="insInspJan" id="insInspJan" onClick="onClickCbMnth('Jan')" value="1" <%=(xcp_bits & 1) == 1? "CHECKED" : ""%>><label for="insInspJan"><%=safe.html(calendar_names.months[0])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspFeb" name="insInspFeb" id="insInspFeb" onClick="onClickCbMnth('Feb')" value="1" <%=(xcp_bits & 2) == 2? "CHECKED" : ""%>><label for="insInspFeb"><%=safe.html(calendar_names.months[1])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspMaa" name="insInspMaa" id="insInspMaa" onClick="onClickCbMnth('Maa')" value="1" <%=(xcp_bits & 4) == 4? "CHECKED" : ""%>><label for="insInspMaa"><%=safe.html(calendar_names.months[2])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspApr" name="insInspApr" id="insInspApr" onClick="onClickCbMnth('Apr')" value="1" <%=(xcp_bits & 8) == 8? "CHECKED" : ""%>><label for="insInspApr"><%=safe.html(calendar_names.months[3])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspMei" name="insInspMei" id="insInspMei" onClick="onClickCbMnth('Mei')" value="1" <%=(xcp_bits & 16) == 16? "CHECKED" : ""%>><label for="insInspMei"><%=safe.html(calendar_names.months[4])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspJun" name="insInspJun" id="insInspJun" onClick="onClickCbMnth('Jun')" value="1" <%=(xcp_bits & 32) == 32? "CHECKED" : ""%>><label for="insInspJun"><%=safe.html(calendar_names.months[5])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspJul" name="insInspJul" id="insInspJul" onClick="onClickCbMnth('Jul')" value="1" <%=(xcp_bits & 64) == 64? "CHECKED" : ""%>><label for="insInspJul"><%=safe.html(calendar_names.months[6])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspAug" name="insInspAug" id="insInspAug" onClick="onClickCbMnth('Aug')" value="1" <%=(xcp_bits & 128) == 128? "CHECKED" : ""%>><label for="insInspAug"><%=safe.html(calendar_names.months[7])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspSep" name="insInspSep" id="insInspSep" onClick="onClickCbMnth('Sep')" value="1" <%=(xcp_bits & 256) == 256? "CHECKED" : ""%>><label for="insInspSep"><%=safe.html(calendar_names.months[8])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspOkt" name="insInspOkt" id="insInspOkt" onClick="onClickCbMnth('Okt')" value="1" <%=(xcp_bits & 512) == 512? "CHECKED" : ""%>><label for="insInspOkt"><%=safe.html(calendar_names.months[9])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspNov" name="insInspNov" id="insInspNov" onClick="onClickCbMnth('Nov')" value="1" <%=(xcp_bits & 1024) == 1024? "CHECKED" : ""%>><label for="insInspNov"><%=safe.html(calendar_names.months[10])%></label>
|
||||
<br>
|
||||
<input type="checkbox" class="fldInspDec" name="insInspDec" id="insInspDec" onClick="onClickCbMnth('Dec')" value="1" <%=(xcp_bits & 2048) == 2048? "CHECKED" : ""%>><label for="insInspDec"><%=safe.html(calendar_names.months[11])%></label>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="trnotholiday">
|
||||
|
||||
@@ -89,7 +89,18 @@ if (mode == 0)
|
||||
bits = dagbits + weekbits + noHoliday * 128;
|
||||
break;
|
||||
case 4: // Jaarlijks
|
||||
var bits = getFParamInt("maandbits");
|
||||
bits = getFParamInt("insInspJan", 0) * 1 // Vinkje "Januari"
|
||||
+ getFParamInt("insInspFeb", 0) * 2 // Vinkje "Februari"
|
||||
+ getFParamInt("insInspMaa", 0) * 4 // Vinkje "Maart"
|
||||
+ getFParamInt("insInspApr", 0) * 8 // Vinkje "April"
|
||||
+ getFParamInt("insInspMei", 0) * 16 // Vinkje "Mei"
|
||||
+ getFParamInt("insInspJun", 0) * 32 // Vinkje "Juni"
|
||||
+ getFParamInt("insInspJul", 0) * 64 // Vinkje "Juli"
|
||||
+ getFParamInt("insInspAug", 0) * 128 // Vinkje "Augustus"
|
||||
+ getFParamInt("insInspSep", 0) * 256 // Vinkje "September"
|
||||
+ getFParamInt("insInspOkt", 0) * 512 // Vinkje "Oktober"
|
||||
+ getFParamInt("insInspNov", 0) * 1024 // Vinkje "November"
|
||||
+ getFParamInt("insInspDec", 0) * 2048; // Vinkje "December"
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user