Merge 2022.1 Gold C/D/E patches

svn path=/Website/trunk/; revision=55878
This commit is contained in:
Jos Groot Lipman
2022-05-12 12:40:24 +00:00
parent e030266e9a
commit a7f468be0b
28 changed files with 402 additions and 267 deletions

View File

@@ -515,7 +515,8 @@ function model_issues(mld_key, params)
processor: processor,
treatmentteam: treatmentteam,
canFOwrite: this_mld.canFOwrite,
canBOwrite: this_mld.canBOwrite
canBOwrite: this_mld.canBOwrite,
noValidateToken: true
}
mld.acceptmelding(mld_key, params);
}

View File

@@ -24,6 +24,7 @@ function model_visitors()
this.records_name = "visitors"
this.record_name = "visitor";
this.autfunction = "WEB_BEZUSE"; // TODO!!
this.multi_update = true;
this.fields = {"id" : { dbs: "bez_bezoekers_key",
typ: "key",

View File

@@ -33,7 +33,10 @@ Application.UnLock();
%>
<script>
if (window.name.match(/^ID.*/)) /* Om de startpagina uit te sluiten als de chat als widget gebruikt wordt */
FcltMgr.setTitle("<%=L("lcl_chatter_outgoing").format(ins_discipline_omschrijving)%>", { hot: true });
{
FcltMgr.setTitle("<%=L("lcl_chatter_outgoing").format(ins_discipline_omschrijving)%>");
FcltMgr.startEdit(window); // maakt hem hot
}
var wantchannelId = "<%=wantchannelId%>";
var startMessage;

View File

@@ -109,6 +109,13 @@ ANONYMOUS_Allowed = 1;
}
break;
}
if (missing_id)
{
__Logging = 3;
__Log(params.info);
__Log("connection:");
__Log(topdesk_conn);
}
topdesk_url = topdesk_conn.baseurl + topdesk_conn.url;
__Log("URL to TOPdesk: " + topdesk_url);
__Log("body data");
@@ -189,7 +196,15 @@ ANONYMOUS_Allowed = 1;
{
errmsg = (missing_id ? "unknown id in " : "No method found for executing ") + topdesk_url;
}
return { status: status, message: errmsg, data: data};
var connect_result = { status: status
, message: errmsg
, data: data
};
if (missing_id)
{
__Log(connect_result);
}
return connect_result;
}
function load_headerdata()
@@ -300,11 +315,11 @@ ANONYMOUS_Allowed = 1;
p_obj_topdesk.lookup = lookup_list.lookup[i]; // Maak een nieuwe node lookup aan met de parameters voor het opzoeken.
// doe een connectTopdesk met een aanvraag voor gegevens (lookup is altijd GET!)
var z_result = connectTopdesk("GET", z_info.actie, p_obj_topdesk);
__Log("Resultaat lookup van " + z_info.actie);
__Log(z_result);
if (z_result.message == "" && z_result.data.length == 1)
{
// voeg het resultaat toe op de aangewezen plek in p_obj_topdesk
__Log("Resultaat lookup van " + z_info.actie);
var z_waarde = resolve_obj("GET", z_result, z_info.src);
resolve_obj("PATCH", p_obj_topdesk, z_info.dest, z_waarde);
}
@@ -474,6 +489,7 @@ ANONYMOUS_Allowed = 1;
if (obj_topdesk.info.methode != 'NONE')
{
var topdesk_result = connectTopdesk(obj_topdesk.info.methode, obj_topdesk.info.actie, obj_topdesk);
__Log(topdesk_result);
if (topdesk_result.status != -1)
{ // Nu kunnen de bijlagen verstuurd worden.
var attach_result = addAttachments(obj_topdesk, topdesk_result);

View File

@@ -263,6 +263,55 @@ if (SHAinfo) // niet @Trunk
result.SHAinfo = SHAinfo;
}
result.certificates = [];
//CertStore is "no license required", geen lockcode nodig
//oChilglob = new ActiveXObject("Chilkat_9_5_0.Global");
//var txt ="Version: " + oChilglob.Version;
//var success = oChilglob.UnlockBundle(S("puo_chilkat_secret"));
//if (success != 1)
// result.certificate = "Chilkat_9_5_0 Unlock failed:\n" + oChilglob.LastErrorText;
function findCertificates(storeName)
{
try
{
var certStore = new ActiveXObject("Chilkat_9_5_0.CertStore");
certStore.AvoidWindowsPkAccess = 1;
var success = certStore.OpenWindowsStore("LocalMachine", storeName, 1);
if (success == 0)
{
result.certificatesMsg = "Failed to open certificate Store, Certificates not checked\n" + certStore.LastErrorHtml;
}
else
{
var nr = certStore.NumCertificates;
for (var i = 0; i < certStore.NumCertificates; i++)
{
var cert = certStore.GetCertificate(i);
if (!cert.ForServerAuthentication)
continue;
var dtFrom = new Date(cert.ValidFromStr);
var dtTo = new Date(cert.ValidToStr);
result.certificates.push({
storeName: storeName,
IssuerCN: cert.IssuerCN,
SubjectCN: cert.SubjectCN,
validFrom: new Date(cert.ValidFromStr),
validTo: new Date(cert.ValidToStr)
});
}
}
}
catch(e)
{
result.certificatesMsg = "Chilkat_9_5_0 not installed. Certificates not checked\n" + e.description;
}
}
// The key difference between Web Hosting store and Personal store is that
// Web Hosting store is designed to scale to higher numbers of certificates.
findCertificates("WebHosting");
findCertificates("My");
Response.Write(JSON.stringify(result));
// Oracle en xdOracle zijn beide al gesloten

View File

@@ -606,6 +606,68 @@ checker("HTTP Request protocol",
}
)
var CN = String(Request.ServerVariables("HTTPS_SERVER_SUBJECT"));
//CN = "CN=areo.facilitor.de";
if (CN)
checker("Certificate checker for " + CN,
function ()
{
try
{
// CertStore is no license required, geen lockcode nodig
//oChilglob = new ActiveXObject("Chilkat_9_5_0.Global");
//var txt ="Version: " + oChilglob.Version;
//var success = oChilglob.UnlockBundle(S("puo_chilkat_secret"));
//if (success != 1)
// result.certificate = "Chilkat_9_5_0 Unlock failed:\n" + oChilglob.LastErrorText;
//else
{
var certStore = new ActiveXObject("Chilkat_9_5_0.CertStore");
}
}
catch(e)
{
return { result: resultcodes.ok,
message: "Chilkat_9_5_0 not installed. Certificate not checked<br>" + e.description
}
}
certStore.AvoidWindowsPkAccess = 1;
var commonname = String(CN).split("=")[1]; // "CN=*.facilitor-test.nl"
//var success = cert.LoadByCommonName(commonname); // werkt wel voor Other People maar niet voor My of Webhosting
//success = certStore.OpenLocalSystemStore(1); // doet altijd My
var msg = "Looking for certificate in Local Computer/Web Hosting";
success = certStore.OpenWindowsStore("LocalMachine", "WebHosting", 1);
if (success == 0)
{
msg += "<br>Failed to open certificate Store!<br>" + certStore.LastErrorHtml;
return { result: resultcodes.warning,
message: msg + "<br>Failed to open certificate Store!<br>" + certStore.LastErrorHtml
}
}
var cert = certStore.FindCertBySubjectCN(commonname);
//var cert = certStore.FindCertBySubjectCN("marx.mareon-test.nl");
if (!cert)
{
return { result: resultcodes.warning,
message: msg + "<br>Failed to find certificate for " + commonname
+ "<br>Note: Local Computer/Personal has not been checked!"
}
}
//msg += "<br>ValidFrom " + cert.ValidFromStr + "<br>ValidTo " + cert.ValidToStr;
var dtFrom = new Date(cert.ValidFromStr);
var dtTo = new Date(cert.ValidToStr);
msg += "<br>Found and valid from " + toDateTimeString(dtFrom) + " to " + toDateTimeString(dtTo);
var days = Math.floor((dtTo.getTime() - new Date().getTime()) / 1000 / 3600 / 24);
return { result: days > 28?resultcodes.ok:days > 7?resultcodes.warning:resultcodes.error,
message: msg,
info: String(days) + " days to go"
}
}
)
checker("Session.Timeout",
function ()
{

View File

@@ -86,7 +86,7 @@ function generateFlexKenmerkBlock(params)
+ " , NULL otherpath, "
+ (advanced
? "1"
: "0" ) + " kenmerk_toonbaar"
: " k.ins_kenmerk_toonbaar" ) + " kenmerk_toonbaar"
+ " , k.ins_kenmerk_uniek kenmerk_uniek"
+ " , k.ins_kenmerk_regexp kenmerk_regexp"
+ " , k.ins_kenmerk_bewerkniveau bewerk_niveau"

View File

@@ -99,7 +99,8 @@ mld = {
mld_note_save(mld_key,
remark,
{ isFE: false,
zichtFE: true /* altijd */
zichtFE: true, /* altijd */
noValidateToken: params.noValidateToken
});
}
if (setLines.length > 0)
@@ -3752,11 +3753,9 @@ mld = {
if (canFAQFOFread)
faq_bits += 2;
var plaatsChanged = changed >= 2 && changed <= 5;
var show = changed == -1;
// Deze functie wordt alleen aangeroepen als de plaats of stdmelding is aangepast.
var sql = [];
if (/* !is_popup && */(has.ins || has.stdm) && (has.loc || has.alg)) // kennisbank items gekoppeld aan vakgroep/stdm en plaats
if ((has.ins || has.stdm) && (has.loc || has.alg)) // kennisbank items gekoppeld aan vakgroep/stdm en plaats
{
var filtSELECT = " , DECODE (sf.mld_stdmelding_key,"
+ " NULL, DECODE (sf.ins_discipline_key,"
@@ -3803,7 +3802,7 @@ mld = {
sql.push(mld.getkennisbank_sql(filtSELECT, filtFROM, filtWHERE, faq_bits));
}
if (/* !is_popup && */(plaatsChanged || show) && (has.loc || has.alg)) // kennisbank items gekoppeld aan plaats en niet aan vakgroep/stdm
if (has.loc || has.alg) // kennisbank items gekoppeld aan plaats en niet aan vakgroep/stdm
{
var filtSELECT = " , 'X' stdm_type"
+ " , DECODE (og.alg_onroerendgoed_keys,"
@@ -3836,7 +3835,7 @@ mld = {
sql.push(mld.getkennisbank_sql(filtSELECT, filtFROM, filtWHERE, faq_bits));
}
if ((!plaatsChanged || show/* || is_popup*/) && (has.ins || has.stdm)) // kennisbank items gekoppeld aan vakgroep/stdm en niet aan plaats
if (has.ins || has.stdm) // kennisbank items gekoppeld aan vakgroep/stdm en niet aan plaats
{
var filtSELECT = " , DECODE (sf.mld_stdmelding_key,"
+ " NULL, DECODE (sf.ins_discipline_key,"

View File

@@ -594,9 +594,10 @@ function callback_faq_info(data)
{
// Een vertraging om bij meerdere callbacks achter elkaar alleen de laatste uit te voeren.
clearTimeout(window.faq_info_timer);
window.faq_info_timer = setTimeout("callback_faq_info_once()", 500);
window.faq_info_timer = setTimeout("callback_faq_info_once()", 1500);
}
show_fixed_faq(data.changed, data.fixed_faq);
else
show_fixed_faq(data.changed, data.fixed_faq);
}
function callback_faq_info_once()
@@ -613,6 +614,7 @@ function callback_faq_info_once()
+ "&changed=" + data.changed;
FcltMgr.openModalDetail(url, L("lcl_mld_faq_stdmanswers"), { height: 200, width: 700, callback: mld_faq_list_callback } );
}
show_fixed_faq(data.changed, data.fixed_faq);
}
function show_fixed_faq(changed, fixed_faq)
@@ -622,14 +624,14 @@ function show_fixed_faq(changed, fixed_faq)
var alg = [null, 'X', 'L', 'G', 'V', 'R'];
var error = fixed_faq == null; // veld verkeerd of leeg 'ingevuld'
var plaatsChanged = changed >= 2 && changed <= 5;
//var plaatsChanged = changed >= 2 && changed <= 5;
for (var a = (plaatsChanged ? (error ? changed : 2) : 1); a <= 5; a++)
{
if (plaatsChanged)
$tbl.find("tr.faq_X" + alg[a]).remove();
$tbl.find("tr.faq_I" + alg[a]).remove();
$tbl.find("tr.faq_S" + alg[a]).remove();
for (var a = 1; a <= 5; a++)
{ // Zowel de plaatsgebonden kennisbankitems als de kennisbankitems die over vakgroepen/standaardmeldingen worden nu in de popup getoond (indien aangegeven volgens setting).
// Alle kennisbank items zijn opgehaald. Nu kan alles verwijderd worden en de juiste kennisbankitems worden getoond.
$tbl.find("tr.faq_X" + alg[a]).remove();
$tbl.find("tr.faq_I" + alg[a]).remove();
$tbl.find("tr.faq_S" + alg[a]).remove();
}
if (fixed_faq && fixed_faq.length)

View File

@@ -324,17 +324,6 @@ if (mld_opdr.kp_key == -1)
autoGebouwKp = true;
}
}
// Aantal lopende opdrachten.
sql = "SELECT COUNT(mld_opdr_key) nrOpen"
+ " FROM mld_opdr o"
+ " WHERE mld_melding_key = " + mld_key
+ " AND o.mld_statusopdr_key NOT IN (1, 2, 6, 7, 9)"
+ " AND o.mld_opdr_key != " + opdr_key;
oRs = Oracle.Execute(sql);
var nrOpenOpdr = oRs("nrOpen").Value;
oRs.Close();
%>
<html>
@@ -393,7 +382,6 @@ oRs.Close();
var tonen_kostenplaats = <%=mld_opdr.tonen_kostenplaats? 1 : 0%> == 1;
var tonen_totaal = <%=mld_opdr.tonen_totaal? 1 : 0%> == 1;
var nrOpenOpdr = <%=nrOpenOpdr%>;
var opdrachtid = "<%=(mld_opdr.srtdiscprefix||"") + mld_key + "/" + mld_opdr.mld_opdr_bedrijfopdr_volgnr%>";
var alg_onrgoed_obj_niveau = "<%=alg_onrgoed_obj_niveau%>";
var alg_onrgoed_niveau = "<%=alg_onrgoed_niveau%>";

View File

@@ -473,8 +473,10 @@ function mld_submit(json)
canDatesChange && // Opdracht datum was wijzigbaar.
canWriteDatumsMld && // Ik heb de rechten om de melding einddatum aan te passen.
mld_opdr_einddatum &&
mld_opdr_einddatum.getTime() <= mld_einddatum.getTime() && // Huidige opdracht einddatum is voor of gelijk aan de huidige melding einddatum.
mld_opdr_einddatum.getTime() > 0 && // Proberen we een ongeldige datum (1900) te herstellen?
opdr_einddatum.getTime() != mld_opdr_einddatum.getTime())
opdr_einddatum.getTime() != mld_opdr_einddatum.getTime() && // Datum van de opdracht is aangepast.
opdr_einddatum.getTime()> mld_einddatum.getTime()) // Nieuwe opdracht einddatum is na de huidige melding einddatum.
{
var url = "../mld/mld_askshiftdate.asp?mld_einddatum=" + mld_opdr_einddatum.getTime(); // Vraag om einddatum melding met einddatum opdracht mee te verschuiven.
FcltMgr.openModalDetail(url, L("lcl_opdr_info") + " " + opdrachtid, {callback: askshiftdateCallback});

View File

@@ -130,6 +130,10 @@ for (var i = 2; i >= 0; i--)
$('textarea').resize(function () { FcltMgr.resized(window) } );
$('textarea').autogrow();
PasteFromSelectbox();
<% if (canCloseCtr > 0 && S("mld_close_ctr_default"))
{ %>
$("#ctr_close").trigger("change");
<% } %>
});
function mld_reject()

View File

@@ -114,7 +114,7 @@ var ilink;
BLOCK_START("msgMessage", L("lcl_mes_message"), { icon: "fa-envelope", wide: true });
ROFIELDTR("fld", L("lcl_from"), sender_name);
ROFIELDTR("fld", L("lcl_mes_subject"), subject);
ROTEXTAREATR("fldtxt", (message_answer ? L("lcl_mes_message_received_back") : L("lcl_mes_message_received")), mess_dsc, { ishtmlsafe: true });
ROTEXTAREATR("fldtxt", (message_answer ? L("lcl_mes_message_received_back") : L("lcl_mes_message_received")), mess_dsc );
if (message_answer)
{
@@ -124,7 +124,7 @@ var ilink;
%>
<tr>
<td class="label"><label><%=L("lcl_mes_link")%></label></td>
<td colspan="3"><a class="fldmsgurl" href="<%=safe.htmlattr(ilink)%>" target="_blank" rel="noopener noreferrer"><%=ilink%></a></td>
<td colspan="3"><a class="fldmsgurl" href="<%=safe.htmlattr(ilink)%>" target="_blank" rel="noopener noreferrer"><%=safe.html(ilink)%></a></td>
</tr>
<% }
@@ -136,4 +136,4 @@ var ilink;
SUBFRAME_END(); %>
</body>
</html>
<% ASPPAGE_END(); %>
<% ASPPAGE_END(); %>

View File

@@ -121,21 +121,6 @@ span.miconimg {
white-space: normal;
}
#page_setlocation div.locations {
height: 45vh;
overflow: scroll;
}
#page_setlocation div.locations table {
width: 100%;
}
#page_setlocation div.locations table tr td {
background-color: ==mobilelistbackgroundcolor== !important;
color: ==mobilelisttextcolor== !important;
}
#page_setlocation div.locations table tr.selected td {
background-color: darkgrey !important; /* harde kleur.. */
color: white !important; /* harde kleur.. */
}
#loginhtml {
background-image: none !important;
}
@@ -663,6 +648,7 @@ label.ui-btn {
background-color: ==buttonbackgroundcolor== !important;
}
#alg_key.ui-controlgroup a.selected,
.ui-btn:hover {
color: ==buttonhovercolor== !important;
background-color: ==buttonhoverbackgroundcolor== !important;

View File

@@ -214,7 +214,7 @@ function onBijlagenMobile(formurl, // protected
var html = '<iframe class="mfcltmodal"' +
' frameborder="0"' +
' id="fcltmodal" name="fcltmodal" scrolling="no" style="padding: 0px;"' +
' src="' + rooturl + '/appl/shared/empty.html">' +
' src="' + formurl + '">' +
'</iframe>';
html = '<div id="bijlagepopup" data-role="popup" class="ui-content" data-theme="c">' +
@@ -256,8 +256,6 @@ function onBijlagenMobile(formurl, // protected
// $("#bijlagepopup").show();
$("#bijlagepopup").popup({ history: false }).popup("open");
$html.find("iframe").attr("src", formurl);
}
// make filename safe for show
function safeFilename(s) {

View File

@@ -13,7 +13,6 @@
*/
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/selector.inc" -->
<!-- #include file="./mobile.inc" -->
<!-- #include file="./iface.inc" -->
<%
@@ -61,110 +60,13 @@ oRs.Close();
// Als keys meegegeven, dan globallocation zetten op die key en refresh naar Facilitor.asp (die toont de locatie)
// Als geen keys meegegeven, dan plaatsselector met default de huidige globallocation om aan te laten passen
%>
<html><head>
<% FCLTMHeader.Generate({title: L("lcl_mobile_setlocation")}); %>
<script>
function showError(error)
{
var txt;
switch(error.code)
{
case error.PERMISSION_DENIED:
txt = "User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
txt = "Location information is unavailable."
break;
case error.TIMEOUT:
txt = "The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
txt = "An unknown error occurred."
break;
}
alert(txt);
}
var latitude = <%=safe.jsfloat(latitude)%>;
var longitude = <%=safe.jsfloat(longitude)%>;
function loc_submit() {
var selected = $("table tr.selected td");
if (selected.length == 0)
<html>
<head>
<% FCLTMHeader.Generate({ title: L("lcl_mobile_setlocation") });
var init_alg_key = -1;
if (S("mobile_alg_level") == 'L')
{
jqToast("<%=L("lcl_select_location")%>");
return false;
}
var data = $("form[name=setloc]").serialize()+"&alg_key="+selected.attr("value");
$.post($("form[name=setloc]")[0].action, data, function() { location.href = "<%=rooturl + "/appl/pda/Facilitor.asp"%>"; });
}
$(function() {
// selectByGPS gives an error when run on an android device in NativeScript
// setTimeout gives the shell time to reload the page with lat,long coordinates
if (latitude > -91) {
$.getJSON("getLocation.asp", {lat: latitude, lng: longitude },
function (data)
{
$("#alg_key").val(data.alg_key).selectmenu('refresh');
});
}
});
function selectByGPS() {
{
setTimeout(function () {
navigator.geolocation.getCurrentPosition (
function (pos)
{
var lat = pos.coords.latitude;
var lng = pos.coords.longitude;
if (lat == null) {
alert("Cannot access coordinates");
}
$.getJSON("getLocation.asp", {lat: lat, lng: lng },
function (data)
{
//alert(data.alg_key);
$("#alg_key").val(data.alg_key).selectmenu('refresh');
});
}, showError
, {timeout: 15000, enableHighAccuracy: true});
}, 300);
}
}
$(function () {
<% if (S("mobile_alg_level") == 'G') { %>
var selected_key = "<%=user.alg_gebouw_key({withcurrent:true})%>";
<% } else if (S("mobile_alg_level") == 'L') { %>
var selected_key = "<%=user.alg_locatie_key({withcurrent:true})%>";
<% } else if (S("mobile_alg_level") == 'V') { %>
var selected_key = "<%=user.alg_verdieping_key({withcurrent:true})%>";
<% } %>
$("table tr").on("click", function () {
$("table tr").removeClass("selected");
$(this).closest("tr").addClass("selected");
});
var jq_obj = $("table tr td[value=" + selected_key + "]");
jq_obj.click();
$("div.locations").animate({ scrollTop: jq_obj[0].offsetTop }, 250);
});
</script>
</head>
<body>
<%
PAGE_START({ id: "page_setlocation" });
HEADER ({back: !qrc});
CONTENT_START();
%>
<form id="setloc" name="setloc" action="<%=rooturl + "/appl/pda/"%>setlocation.asp" method="post">
<div class="ui-bar" id="setloctxt"><%= L("lcl_mobile_setlocation_intro")%></div>
<%
CONTROLGROUP_START();
BUTTON(L("lcl_mobile_currentgps"), {click: "selectByGPS()", dataicon: "fa fa-location-arrow", id: "gpsbut", linkid: (Session("app_build") ? "loc:" : rooturl) + "/appl/pda/setlocation.asp"});
%> <input type="text" placeholder="<%=L("lcl_autofilter")%>" id="filter"> <%
%> <div class="locations"> <%
if (S("mobile_alg_level") == 'L') {
sql = "SELECT l.alg_locatie_key, l.alg_locatie_omschrijving"
sql = "SELECT l.alg_locatie_key key, l.alg_locatie_omschrijving descr"
+ " FROM alg_locatie l"
+ " WHERE l.alg_locatie_verwijder IS NULL" // in scope
+ " AND ( l.alg_locatie_vervaldatum IS NULL"
@@ -186,10 +88,11 @@ $(function () {
+ " WHERE prs_perslid_key = " + user_key
+ " AND niveau = " + autlevel + ")";
sql += " ORDER BY 2";
FCLTselector("alg_key", sql, {initKey: user.alg_locatie_key({withcurrent:true}), nolabel: L("lcl_location"), mobile:true, datafilter:true, datainput: "#filter"});
} else if (S("mobile_alg_level") == 'G') {
sql = "SELECT g.alg_gebouw_key, COALESCE(alg_locatie_plaats, alg_locatie_omschrijving)||': '||alg_gebouw_omschrijving"
init_alg_key = user.alg_locatie_key({ withcurrent: true });
}
else if (S("mobile_alg_level") == 'G')
{
sql = "SELECT g.alg_gebouw_key key, COALESCE(alg_locatie_plaats, alg_locatie_omschrijving)||': '||alg_gebouw_omschrijving descr"
+ " FROM alg_gebouw g, alg_srtgebouw sg, alg_locatie l"
+ " WHERE sg.alg_srtgebouw_key = g.alg_srtgebouw_key"
+ " AND g.alg_locatie_key = l.alg_locatie_key"
@@ -204,10 +107,11 @@ $(function () {
+ " WHERE prs_perslid_key = " + user_key
+ " AND niveau = " + autlevel + ")";
sql += " ORDER BY 2";
FCLTselector("alg_key", sql, {initKey: user.alg_gebouw_key({withcurrent:true}), nolabel: L("lcl_building"), mobile:true, datafilter:true, datainput: "#filter"});
} else if (S("mobile_alg_level") == 'V') {
sql = "SELECT v.alg_verdieping_key, alg_gebouw_omschrijving||'/'||v.alg_verdieping_code"
init_alg_key = user.alg_gebouw_key({ withcurrent: true });
}
else if (S("mobile_alg_level") == 'V')
{
sql = "SELECT v.alg_verdieping_key key, alg_gebouw_omschrijving||'/'||v.alg_verdieping_code descr"
+ " FROM alg_gebouw g, alg_srtgebouw sg, alg_verdieping v, alg_locatie l"
+ " WHERE g.alg_gebouw_key = v.alg_gebouw_key"
+ " AND g.alg_locatie_key = l.alg_locatie_key"
@@ -224,10 +128,129 @@ $(function () {
+ " WHERE prs_perslid_key = " + user_key
+ " AND niveau = " + autlevel + ")";
sql += " ORDER BY 2";
FCLTselector("alg_key", sql, {initKey: user.alg_verdieping_key({withcurrent:true}), nolabel: L("lcl_floor"), mobile:true, datafilter:true, datainput: "#filter"});
init_alg_key = user.alg_verdieping_key({ withcurrent: true });
}
%> </div> <%
BUTTON(L("lcl_select"), {click: "loc_submit()", dataicon: "fa-fclt-save"});
%>
<script>
function showError(error)
{
var txt;
switch(error.code)
{
case error.PERMISSION_DENIED:
txt = "User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
txt = "Location information is unavailable."
break;
case error.TIMEOUT:
txt = "The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
txt = "An unknown error occurred."
break;
}
FcltMgr.alert(txt);
}
function loc_submit() {
var $selected = $("#alg_key.ui-controlgroup").find(".selected");
if (!$selected.length)
{
jqToast("<%=L("lcl_select_location")%>");
return false;
}
var selected_key = parseInt($selected.attr("id").substr(4), 10);
var data = $("form[name=setloc]").serialize()+"&alg_key="+selected_key;
$.post($("form[name=setloc]")[0].action, data, function() { location.href = "<%=rooturl + "/appl/pda/Facilitor.asp"%>"; });
}
function doPlaceSelect(alg_key)
{
var select_this_key = alg_key || <%=init_alg_key%>;
$("#alg_key").find(".selected").removeClass("selected");
var $selected = $("#alg-" + select_this_key);
$selected.addClass("selected");
if (!alg_key && $selected.length)
{
var scrollTop = $selected.offset().top // Plaats-offset met top vd pagina
- (document.documentElement.clientHeight / 2) // Helft v/d pagina hoogte (zodat de plaats in het midden komt)
+ ($selected[0].clientHeight / 2); // Helft v/d plaats-hoogte (zodat plaats exact in het midden komt)
$(document.scrollingElement).animate({ scrollTop: scrollTop }, 250);
}
}
function selectByGPS()
{
navigator.geolocation.getCurrentPosition(function (pos)
{
var lat = pos.coords.latitude;
var lng = pos.coords.longitude;
if (lat == null)
FcltMgr.alert("Cannot access coordinates");
$.getJSON("getLocation.asp", { lat: lat, lng: lng },
function (data)
{
doPlaceSelect(data.alg_key);
});
},
showError,
{ timeout: 15000, enableHighAccuracy: true });
return false;
}
$(function()
{
var latitude = <%=safe.jsfloat(latitude)%>;
var longitude = <%=safe.jsfloat(longitude)%>;
if (latitude > -91) {
$.getJSON("getLocation.asp", { lat: latitude, lng: longitude },
function (data)
{
doPlaceSelect(data.alg_key);
});
}
else
doPlaceSelect();
});
</script>
</head>
<body>
<%
PAGE_START({ id: "page_setlocation" });
HEADER ({back: !qrc});
CONTENT_START();
%>
<form id="setloc" name="setloc" action="<%=rooturl + "/appl/pda/"%>setlocation.asp" method="post">
<div class="ui-bar" id="setloctxt"><%= L("lcl_mobile_setlocation_intro")%></div>
<%
CONTROLGROUP_START();
var gps_btn_params = { dataicon: "fa fa-location-arrow", id: "gps-btn" };
if (Session("app_build"))
gps_btn_params.linkid = "loc:/appl/pda/setlocation.asp";
else
gps_btn_params.click = "selectByGPS();";
BUTTON(L("lcl_mobile_currentgps"), gps_btn_params);
%> <input type="text" placeholder="<%=L("lcl_autofilter")%>" id="filter">
<%
var oRs = Oracle.Execute(sql);
if (!oRs.EoF)
{
%> <fieldset id="alg_key" data-role="controlgroup" data-mini="true" data-filter="true" data-input="#filter"><%
while (!oRs.EoF)
{
BUTTON(safe.html(oRs("descr").Value), {
"id" : "alg-" + oRs("key").Value,
"click" : "doPlaceSelect(" + oRs("key").Value + ")"
});
oRs.MoveNext();
}
%> </fieldset ><%
}
oRs.Close();
BUTTON(L("lcl_select"), { click: "loc_submit()", dataicon: "fa-fclt-save" });
CONTROLGROUP_END();
IFACE.FORM_END();
%>

View File

@@ -114,3 +114,7 @@ img.photo {
height: 100px;
width: 100px;
}
@media print {
.noprint { display: none; }
}

View File

@@ -8,7 +8,7 @@
Context: Vanuit ELK asp bestand
*/
var FCLTVersion="2022.1b";
var FCLTVersion="2022.1d";
var FCLTMinDatabaseSchema="42"; // Alleen de cijfers
var custpath = rooturl + "/cust/" + customerId; // path to customer files

View File

@@ -383,6 +383,10 @@
}
a:hover{text-decoration: underline;}
hr {color: #6685AE;}
@media print {
.noprint { display: none; }
}
</style>
</xsl:template>

View File

@@ -372,6 +372,10 @@ function callback_flex_expr_info(json)
// save initial visibility state of field
var initialVisible = $("#" + json[kenmerk].kfieldid + "val").is(":visible");
// Fill the attribute "default" if it isn't defined yet. The parameter "json[kenmerk].waarde" contains the current/correct value for new and existing calls.
if ($("#" + json[kenmerk].kfieldid + "val").attr("default") == undefined)
$("#" + json[kenmerk].kfieldid + "val").attr("default", json[kenmerk].waarde);
if ($("#" + json[kenmerk].kfieldid + "val").hasClass("flexshow") ||
$("#Suggest" + json[kenmerk].kfieldid + "_show").hasClass("flexshow") ||
(["L", "X"].indexOf(json[kenmerk].kenmerktype) > -1 && $("label[for=" + json[kenmerk].kfieldid + "val]").hasClass("flexshow")) ||
@@ -428,7 +432,8 @@ function callback_flex_expr_info(json)
var $fld_show = $("#Suggest" + json[kenmerk].kfieldid + "_show");
if (json[kenmerk].exprwaarde == 0 || json[kenmerk].exprwaarde == null) {
if (json[kenmerk].exprwaarde == 0 || json[kenmerk].exprwaarde == null)
{
// save default value in flex field
if (initialVisible)
{

View File

@@ -791,7 +791,7 @@ notes =
{
fields.push({ dbs: params.table + "_note_key", typ: "key", seq: params.module.toLowerCase() + "_s_" + params.table + "_note_key" });
var noteIns = buildInsert(params.table + "_note", fields);
var noteIns = buildInsert(params.table + "_note", fields, { noValidateToken: params.noValidateToken });
note_key = noteIns.sequences[params.table + "_note_key"];
Oracle.Execute(noteIns.sql);

View File

@@ -139,12 +139,7 @@ function FCLTselector(fieldName, sql, params)
startmulti = true;
if (params.multi && !params.initKey && params.initKey != "" && !params.emptyOption && params.emptyOption != "")
startmulti = true;
/* a list on mobile with a dataFilter has to be a table */
%>
<%=((params.mobile && params.datafilter) ? "<table " : "<select ")%>
class='fld<%=(params.startmulti?"multi":"")%><%=params.required? " required" : ""%> <%=params.extraclass? " " + params.extraclass : ""%>'
<%=params.datafilter? " data-filter='true'" : ""%>
<%=params.datainput? " data-input='"+ safe.htmlattr(params.datainput) +"'" : ""%>
%><select class="fld<%=(params.startmulti ? "multi" : "")%><%=params.required? " required" : ""%> <%=params.extraclass? " " + params.extraclass : ""%>"
name='<%=fieldName%>'
id='<%=params.id%>'
<%=startmulti? " multiple" : ""%>
@@ -154,12 +149,9 @@ function FCLTselector(fieldName, sql, params)
<%=params.onChange? " onchange='" + safe.htmlattr(params.onChange) + "'" : ""%>
<%=params.onDblClick? " onDblClick='" + safe.htmlattr(params.onDblClick) + "'" : "" %>
<%=(params.mobile ? " data-icon='fa fa-chevron-down'" : "") /* LET OP DAT HTML-HAAKJE HIERACHTER */ %>>
<% result = FCLTselectorOptions(sql, params) %>
<% /* a list on mobile with a dataFilter has to be a table */
%>
<%=((params.mobile && params.datafilter) ? "</table>" : "</select>")%>
<%}
<% result = FCLTselectorOptions(sql, params) %>
</select><%
}
else
{ // we moeten hier wat ingewikkeld doen omdat we wel de key hebben van de te tonen waarde, maar niet de waarde zelf
// NB: in het geval van een readonly/multi listbox toont-ie maar 1 waarde.
@@ -251,10 +243,8 @@ function FCLTselectorOptions(sql, params)
// TODO: als required en initKey dan hoeft emptyoption er natuurlijk niet bij zou ik zeggen
if ((((params.emptyOption || params.emptyOption == "") && !(justone && params.required == 1)) || params.initEmpty) && !(params.selectjustone && justone))
{ var hasEmpty = true; // afgeleide var voor het gemak
/* a list on mobile with a dataFilter has to be a table */
%>
<%=((params.mobile && params.datafilter) ? "<tr><td " : "<option ")%>
value="<%=params.emptyKey%>" <%=params.required? " class='" + required_class + "'" : ""%> <%=valueInArray(params.initKey, params.emptyKey, params.multi)? " selected" : ""%>
<option value="<%=params.emptyKey%>" <%=params.required? " class='" + required_class + "'" : ""%> <%=valueInArray(params.initKey, params.emptyKey, params.multi)? " selected" : ""%>
<% if (params.extraParamValue && params.extraParamValueInit)
{
for (var i = 0; i < extraPV.length; i++)
@@ -262,10 +252,7 @@ function FCLTselectorOptions(sql, params)
<%=" " + extraPV[i].replace(/^\s+|\s+$/g,"")%>="<%=safe.htmlattr(extraPVI[i]? extraPVI[i].replace(/^\s+|\s+$/g,"") : "")%>" <% /* replace is for trim spaces */ %>
<% }
} /* LET OP DAT HTML-HAAKJE HIERACHTER */ %>>
<%=(!noresults || params.emptyIsRealValue) && params.emptyOption? safe.html(params.emptyOption) : "&nbsp;"%>
<% /* a list on mobile with a dataFilter has to be a table */
%>
<%=((params.mobile && params.datafilter) ? "</td></tr>" : "</option>")%>
<%=(!noresults || params.emptyIsRealValue) && params.emptyOption? safe.html(params.emptyOption) : "&nbsp;"%></option>
<% }
while (!oRs.eof)
@@ -276,10 +263,7 @@ function FCLTselectorOptions(sql, params)
result.initKey = oRs(0).value;
result.initText = oRs(1).value;
}
/* a list on mobile with a dataFilter has to be a table */
%>
<%=((params.mobile && params.datafilter) ? "<tr><td " : "<option ")%>
value="<%=safe.htmlattr(oRs(0).value)%>" <%=valueInArray(params.initKey, oRs(0).value, params.multi) || (justone && !hasEmpty)? " selected " : ""%>
%> <option value="<%=safe.htmlattr(oRs(0).value)%>" <%=valueInArray(params.initKey, oRs(0).value, params.multi) || (justone && !hasEmpty)? " selected " : ""%>
<% if (params.titleCol)
{
title = oRs(params.titleCol).value;
@@ -312,10 +296,7 @@ function FCLTselectorOptions(sql, params)
{ %>
<%=extraPV[i].replace(/^\s+|\s+$/g,"")%>="<%=safe.htmlattr(oRs(extraPV[i].replace(/^\s+|\s+$/g,"")).value)%>" <% /* replace is for trim spaces */ %>
<% }
} /* LET OP DAT HTML-HAAKJE HIERACHTER */ %>><%=safe.html(oRs(1).value)%>
<% /* a list on mobile with a dataFilter has to be a table */
%>
<%=((params.mobile && params.datafilter) ? "</td></tr>" : "</option>")%>
} /* LET OP DAT HTML-HAAKJE HIERACHTER */ %>><%=safe.html(oRs(1).value)%></option>
<% oRs.MoveNext();
}
oRs.close();

View File

@@ -50,10 +50,12 @@ function FCLTsrtdeelselector(fieldName, objectName, params)
{
var sql = "SELECT "
+ lcl.xsql ("sd." + module + "_srtdeel_omschrijving", "sd." + module + "_srtdeel_key") + " srtdeel_omschrijving"
+ getExtraInfSrtdeel(params.extracode, module)
+ " FROM " + module + "_srtdeel sd"
+ " WHERE " + module + "_srtdeel_key = " + params.srtdeel_key;
var oRs = Oracle.Execute(sql);
lsrtdeelName = oRs("srtdeel_omschrijving").value;
lextraInit = oRs("extra").value;
oRs.Close();
}
else

View File

@@ -48,10 +48,12 @@ function FCLTsrtgroepselector(fieldName, objectName, params)
{
var sql = "SELECT "
+ lcl.xsql("sg." + module + "_srtgroep_omschrijving", "sg." + module + "_srtgroep_key") + "srtgroep_omschrijving"
+ ", sg.ins_discipline_key extra"
+ " FROM " + module + "_srtgroep sg"
+ " WHERE " + module + "_srtgroep_key = " + params.srtgroep_key;
var oRs = Oracle.Execute(sql);
lsrtgroepName = oRs("srtgroep_omschrijving").value;
lextraInit = oRs("extra").value;
oRs.Close();
}
else
@@ -71,7 +73,7 @@ function FCLTsrtgroepselector(fieldName, objectName, params)
{
sql = "SELECT sg." + module + "_srtgroep_key srtgroep_key"
+ ", " + lcl.xsql("sg." + module + "_srtgroep_omschrijving", "sg." + module + "_srtgroep_key") + "srtgroep_omschrijving"
+ ", td.ins_discipline_key extra"
+ ", sg.ins_discipline_key extra"
+ " FROM " + module + "_v_aanwezigsrtgroep sg"
+ ", ins_tab_discipline td"
+ " WHERE td.ins_discipline_key = sg.ins_discipline_key"

View File

@@ -248,82 +248,85 @@ function makeCSV(data, zaalemail)
{
trs.push(tds.join(";")); // header row first
}
var _startDate = internal_parsedate(null, data[index].start.dateTime);
var _endDate = internal_parsedate(null, data[index].end.dateTime);
if (data[index]["@removed"] || data[index].isCancelled || _startDate.getTime() >= curDate.getTime())
// deleted event
if (data[index]["@removed"] || data[index].isCancelled)
{ // {"@odata.type":"#microsoft.graph.event","id":"AAMkAGQ1Yz.......","@removed":{"reason":"deleted"}}
tds = [
"",
"",
"",
"",
"",
"",
"D", // cancelled or deleted
data[index].id,
"",
++seqNbr
];
trs.push(tds.join(";"));
}
else
{
// deleted event
if (data[index]["@removed"] || data[index].isCancelled)
var _startDate = internal_parsedate(null, data[index].start.dateTime);
var _endDate = internal_parsedate(null, data[index].end.dateTime);
if (_startDate.getTime() >= curDate.getTime())
{
tds = [
data[index].subject,
_startDate.toISOString(),
_endDate.toISOString(),
data[index].organizer.emailAddress.address,
data[index].organizer.emailAddress.address,
data[index].organizer.emailAddress.name,
"D", // cancelled or deleted
data[index].id,
"",
++seqNbr
];
trs.push(tds.join(";"));
}
else
{
// repeating event
if (data[index].type == "occurrence")
{
masterEvent = getMasterEvent(data, data[index].seriesMasterId) || {};
tds = [
masterEvent.subject,
_startDate.toISOString(),
_endDate.toISOString(),
masterEvent.organizer.emailAddress.address,
masterEvent.organizer.emailAddress.address,
masterEvent.organizer.emailAddress.name,
eventFound(data[index].id, data[index].OccurrenceId, zaalemail) ? "U" : "C", // C or U here
data[index].id,
data[index].OccurrenceId,
++seqNbr
];
}
// singleInstance / seriesMaster / exception
else if (inArray(data[index].type, ["singleInstance","seriesMaster","exception"]))
{
tds = [
data[index].subject,
_startDate.toISOString(),
_endDate.toISOString(),
data[index].organizer.emailAddress.address,
data[index].organizer.emailAddress.address,
data[index].organizer.emailAddress.name,
eventFound(data[index].id, data[index].OccurrenceId, zaalemail) ? "U" : "C", // C or U here
data[index].id,
inArray(data[index].type, ["seriesMaster","exception"]) ? data[index].OccurrenceId : "",
++seqNbr
];
}
trs.push(tds.join(";"));
// attendees
if ("attendees" in data[index])
{
var attendee;
for (attendee in data[index].attendees)
// repeating event
if (data[index].type == "occurrence")
{
masterEvent = getMasterEvent(data, data[index].seriesMasterId) || {};
tds = [
masterEvent.subject,
_startDate.toISOString(),
_endDate.toISOString(),
masterEvent.organizer.emailAddress.address,
masterEvent.organizer.emailAddress.address,
masterEvent.organizer.emailAddress.name,
eventFound(data[index].id, data[index].OccurrenceId, zaalemail) ? "U" : "C", // C or U here
data[index].id,
data[index].OccurrenceId,
++seqNbr
];
}
// singleInstance / seriesMaster / exception
else if (inArray(data[index].type, ["singleInstance","seriesMaster","exception"]))
{
tds = [
data[index].subject,
_startDate.toISOString(),
_endDate.toISOString(),
data[index].organizer.emailAddress.address,
data[index].attendees[attendee].emailAddress.address,
data[index].attendees[attendee].emailAddress.name,
data[index].organizer.emailAddress.address,
data[index].organizer.emailAddress.name,
eventFound(data[index].id, data[index].OccurrenceId, zaalemail) ? "U" : "C", // C or U here
data[index].id,
inArray(data[index].type, ["seriesMaster","exception"]) ? data[index].OccurrenceId : "",
seqNbr
++seqNbr
];
trs.push(tds.join(";"));
}
trs.push(tds.join(";"));
// attendees
if ("attendees" in data[index])
{
var attendee;
for (attendee in data[index].attendees)
{
tds = [
data[index].subject,
_startDate.toISOString(),
_endDate.toISOString(),
data[index].organizer.emailAddress.address,
data[index].attendees[attendee].emailAddress.address,
data[index].attendees[attendee].emailAddress.name,
eventFound(data[index].id, data[index].OccurrenceId, zaalemail) ? "U" : "C", // C or U here
data[index].id,
inArray(data[index].type, ["seriesMaster","exception"]) ? data[index].OccurrenceId : "",
seqNbr
];
trs.push(tds.join(";"));
}
}
}
}

View File

@@ -112,7 +112,6 @@ function sendNotification(ref_key, pcode, params)
var notiPRSed = 0;
while (!oRs.Eof)
{
Log2File(1, "\n");
Log2File(2, "\n\n" + Fill(100, "="));
Log2File(1, "== Notificatie: "
+ oRs("fac_notificatie_key").value + " "

View File

@@ -37,7 +37,8 @@ function Log2File(level, str, severity)
logfilename = PUO_LOGPATH + "putordersI_" + logfilename; // voorkennis: de immediate versie
var simpellogfilename = logfilename.replace(/\.log$/, ".compact.log");
if ((level <= S("puo_loglevel") && level < 2) || severity == "E" || severity == "F")
var excludesimpel = /^(SELECT xml.|XML blob|Load company style|Searching attachments|====== Skip opdracht\/bestelopdr)/;
if ((level <= S("puo_loglevel") && level < 2 && !str.match(excludesimpel) && str != "\n") || severity == "E" || severity == "F")
{
try
{

View File

@@ -287,7 +287,7 @@ function mergeXMLAttachments2(iXml, p_xslPath, xmltag, keynaam, pNiveau)
var NodeList = iXml.documentElement.selectNodes(xmltag);
if (NodeList.length > 0)
{
Log2File(1, "*> mergeXMLAttachments");
Log2File(2, "*> mergeXMLAttachments");
for (var index=0; index < NodeList.length; index++)
{