Merge 2023.3 Gold A patches

svn path=/Website/trunk/; revision=62834
This commit is contained in:
2023-12-04 16:03:37 +00:00
parent 250737adb2
commit b0e73823ba
58 changed files with 1633 additions and 712 deletions

View File

@@ -46,7 +46,7 @@ if (wp_key > 0)
{
var algUpd = buildTrackingUpdate("prs_werkplek", " prs_werkplek_key = " + wp_key, fields);
var err = Oracle.Execute(sql, true);
var err = Oracle.Execute(algUpd.sql, true);
if (err.friendlyMsg)
warning = err.friendlyMsg;
@@ -98,4 +98,4 @@ else
<body>
</body>
</html>
<% ASPPAGE_END(); %>
<% ASPPAGE_END(); %>

View File

@@ -519,7 +519,9 @@ function saveAttachments(xmlReq, emlSetting, xmlParam, resultParam)
};
if (emlSetting.prs_perslid_key_auth) // per bestand/url unieke jwt
{
var jwt = getBearerToken(emlSetting.prs_perslid_key_auth, "_INTERNAL", 30);
// Omdat de bestanden sequentieel worden verwekt door hMailserver kan het een tijdje duren
// voordat de laatste aan de beurt is. Daarom timeout (veel) groter dan 30 seconde zetten.
var jwt = getBearerToken(emlSetting.prs_perslid_key_auth, "_INTERNAL", 300); // of: (i+1)*30 maar dat is overdreven
safefile.headers["Authorization"] = "Bearer " + jwt;
}
safeFiles.push (safefile);

View File

@@ -214,7 +214,8 @@ function model_bes_srtdeel(disc_key)
"foreign": "ins_srtdeel",
"label": L("lcl_bes_link_obj_type"),
"module": "INS",
"binding": 24 // Afdeling 0x8=8 (BIND_AFDELI) + Persoon0x10=16 (BIND_PERSOO).
"binding": 24, // Afdeling 0x8=8 (BIND_AFDELI) + Persoon0x10=16 (BIND_PERSOO).
"infoPointer": { Url: "appl/ins/ins_srtdeel.asp?srtdeel_key=" }
},
"actualprice": {
"dbs": "actualprice",

View File

@@ -129,8 +129,9 @@ function model_fac_gebruikersgroep(params)
var oRs = Oracle.Execute(sql);
while (!oRs.eof)
{
var vervaldatum = (oRs("fac_gebruikersgroep_vervaldatum").Value != null ? (new Date(oRs("fac_gebruikersgroep_vervaldatum").Value)) : null);
data.authorizationgroups.push( { groep: oRs("fac_groep_key").Value
, vervalt: (obj.expires ? obj.expires : new Date(oRs("fac_gebruikersgroep_vervaldatum").Value))
, vervalt: (obj.expires ? obj.expires : vervaldatum)
}
);
oRs.MoveNext();

View File

@@ -96,7 +96,8 @@ function model_ins_kenmerk(niveau, params)
"key": "ins_srtdeel_key",
"desc": "ins_srtdeel_omschrijving"
},
"showtransit": true
"showtransit": true,
"infoPointer": { Url: "appl/ins/ins_srtdeel.asp?srtdeel_key=" }
},
"objectkey": {
"dbs": "ins_srtinstallatie_key",

View File

@@ -82,7 +82,8 @@ function model_ins_srtcontrole()
"desc": "ins_srtdeel_omschrijving"
},
"insertonly": true,
"showtransit": true
"showtransit": true,
"infoPointer": { Url: "appl/ins/ins_srtdeel.asp?srtdeel_key=" }
},
"name": {
"dbs": "ins_srtcontrole_omschrijving",

View File

@@ -1548,7 +1548,6 @@ obj._is_clone=2 --> nieuwe sub-opdracht
var mld_opdr = mld.mld_opdr_info(the_key); // Bevat alle info van de opdracht.
var mld_key = mld_opdr.mld_key; // De melding key (jsondata.issue.id) is wellicht niet altijd aanwezig.
var opdr_type_key = mld_opdr.opdr_type;
var this_mld = mld.func_enabled_melding(mld_key);
var this_opdr = mld.func_enabled_opdracht(the_key);
old_opdrstatus = mld_opdr.opdr_status;
}
@@ -1608,6 +1607,9 @@ obj._is_clone=2 --> nieuwe sub-opdracht
// 2) De opdrachtstatus is aangepast.
// 3) De nieuwe status van de opdracht ook daadwerkelijk Afgemeld(6) is geworden.
// De rechten van de melding ophalen na de update van de opdracht. Dan heb je de actuele rechten.
var this_mld = mld.func_enabled_melding(mld_key);
// Hier terugchecken van de status en opmerking.
var tsql = "SELECT mld_statusopdr_key"
+ " , mld_opdr_opmerking"

View File

@@ -668,7 +668,7 @@ function model_mld_stdmelding()
this.hook_pre_show = function(obj, fld, scf_params)
{
scf_params.layout.block[0].label += " " +obj.id ;
scf_params.layout.block[0].label += " " +obj.id;
obj.canrefer = (obj.canrefer.id != 0 ? translate_canrefer(obj.canrefer, null) : null);
var lobj = translate_plannable(obj.plannable, null, null);
obj.plannable = lobj.plannable;
@@ -713,22 +713,42 @@ function model_mld_stdmelding()
return kanverwijzen;
}
function translate_plannable(db_plannable, lb_plannable, lb_actiondate)
function translate_plannable(db_plannable, lb_plannable, lb_actiondate, key)
{
// Kan verwijzen naar meerdere referenties (modules).
var std_key = key || -1;
var lobj = { plannable: {}
, result: 0
};
if (db_plannable)
{ // Vertalen van databasewaarde naar multiselectbox waarde.
// mld_stdmelding_plannable is ook afhankelijk van de waarde van actiondate.
// Tel de waarde van actiondate (&4) bij de waarde van plannable op.
var lobj = {plannable: { id: "", name: "" }, _actiondate: 0};
lobj.plannable.id = ((db_plannable.id & 4) == 4? (db_plannable.id - 4) : db_plannable.id);
{ // Voor PRE_SHOW en PRE_EDIT. Het databaseveld splitsen in 2 schermvelden.
lobj.result = db_plannable.id;
lobj._actiondate = ( ((lobj.result & 4) == 4) ? 1 : 0);
lobj.plannable.id = ( ((lobj.result & 4) == 4) ? lobj.result -4 : lobj.result );
lobj.plannable.name = api2.splitLOV(L("lcl_mld_planbaarLOV"))[lobj.plannable.id];
lobj._actiondate = ((db_plannable.id & 4) == 4? 1 : 0);
}
else
{ // Vertalen van multiselectbox waarde naar databasewaarde.
var lobj = {plannable: (lb_plannable + (lb_actiondate? 4 : 0)), _actiondate: (lb_actiondate? 1 : 0)};
{ // Voor PRE_POST en PRE_PUT. De 2 schermvelden samenvoegen tot 1 databaseveld
if (std_key > -1)
{ // Huidige waarde van databaseveld ophalen.
var sql = "SELECT mld_stdmelding_planbaar"
+ " FROM mld_stdmelding"
+ " WHERE mld_stdmelding_key = " + std_key;
var oRs = Oracle.Execute(sql);
if (!oRs.eof)
{
lobj.result = oRs("mld_stdmelding_planbaar").Value;
}
oRs.Close();
lobj._actiondate = ( ((lobj.result & 4) == 4) ? 4 : 0);
lobj.plannable.id = lobj.result - lobj._actiondate;
}
lobj.plannable.id = (lb_plannable != null ? lb_plannable : lobj.plannable.id);
lobj._actiondate = (lb_actiondate != null ? (lb_actiondate ? 4 : 0) : lobj._actiondate);
lobj.result = lobj.plannable.id + lobj._actiondate;
}
return lobj;
}
@@ -751,22 +771,14 @@ function model_mld_stdmelding()
var canrefer_arr = getFParamIntArray("canrefer", [-1]);
obj.canrefer = translate_canrefer(null, canrefer_arr);
}
var plannable = getFParamInt("plannable", 0);
var actiondate = getFParamInt("has__actiondate", 0) == 1 && (Request.Form("_actiondate").count == 1);
var lobj = translate_plannable(null, plannable, actiondate);
obj.plannable = lobj.plannable;
/*
// Kan verwijzen naar meerdere referenties (modules).
var kanverwijzen_arr = getFParamIntArray("canrefer", [-1]); // Kanverwijzen
var kanverwijzen = 0;
for (var i = 0; i < kanverwijzen_arr.length; i++)
{
if (kanverwijzen_arr[i] > 0)
kanverwijzen += kanverwijzen_arr[i];
}
obj.canrefer = (kanverwijzen > 128 ? 128 : kanverwijzen);
//
*/
var plannable = getFParamInt("plannable", null);
var actiondate = ( hasFParam("scf_multi") && !hasFParam("_actiondate") && !hasFParam("scf_multi__actiondate")
? null
: (getFParamSafe("_actiondate", "") == "on" ? 1 : 0)
);
var lobj = translate_plannable(null, plannable, actiondate, key);
obj.plannable = lobj.result;
}
this.hook_pre_delete = function(scf_params, key)
{

View File

@@ -451,31 +451,12 @@ function model_res_ruimte()
}
}
this._validate_fields = function (dbfields, params, jsondata)
this._validate_fields = function (dbfields, params, jsondata, the_key)
{
if (jsondata.startdate && jsondata.expirationdate)
{
if (jsondata.startdate > jsondata.expirationdate)
abort_with_warning("lcl_res_room_datecheck");
}
var sql = "SELECT rsv.res_reservering_key"
+ " FROM res_rsv_ruimte rsv"
+ " , res_ruimte_opstelling rro"
+ " , res_ruimte rr"
+ " WHERE rsv.res_ruimte_opstel_key = rro.res_ruimte_opstel_key"
+ " AND rro.res_ruimte_key = rr.res_ruimte_key"
+ " AND rsv.res_rsv_ruimte_verwijder IS NULL"
+ " AND rsv.res_status_bo_key NOT IN (5,6)" // reservering is niet afgemeld of verwerkt
+ ( (jsondata.startdate && !jsondata.expirationdate) ? " AND rsv.res_rsv_ruimte_van < " + jsondata.startdate.endToSQL() : "")
+ ( (jsondata.expirationdate && !jsondata.startdate ) ? " AND rsv.res_rsv_ruimte_tot > " + jsondata.expirationdate.beginToSQL() : "")
+ ( (jsondata.startdate && jsondata.expirationdate ) ? " AND (rsv.res_rsv_ruimte_van < " + jsondata.startdate.beginToSQL() + " OR rsv.res_rsv_ruimte_tot > " + jsondata.expirationdate.beginToSQL() + ")" : "")
+ ( (!jsondata.startdate && !jsondata.expirationdate) ? " AND (1 = 0)" : "")
+ " AND rr.res_ruimte_key = " + jsondata.id;
var oRs = Oracle.Execute(sql);
if (!oRs.eof)
{
abort_with_warning("lcl_res_room_hasres");
abort_with_warning(L("lcl_res_room_datecheck"));
}
}
@@ -517,7 +498,7 @@ function model_res_ruimte()
this.REST_PUT = function _PUT(params, jsondata, the_key) {
var dbfields = {}; //api2.update_fields(params, this, jsondata); // Build updater
this._validate_fields(dbfields, params, jsondata);
this._validate_fields(dbfields, params, jsondata, the_key);
var oldjsondata = {};
if (S("msgraph_sync_level") & 1) {
var sql = "SELECT res_ruimte_extern_id, res_ruimte_startdatum, res_ruimte_vervaldatum"

View File

@@ -257,6 +257,8 @@ function model_reservations(rsv_key, params)
dbfields["room"] = { dbs: "alg_ruimte_key", typ: "key", val: -1 };
dbfields["bostatus"] = { dbs: "res_status_bo_key", typ: "key", val: 2 }; // 'ingevoerd'. Altijd bij ruimte reserveringen
oRs.Close();
} else if ("room" in jsondata && jsondata.room) { // moet er een alg_ruimte zijn
dbfields["room"] = { dbs: "alg_ruimte_key", typ: "key", val: jsondata.room };
}
else // moet er een alg_ruimte zijn
{

View File

@@ -155,6 +155,12 @@ var facilitor_urn = "urn:ietf:params:scim:schemas:extension:facilitor:2.0:User";
function transform_incoming(params, data)
{
if (0 && FCLT.DEZE.customerId == "ALKM" && params.method == "PATCH")
{
FCLT.DEZE.__Logging = 1; // voor dit bestand
}
FCLT.DEZE.__Log("transform_incoming");
FCLT.DEZE.__Log(params);
FCLT.DEZE.__Log(data);
@@ -414,6 +420,19 @@ FCLT.DEZE.__Log(data);
person.email = get_element(data["emails"][0].value); // type:work/primary:true opzoeken ?
}
/*
"Operations": [
{
"op": "Add",
"path": "phoneNumbers[type eq \"mobile\"].value",
"value": "+31657419073"
}
*/
if (data["emails[type eq \"work\"]"]) // Zo komt een PATCH effectief binnen
{
person.email = get_element(data["emails[type eq \"work\"]"].value);
}
if (data.phoneNumbers)
{
for (var j = 0; j < data["phoneNumbers"].length; j++)
@@ -427,6 +446,15 @@ FCLT.DEZE.__Log(data);
}
}
}
if (data["phoneNumbers[type eq \"mobile\"]"])
{
person.mobile = get_element(data["phoneNumbers[type eq \"mobile\"]"].value);
}
if (data["phoneNumbers[type eq \"work\"]"])
{
person.phone = get_element(data["phoneNumbers[type eq \"work\"]"].value);
}
FCLT.DEZE.__Log({ person: person });
return { person: person };
}
@@ -496,7 +524,7 @@ function transform_one_person(params, person)
"primary":true
});
if (person.phone)
phoneNumbers.push(
phoneNumbers.push(
{
"value":person.phone,
"type":"work",

View File

@@ -519,6 +519,7 @@ function setpassword(prs_key, wachtwoord, expired, upgrade)
+ " SET prs_perslid_wachtwoord_exp = " + newexpire
+ " , prs_perslid_salt = " + safe.quoted_sql(passsalt)
+ " , prs_perslid_wachtwoord_hash = " + safe.quoted_sql('1${0}${1}'.format(workfactor, new_hash))
+ " , prs_perslid_credentials_datum = SYSDATE" // doet 2023.3 trigger niet goed als S("login_use_email") == 1
+ " WHERE prs_perslid_key = " + prs_key;
Oracle.Execute(sql);
}

View File

@@ -1296,7 +1296,7 @@
+ " AND bi.bes_bestelling_key = b.bes_bestelling_key"
+ " AND bi.bes_srtdeel_key = s.bes_srtdeel_key"
+ " AND s.bes_srtgroep_key = g.bes_srtgroep_key"
+ " AND bo.mld_adres_key_lev = ma.mld_adres_key"
+ " AND bo.mld_adres_key_lev = ma.mld_adres_key(+)"
+ " AND bdp.bes_ins_discipline_key = g.ins_discipline_key"
+ " AND bo.bes_bestelopdr_key = " + opdr_key;

View File

@@ -117,8 +117,8 @@ function process_gebouw_info(data, textStatus)
$("#show_date_from").closest("td").load("../Shared/loadCalendar.asp"
+ "?cal_id=date_from"
+ "&datum=" + $("#date_from").val()
+ "&maxPast=" + maxPast
+ "&maxFuture=" + maxFuture
+ (maxPast? "&maxPast=" + maxPast : "")
+ (maxFuture? "&maxFuture=" + maxFuture : "")
+ "&onChangeCode=2" // get_freeprk_info()
+ "&calendars=" + (afspr_key < 0? 2 : 1)
+ "&autoopen=" + autoopen
@@ -147,7 +147,7 @@ function process_gebouw_info(data, textStatus)
$("#show_date_to").closest("td").load("../Shared/loadCalendar.asp"
+ "?cal_id=date_to"
+ "&datum=" + $("#date_to").val()
+ "&maxFuture=" + maxFuture
+ (maxFuture? "&maxFuture=" + maxFuture : "")
+ "&onChangeCode=2" // get_freeprk_info()
+ "&initTimeEmpty=" + toempty
+ "&timeField=1"

View File

@@ -16,91 +16,93 @@
<!--#include file="../SlnkDWF/Slnk2IMG.inc" -->
<%
var pvKey = getQParamInt("ver_Key");
var thema_key = getQParamInt("thema", -1);
var discs = getQParamIntArray("discs", []);
var srtgs = getQParamIntArray("srtgs", []);
var srtds = getQParamIntArray("srtds", []);
if (discs.length > 0 && discs[0] == -1)
discs.shift();
if (srtgs.length > 0 && srtgs[0] == -1)
srtgs.shift();
if (srtds.length > 0 && srtds[0] == -1)
srtds.shift();
var stdm_key = getQParamInt("stdm_key", -1);
var pvKey = getQParamInt("ver_Key");
var thema_key = getQParamInt("thema", -1);
var discs = getQParamIntArray("discs", []);
var srtgs = getQParamIntArray("srtgs", []);
var srtds = getQParamIntArray("srtds", []);
if (discs.length > 0 && discs[0] == -1)
discs.shift();
if (srtgs.length > 0 && srtgs[0] == -1)
srtgs.shift();
if (srtds.length > 0 && srtds[0] == -1)
srtds.shift();
var sql = "SELECT DISTINCT d.ins_discipline_key"
+ " FROM fac_v_my_disciplines m, ins_v_aanwezigdiscipline d, ins_disc_params dp "
+ " WHERE d.ins_discipline_key=m.ins_discipline_key"
+ " AND d.ins_discipline_min_level = 1"
+ " AND dp.ins_disc_params_cadlayers IS NOT NULL"
+ " AND BITAND(dp.ins_disc_params_type, 1) > 0" // binnen
+ " AND BITAND(dp.ins_disc_params_type, 4) > 0" // default aan
+ " AND dp.ins_discipline_key = d.ins_discipline_key"
+ " AND fac_functie_code IN ('WEB_INSUSE')"
+ " AND prs_perslid_key = " + user_key;
var oRs = Oracle.Execute(sql);
while (!oRs.Eof)
{
discs.push(oRs("ins_discipline_key").Value);
oRs.MoveNext();
}
oRs.Close();
var sql = "SELECT DISTINCT d.ins_discipline_key"
+ " FROM fac_v_my_disciplines m, ins_v_aanwezigdiscipline d, ins_disc_params dp "
+ " WHERE d.ins_discipline_key=m.ins_discipline_key"
+ " AND d.ins_discipline_min_level = 1"
+ " AND dp.ins_disc_params_cadlayers IS NOT NULL"
+ " AND BITAND(dp.ins_disc_params_type, 1) > 0" // binnen
+ " AND BITAND(dp.ins_disc_params_type, 4) > 0" // default aan
+ " AND dp.ins_discipline_key = d.ins_discipline_key"
+ " AND fac_functie_code IN ('WEB_INSUSE')"
+ " AND prs_perslid_key = " + user_key;
var oRs = Oracle.Execute(sql);
while (!oRs.Eof)
{
discs.push(oRs("ins_discipline_key").Value);
oRs.MoveNext();
}
oRs.Close();
if (S("fg_publiclayers").length)
discs = discs.concat(S("fg_publiclayers"));
if (S("fg_publiclayers").length)
discs = discs.concat(S("fg_publiclayers"));
%>
<html>
<head>
<% FCLTHeader.Generate(); %>
<head>
<% FCLTHeader.Generate(); %>
<script type='text/javascript'>
function init()
{
MMap.Reset();
MMap.SetIMGGenerator("../CAD/mySlnk2IMG.asp");
MMap.SetLabelPosition(<%=S("fg_labelPosition")%>);
MMap.SetPaperColor(<%=S("fg_paperColor")%>);
MMap.SetCustomParameters("&mode=0&scenario_key=0&vKey=<%=pvKey%>"
+ "&discs=<%=discs.join(",")%>"
+ "&srtgs=<%=srtgs.join(",")%>"
+ "&srtds=<%=srtds.join(",")%>"
+"&thema=<%=thema_key%>");
MMap.Refresh(true); // Try to zoom extents
MMap.Reset();
MMap.SetIMGGenerator("../CAD/mySlnk2IMG.asp");
MMap.SetLabelPosition(<%=S("fg_labelPosition")%>);
MMap.SetPaperColor(<%=S("fg_paperColor")%>);
MMap.SetCustomParameters("&mode=0&scenario_key=0"
+ "&stdm_key=<%=stdm_key%>"
+ "&vKey=<%=pvKey%>"
+ "&discs=<%=discs.join(",")%>"
+ "&srtgs=<%=srtgs.join(",")%>"
+ "&srtds=<%=srtds.join(",")%>"
+ "&thema=<%=thema_key%>");
MMap.Refresh(true); // Try to zoom extents
}
var done=false;
function MMap_onClick(SlnkEvent)
{
if (done) return; // Workaround for nasty recursion? We komen hier twee keer?
done=true;
// FcltMgr.alert("Geklikt op X=" + SlnkEvent.dwgX + " Y=" + SlnkEvent.dwgY + " ik denk ruimte " + SlnkEvent.ContourKey)
var res_data = {};
if (SlnkEvent.ContourLayer == "SLNK Contours")
{
res_data = { rui_key: SlnkEvent.Key,
rui_txt: SlnkEvent.DbLabel,
rui_dwgX: SlnkEvent.dwgX,
rui_dwgY: SlnkEvent.dwgY
}
}
else if (SlnkEvent.ContourLayer == "SLNK Symbols")
{
res_data = { ins_key: parseInt(SlnkEvent.ContourKey.substr(2)) // I:20961 parsen
}
}
FcltMgr.closeDetail( window, res_data);
if (done) return; // Workaround for nasty recursion? We komen hier twee keer?
done = true;
// FcltMgr.alert("Geklikt op X=" + SlnkEvent.dwgX + " Y=" + SlnkEvent.dwgY + " ik denk ruimte " + SlnkEvent.ContourKey)
var res_data = {};
if (SlnkEvent.ContourLayer == "SLNK Contours")
{
res_data = { rui_key: SlnkEvent.Key,
rui_txt: SlnkEvent.DbLabel,
rui_dwgX: SlnkEvent.dwgX,
rui_dwgY: SlnkEvent.dwgY
};
}
else if (SlnkEvent.ContourLayer == "SLNK Symbols")
{
res_data = { ins_key: parseInt(SlnkEvent.ContourKey.substr(2)) }; // I:20961 parsen
}
FcltMgr.closeDetail(window, res_data);
}
</script>
</head>
<body class='modal' id='docBody' onLoad='javascript:init();'>
<!-- ==========================
HET plaatje zonder buttons
============================ -->
<iframe id="MMap" name="MMap" src="../SlnkDWF/ToonIMG.asp"
frameborder='0' framespacing='0' scrolling="no"
style="border-width:3;border-style=solid" width="100%" height="100%" valign="center">
</iframe>
<!-- ==========================
HET plaatje zonder buttons
============================ -->
<iframe id="MMap" name="MMap" src="../SlnkDWF/ToonIMG.asp"
frameborder='0' framespacing='0' scrolling="no"
style="border-width:3;border-style=solid" width="100%" height="100%" valign="center">
</iframe>
</body>
</html>
<% ASPPAGE_END(); %>

View File

@@ -251,7 +251,7 @@ else
+ " '("+L("lcl_terra")+")' verd, "
+ " ' ' alg_srtruimte_omschrijving, "
+ " ' ' alg_ruimte_omschrijving, "
+ " 1 alg_verdieping_volgnr "
+ " 1 alg_verdieping_volgnr, "
+ " 3 type"; // Terrein
}
@@ -333,7 +333,7 @@ else
if (loc_key > 0) {
sqln += " AND l.alg_locatie_key = " + loc_key;
}
if (bld_key > 0) {
if (bttype == "G" && bld_key > 0) {
sqln += " AND g.alg_gebouw_key = " + bld_key;
}

View File

@@ -40,6 +40,7 @@ if (pvKey == -1)
var highlight_arr = getQParamIntArray("highlight", []); // Comma-separated room_key_list (terrains). Optional
var ins_key = getQParamInt("ins_key", -1); // highlight
var stdm_key = getQParamInt("stdm_key", -1);
var pDiscs_arr = getQParamIntArray("discs", []);
var pSrtG_arr = getQParamIntArray("srtgs", []);
var pSrtD_arr = getQParamIntArray("srtds", []);
@@ -156,69 +157,87 @@ function myContourProcessor(cHandle)
__Log("DWG Limits: ({0}, {1})-({2}, {3})".format(Math.round(cHandle.DwgLimits.min.DwgX), Math.round(cHandle.DwgLimits.min.DwgY),
Math.round(cHandle.DwgLimits.max.DwgX), Math.round(cHandle.DwgLimits.max.DwgY)));
}
if (inoutMode == MODE_IN)
var rarFilter = {from: "", where: ""};
if (inoutMode == MODE_IN)
{
if (scenario_key == 0)
{
if (scenario_key == 0)
{
dbTable = "alg_ruimte";
dbLabel = "alg_ruimte_nr";
colKey = "alg_ruimte_key";
syncView = S("fg_syncruimteview"); //"ALG_V_AANWEZIGRUIMTE";
syncParent = "alg_verdieping_key";
scenFilter = "";
rarFilter = ( pRuimteFilter > 0 // Verwijderde en vervallen ruimten uitsluiten.
? " AND EXISTS"
+ " (SELECT 1"
+ " FROM res_ruimte x_rr"
+ " , alg_ruimte x_ar"
+ " , res_alg_ruimte x_rar"
+ " WHERE x_rar.alg_ruimte_key = x_ar.alg_ruimte_key"
+ " AND x_rar.res_ruimte_key = x_rr.res_ruimte_key"
+ " AND x_rar.res_alg_ruimte_verwijder IS NULL"
+ " AND x_rr.res_ruimte_verwijder IS NULL"
+ " AND ( x_rr.res_ruimte_startdatum IS NULL"
+ " OR x_rr.res_ruimte_startdatum <= " + datumfilter.toSQL()
+ " )"
+ " AND ( x_rr.res_ruimte_vervaldatum IS NULL"
+ " OR x_rr.res_ruimte_vervaldatum > " + datumfilter.toSQL()
+ " )"
+ " AND x_ar.alg_verdieping_key = " + pvKey
+ " AND x_ar.alg_ruimte_key = ar.alg_ruimte_key"
+ " )"
: ""
);
}
else
{
dbTable = "prj_ruimte";
dbLabel = "prj_ruimte_nr";
colKey = "prj_ruimte_key";
syncView = S("fg_prj_syncruimteview"); //"PRJ_RUIMTE";
syncParent = "alg_verdieping_key";
scenFilter = " AND ar.prj_scenario_key = " + scenario_key; // En in eigen scenario
rarFilter = "";
}
dbTable = "alg_ruimte";
dbLabel = "alg_ruimte_nr";
colKey = "alg_ruimte_key";
syncView = S("fg_syncruimteview"); //"ALG_V_AANWEZIGRUIMTE";
syncParent = "alg_verdieping_key";
scenFilter = "";
rarFilter.from = (stdm_key > 0
? ", alg_srtruimte sr"
: "");
rarFilter.where = (pRuimteFilter > 0 // Verwijderde en vervallen ruimten uitsluiten.
? " AND EXISTS"
+ " (SELECT 1"
+ " FROM res_ruimte x_rr"
+ " , alg_ruimte x_ar"
+ " , res_alg_ruimte x_rar"
+ " WHERE x_rar.alg_ruimte_key = x_ar.alg_ruimte_key"
+ " AND x_rar.res_ruimte_key = x_rr.res_ruimte_key"
+ " AND x_rar.res_alg_ruimte_verwijder IS NULL"
+ " AND x_rr.res_ruimte_verwijder IS NULL"
+ " AND ( x_rr.res_ruimte_startdatum IS NULL"
+ " OR x_rr.res_ruimte_startdatum <= " + datumfilter.toSQL()
+ " )"
+ " AND ( x_rr.res_ruimte_vervaldatum IS NULL"
+ " OR x_rr.res_ruimte_vervaldatum > " + datumfilter.toSQL()
+ " )"
+ " AND x_ar.alg_verdieping_key = " + pvKey
+ " AND x_ar.alg_ruimte_key = ar.alg_ruimte_key"
+ " )"
: "")
+ (stdm_key > 0
? " AND sr.alg_srtruimte_key(+) = ar.alg_srtruimte_key"
+ " AND (EXISTS"
+ " (SELECT '1'"
+ " FROM mld_stdmelding_srtruimte mss"
+ " WHERE mss.alg_srtruimte_key = sr.alg_srtruimte_key"
+ " AND mss.mld_stdmelding_key = " + stdm_key + ")"
+ " OR NOT EXISTS"
+ " (SELECT '1'"
+ " FROM mld_stdmelding_srtruimte mss"
+ " WHERE mss.mld_stdmelding_key = " + stdm_key + "))"
: "");
}
else
{
dbTable = "alg_terreinsector";
dbLabel = "alg_terreinsector_code";
colKey = "alg_terreinsector_key";
syncView = S("fg_syncterreinview");
syncParent = "alg_locatie_key";
scenFilter = "";
rarFilter = "";
dbTable = "prj_ruimte";
dbLabel = "prj_ruimte_nr";
colKey = "prj_ruimte_key";
syncView = S("fg_prj_syncruimteview"); //"PRJ_RUIMTE";
syncParent = "alg_verdieping_key";
scenFilter = " AND ar.prj_scenario_key = " + scenario_key; // En in eigen scenario
}
}
else
{
dbTable = "alg_terreinsector";
dbLabel = "alg_terreinsector_code";
colKey = "alg_terreinsector_key";
syncView = S("fg_syncterreinview");
syncParent = "alg_locatie_key";
scenFilter = "";
}
// Doorloop zo snel mogelijk alle ruimtes van onze verdieping
// en zoek de ruimte_key erbij. Die stoppen we met R:12345 in de contour.key
// zodat alle volg-queries geen syncView meer nodig hebben (die soms duur is)
sql = "SELECT sync.cadlabel, ar." + dbLabel + " dbNummer, sync." + colKey + " colkey"
+ " FROM " + syncView + " sync, " + dbTable + " ar"
+ " WHERE sync." + syncParent + " = " + pvKey
+ " AND ar." + colKey + " = sync." + colKey
+ scenFilter
+ rarFilter;
// Doorloop zo snel mogelijk alle ruimtes van onze verdieping
// en zoek de ruimte_key erbij. Die stoppen we met R:12345 in de contour.key
// zodat alle volg-queries geen syncView meer nodig hebben (die soms duur is)
sql = "SELECT sync.cadlabel"
+ " , ar." + dbLabel + " dbNummer"
+ " , sync." + colKey + " colkey"
+ " FROM " + syncView + " sync"
+ " , " + dbTable + " ar"
+ rarFilter.from
+ " WHERE sync." + syncParent + " = " + pvKey
+ " AND ar." + colKey + " = sync." + colKey
+ scenFilter
+ rarFilter.where;
oRs = Oracle.Execute(sql);
while (!oRs.Eof)
{

View File

@@ -47,7 +47,7 @@ var faclist_mode = getQParamInt("dates", 1);
// &2 = show last modification date too
// En nog wat voor de overige kolommen
var faclist_columns = getQParamInt("columns", 63);
var faclist_columns = getQParamInt("columns", 63);
// see use below for mapping on columns
var urole = "?";
@@ -131,7 +131,7 @@ function fnLike(oRs, processParams)
// Als xmlmode niet "reservering" is, dan is het zetten van het likesybol alleen afhankelijk van isGereed().
// Voor xmlmode "reservering" moet het likesymbol worden gezet als (isGereed || v_like).
var v_like = false;
if (xmlnode == "reservering")
{
// Alleen voor reserveringen extra controle.
@@ -359,6 +359,8 @@ function fnrowClass(oRs)
pkey: pkey
});
user.auth_required_or_abort(sqln);
sqln = "SELECT prs_perslid_key"
+ " , item"
+ " , item_key"
@@ -432,7 +434,7 @@ function fnrowClass(oRs)
if ((faclist_columns & 16) == 16)
rst.addColumn(new Column({caption: L("lcl_myfacilities_enddate"), content: "datum_eind", datatype: "datetime", prettydate: true, nomidnight: true}));
if ((faclist_columns & 32) == 32)
rst.addColumn(new Column({caption: L("lcl_place"), content: "plaats"}));
rst.addColumn(new Column({caption: L("lcl_place"), content: "plaats"}));
if (S("facilities_flike_past") >= 0)
rst.addColumn(new Column({caption: L("lcl_fac_oordeel"), content: fnLike, align: "center", colName: "fnLike"}));

View File

@@ -61,6 +61,32 @@ if (!statLevel) {
oRs.Close();
}
/* Return the onclick attribute for the <a>nchor */
function getClickAttribute(item) {
if (!item || !item.href) {
return "";
}
var newWindow = false;
var result = "";
var url = item.href;
if (url.slice(0, 1) === "*") {
newWindow = true;
url = url.slice(1);
}
var protocol = url.split(":");
var externUrl = protocol.length > 1 && protocol[0].match(/^(http|https|mailto|tel|qr)$/);
if (externUrl || newWindow) {
if (!externUrl)
url = "../../" + url.substr(1);
result = " onclick=\"FcltMgr.stopPropagation(event);FcltMgr.windowopen('" + safe.jsstring(url) + "')\"";
}
else if (url.slice(0, 11) == "javascript:")
result = " onclick=\"FcltMgr.stopPropagation(event);" + safe.htmlattr(url) + "\"";
else
result = " onclick=\"menu(event,'" + safe.jsstring(url) + "', '" + safe.jsstring(item.name || item.label) + "', " + (item.menu_key || -1) + ");\"";
return result;
}
function CreateItems(menuItems, pmode, start_collapsed, max_lines)
{
%><ul id="ul_<%=(menuItems.length ? menuItems[0].menu_key : shared.random(8, "base32"))%>"<%=start_collapsed ? ' style="display:none"':''%>>
@@ -92,25 +118,8 @@ function CreateItems(menuItems, pmode, start_collapsed, max_lines)
+ I("fa-thumbtack")
+ "</span>"
: "");
var action = "";
if (itm.href)
{ // '*' voor een reguliere menuoptie forceert nieuw window
var protocol = itm.href.split(":");
if (protocol.length > 1 && protocol[0].match(/^(http|https|mailto|tel|qr)$/) || itm.href.slice(0,1) == "*")
{
if (itm.href.slice(0,1) == "*")
itm.href = "../../" + itm.href.substr(1);
action = " onclick=\"FcltMgr.stopPropagation(event);FcltMgr.windowopen('" + safe.jsstring(itm.href) + "')\"";
}
else if (itm.href.slice(0,11) == "javascript:")
action = " onclick=\"FcltMgr.stopPropagation(event);" + safe.htmlattr(itm.href) + "\"";
else
action = " onclick=\"menu(event,'" + safe.jsstring(itm.href) + "', '" + safe.jsstring(itm.name) + "', " + (itm.menu_key||-1) + ");\"";
}
else // MGE: komt dit wel voor? Een submenu item zonder href (link) naar een pagina?
action = "";
%>
<li tabindex="0" onkeypress="this.click()" class="mi<%=itm.level>0?" mi"+itm.level:""%>"<%=ttl+infomsg%> <%=j>=max_lines&&max_lines!=menuItems.length-1?"style='display:none'":""%><%= action %><%=(pmode == 3 ? " data-value='" + safe.htmlattr(itm.name) + "'" : "")%>>
<li tabindex="0" onkeypress="this.click()" class="mi<%=itm.level>0?" mi"+itm.level:""%>"<%=ttl+infomsg%> <%=j>=max_lines&&max_lines!=menuItems.length-1?"style='display:none'":""%><%=getClickAttribute(itm)%><%=(pmode == 3 ? " data-value='" + safe.htmlattr(itm.name) + "'" : "")%>>
<%=unpin%><%=showtxt%>
</li>
<%
@@ -187,13 +196,7 @@ function CreateMenuGroep(Koppen, pmode)
{ // Het gaat hier over een image als menu item
var externUrl = (menuKop.href.slice(0,7) == "http://" || menuKop.href.slice(0,8) == "https://" || menuKop.href.slice(0,11) == "javascript:");
var iconImg = menuKop.image.indexOf("fa-") == 0;
%> <li class="mk"<%=ttl%> onClick="<%
if (externUrl) {
Response.Write(safe.htmlattr("FcltMgr.windowopen('" + safe.jsstring(menuKop.href) + "');"));
} else {
Response.Write(safe.htmlattr("FcltMgr.openDetail('" + safe.jsstring(menuKop.href) + "', '" + safe.jsstring(menuKop.label) + "')"));
} %>
">
%> <li class="mk"<%=ttl%><%=getClickAttribute(menuKop)%>>
<span class="micon"><%=SYMBOL(menuKop.image, { "module": "MENU" })%></span>
<% if (iconImg) { %>
<span class="menukop"><%= safe.html(menuKop.label) %></span>
@@ -247,11 +250,7 @@ function generatePortalmenu(koppen, asWidget)
</span>
<% if (hasOneItem)
{ %>
<span class="menuimg<%=(menuKop.Items[0].href ? " withaction" : "")%>"<%=ttl%>
<% if (menuKop.Items[0].href) {
Response.Write(" onclick=\"FcltMgr.stopPropagation(event);" + safe.htmlattr("menu(event,'" + safe.jsstring(menuKop.Items[0].href) + "', '" + safe.jsstring(menuKop.Items[0].name) + "', " + (menuKop.Items[0].menu_key||-1) + ");") + "\"");
} %>
>
<span class="menuimg<%=(menuKop.Items[0].href ? " withaction" : "")%>"<%=ttl%><%=getClickAttribute(menuKop.Items[0])%>>
<%=SYMBOL(menuKop.image, { "module": "MENU", "alt": menuKop.Items[0].label })%>
</span>
<% }
@@ -273,16 +272,8 @@ function generatePortalmenu(koppen, asWidget)
ttl=" title='"+safe.htmlattr(menuKop.info)+"'";
%>
<div class='widget-menu-image'>
<%
if (menuKop.href.slice(0,7) == "http://" || menuKop.href.slice(0,8) == "https://" || menuKop.href.slice(0,11) == "javascript:")
{ %>
<a href="<%=safe.htmlattr(menuKop.href)%>" target="_blank" rel="noopener noreferrer"><%
}
else
{
%> <a onclick='<%=safe.htmlattr("FcltMgr.openDetail('" + safe.jsstring(menuKop.href) + "', '" + safe.jsstring(menuKop.label) + "')")%>'><%
}
%> <%=SYMBOL(menuKop.image, { "module": "MENU" })%>
<a<%=getClickAttribute(menuKop)%>>
<%=SYMBOL(menuKop.image, { "module": "MENU" })%>
</a>
</div>
</div>
@@ -324,11 +315,7 @@ function generatePortalmenuitem(kop)
<span class="menulabel"<%=ttl%>>
<%=safe.html(item.name)%>
</span>
<span class="menuimg<%=(item.href ? " withaction" : "")%>"<%=ttl%>
<% if (item.href) {
Response.Write(" onclick=\"FcltMgr.stopPropagation(event);" + safe.htmlattr("menu(event,'" + safe.jsstring(item.href) + "', '" + safe.jsstring(item.name) + "', " + (item.menu_key||-1) + ");") + "\"");
} %>
>
<span class="menuimg<%=(item.href ? " withaction" : "")%>"<%=ttl%><%=getClickAttribute(item)%>>
<%=SYMBOL(item.img, { "module": "MENU" })%>
</span>
</div>
@@ -934,7 +921,7 @@ function fillMenuArray(mode, params)
}
/* Sorteer op populariteit */
if ((mode == 2 || mode == 3) && statLevel && params.getFavTop > 0) {
if ((groepnr in Groepen) && (mode == 2 || mode == 3) && statLevel && params.getFavTop > 0) {
var groupedKoppen = [];
var j = -1;
for (var i = 0; i < Groepen[groepnr].Koppen.length; i++) { // 1 Array per hoofd-menu-item (mogelijk dus incl. submenu-items)

View File

@@ -43,7 +43,8 @@ var portal = getQParamInt("portal", 1);
var widget = getQParamInt("asWidget", 0) == 1;
var additionalNews = 0;
var canEdit = user.has("WEB_MSGBOF");
var msgfe = user.func_enabled2("MSG");
var canEdit = msgfe.canRead("WEB_MSGBOF");
var allowHtml_date = null;
if (S("fac_html_strictness") == 0) // Deprecated, maar nog wel backwards compatible voor oude berichten
@@ -59,11 +60,11 @@ if (S("fac_html_strictness") == 0) // Deprecated, maar nog wel backwards compat
oRs_v.Close();
}
var portal_or_news = "";
var portal_or_news = " AND BITAND(fac_nieuws_show, 3) <> 0";
if (portal == 1)
portal_or_news = " AND BITAND(fac_nieuws_show, 1) = 1";
portal_or_news = " AND BITAND(fac_nieuws_show, 1) <> 0";
else if (portal == 2)
portal_or_news = " AND BITAND(fac_nieuws_show, 2) = 2";
portal_or_news = " AND BITAND(fac_nieuws_show, 2) <> 0";
// Nieuwsberichten die plaatsgebonden zijn en die niet plaatsgebonden zijn (UNION)
var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor medewerkers met een werkplek binnen het plaatsgebonden bericht
@@ -143,6 +144,7 @@ var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor m
+ portal_or_news
+ (nieuws_key_arr.length ? " AND fac_nieuws_key IN (" + nieuws_key_arr.join(",") + ")" : "")
+ (nieuwsgroep_key > 0 ? " AND n.fac_nieuws_groep_key = "+ nieuwsgroep_key : "")
+ " AND n.fac_nieuws_parentkey IS NULL"
+ " ORDER BY fac_nieuws_van DESC";
%>
@@ -188,7 +190,7 @@ var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor m
else
{
var newurl = "../msg/fac_edit_nieuws.asp?nieuws_key=" + key + "&modal=1";
FcltMgr.openModalDetail(newurl, { titel: L("lcl_change")});
FcltMgr.openModalDetail(newurl, L("lcl_change"), { "callback": function () { FcltMgr.reload(); } });
}
}
<% } %>
@@ -196,6 +198,7 @@ var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor m
$(function()
{
meerminderberichten();
$("img").one("load error", function () { FcltMgr.resized(); });
});
</script>
</head>
@@ -203,6 +206,7 @@ var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor m
<%if(showmore==1) {%>
<h1 class="nieuwstitelbigger"><%=safe.html(L("lcl_mynews"))%></h1>
<%}
%> <div class="nieuwscontainer"><%
var oRs = Oracle.Execute(sqln);
var i = 0;
//S("portalmsgmax") berichten worden eerst getoond, rest van oRs.eof onder meer...
@@ -232,13 +236,14 @@ var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor m
var nieuwsdetails = "<span class='ngrp'>" + safe.html(oRs("fac_nieuws_groep_omschrijving").Value||"")
+ (nieuwsdatum == "" ? "" : "<span class='ndat'> | " + nieuwsdatum + "</span> | ")
+ "<span class='nusr'>" + safe.html(oRs("prs_perslid_naam_friendly").Value)+"</span>";
var nieuwsicon = (oRs("fac_nieuws_image").Value ? "<div class='nieuwsicon'>" + I(oRs("fac_nieuws_image").Value) + "</div>" : "");
%>
<div id="n<%=i%>" class="<%=clss%>">
<div class="nieuwstitel"><%=nieuwstitel%></div>
<div class="nieuwsdetails"><%=nieuwsdetails%></div>
<%=nieuwsicon%>
<div class="nieuwstekst"><%=safe_oms%></div>
<div class="nieuwscontent">
<div class="nieuwsicon"><%=SYMBOL(oRs("fac_nieuws_image").Value, { "module": "NEWS", "key": oRs("fac_nieuws_key").Value })%></div>
<span class="nieuwstekst"><%=safe_oms%></span>
</div>
</div>
<%
i++;
@@ -254,7 +259,7 @@ var sqln = "SELECT DISTINCT" // Plaatsgebonden berichten alleen zichtbaar voor m
buttons.push({ title: L("lcl_gotofullnews"), action: "meerminderberichten()", id: "showmorenews", importance: 1, icon: "fa-angle-double-right" });
CreateButtons(buttons, {});
}
%>
%> </div>
</body>
</html>
<% ASPPAGE_END(); %>

View File

@@ -41,16 +41,6 @@ var cls = getQParam("class", ""); // Voor als je hem in widget versie anders wil
FcltMgr.openDetail(item, titel)
}
$(function()
{
// voegt onClick toe aan portaal iconen
$("div.portalmenukop.withimg").children().not("ul").each(function() {
$(this).on("click", function() {
$(this).siblings("ul").find("li").trigger("click");
});
});
});
</script>
</head>
<body id="portalbody"><%

View File

@@ -5509,7 +5509,7 @@ ins = {checkAutLevel:
}
if (mjbFreezed) // In behandeling (Bevroren).
{
sqlArray.push("idsc_freezedate_max IS NOT NULL AND ins_deelsrtcontrole_status = 2");
sqlArray.push("idsc_freezedate_max IS NOT NULL AND ins_deelsrtcontrole_status IN (2, 3)");
}
if (mjbXcped) // Aangepast.
{

View File

@@ -24,7 +24,7 @@ var FcltMgr = {
var hrefBase = window.location.href.split("#")[0];
// nooit collapsed herladen? maar zet hem wel op 0!
hrefBase = hrefBase.replace(/&collapsed=1/gi, "&collapsed=0");
if (hrefBase.indexOf("no_autoscroll") == -1)
if (typeof mobile === "undefined" && hrefBase.indexOf("no_autoscroll") == -1)
hrefBase = hrefBase + (hrefBase.indexOf("?") > 0 ? "&" : "?") + "no_autoscroll=1";
if (params.appendurl) {
var nm = params.appendurl.split("=")[0];
@@ -1320,7 +1320,7 @@ var FcltMgr = {
}
}
if (parent.FcltMgr) {
parent.FcltMgr.resized(window, params);
parent.FcltMgr.resized(parent, params);
}
}
else if (thiswindow.length === 0) /* Touch */

View File

@@ -660,6 +660,10 @@ var iface =
$iconbtn.closest(".button-icon-wrapper").find("i").replaceWith(I("fa-flag")); // Default FA-icoon
$del_btn.attr("data-delete-url", "");
}
let fnCallback = $val_fld.data("callback");
if (fnCallback && typeof window[fnCallback] === "function") {
window[fnCallback](json);
}
},
preview_image: function _preview_image() {

View File

@@ -197,15 +197,18 @@ function initActions(tableID, hambType)
{
toggleFooter(tableID);
$("#" + tableID)
.off('click')
.on('click', '.multiselect', FcltMgr.stopPropagation)
.on('click', '.multiselect', function() { toggleFooter(tableID) } );
if (hambType == 0) // No hamburger, just mouseOver
{
$("#" + tableID)
.on('click', 'tr', defaultAction)
.off('mouseover mouseout')
.on('mouseover', 'tr', showActions)
.on('mouseout', 'tr', hideActions);
$("#allactions_" + tableID +".allactions")
.off('mouseover mouseout')
.on('mouseover', function (evt) { evt.stopPropagation() } )
.on('mouseout', function (evt) { evt.stopPropagation() } );
}
@@ -215,6 +218,7 @@ function initActions(tableID, hambType)
$(willHide);
$("#" + tableID)
.on('click', 'tr', defaultHamburgerAction)
.off('mouseover')
.on('mouseover', 'tr', hambSetCursor);
if (hambType == 1) // Hamburger onClick
{
@@ -225,6 +229,7 @@ function initActions(tableID, hambType)
else if (hambType == 2) // Hamburger onMouseOver
{
$("#" + tableID)
.off('mouseenter')
.on('mouseenter', '.hamburger', showHamburgerActions)
.on('click', '.hamburger', FcltMgr.stopPropagation);
}

View File

@@ -1035,6 +1035,7 @@ SUBFRAME_START();
if (mld.useAlgScope("D")) {
switch (mld_melding.alg_level) { // Zonder break;
//case 5: I.v.m. ruimtefuncties wordt altijd de ruimte key aan de urlAdd toegevoegd. Deze is nodig om te bepalen of de ruimtefunctie van de ruimte bij de standaard melding is gedefinieerd.
case 5:
case 4: urlAdd.push({urlParam: "flrkey", field: "verdiepingkey", init: mld_melding.flr_key});
case 3: urlAdd.push({urlParam: "bldkey", field: "gebouwkey", init: mld_melding.bld_key});
case 2: urlAdd.push({urlParam: "lockey", field: "locatiekey", init: mld_melding.loc_key});
@@ -1065,8 +1066,7 @@ SUBFRAME_START();
moreinfo: !vakg_readonly && !frontend && (user.checkAutorisation("WEB_FAQUSE", true) || user.checkAutorisation("WEB_FAQFOF", true)) // !readonly && rechten
});
urlAdd.push({urlParam: "perslidKey", field: "person", init: mld_melding.melder_key},
{urlParam: "roomkey", field: "ruimtekey", init: mld_melding.room_key});
urlAdd.push({urlParam: "perslidKey", field: "person", init: mld_melding.melder_key});
if ( (!frontend || (S("mld_selector_mode") != 2)) // Als frontend en setting mld_selector_mode twee is, dan is de discipline niet zichtbaar en moet de stdmelding er niet van afhankelijk zijn.
|| (frontend && S("mld_selector_mode") == 2 && isurl_disc) // Als frontend en setting mld_selector_mode =2 en disc_key via url, dan stdmelding wel afhankelijk van discipline.
)

View File

@@ -959,7 +959,7 @@ if (S("mld_show_order_details"))
$(".clickParent").parent().on("click", function(e) { e.stopPropagation(); $(this).find("> .clickParent").trigger("click"); });
});
<% if (mld_key > 0) {
<% if (mld_key > 0 && mld_melding) {
%>
function add_opdracht(canAccept)
{

View File

@@ -44,7 +44,8 @@ var plaatskey = null;
var autgroep_key = null;
var nieuws_show = 3; // default: Beide (portal en nieuwspagina)
var fac_nieuws_groep_key = null;
var authparams = user.checkAutorisation("WEB_MSGBOF");
var authparamsMSGBOF = user.checkAutorisation("WEB_MSGBOF");
var xfunc = user.func_enabled2("MSG");
var multiSel = true;
var subject;
@@ -79,8 +80,8 @@ if( nieuws_key > 0 ) { // message known, existing, so read or reply
subject = oRsMes("fac_nieuws_titel").value;
image = oRsMes("fac_nieuws_image").value;
sender_name = oRsMes("prs_perslid_naam_full").value;
vandate = new Date(oRsMes("fac_nieuws_van").value);
totdate = new Date(oRsMes("fac_nieuws_tot").value);
vandate = oRsMes("fac_nieuws_van").value != null ? new Date(oRsMes("fac_nieuws_van").value) : null;
totdate = oRsMes("fac_nieuws_tot").value != null ? new Date(oRsMes("fac_nieuws_tot").value) : null;
plaatsniveau = oRsMes("fac_nieuws_onrgoed_niveau").value;
plaatskey = oRsMes("fac_nieuws_onrgoed_key").value;
autgroep_key = oRsMes("fac_groep_key").value;
@@ -103,8 +104,11 @@ if( nieuws_key > 0 ) { // message known, existing, so read or reply
verdieping_key = plaatskey
break
}
autfunction = "WEB_MSGBOF";
authparams = user.checkAutorisation(autfunction);
}
if (nieuws_show & 4) {
var msg_info = msg.func_enabled(nieuws_key);
user.auth_required_or_abort(msg_info.canChangeMsg);
}
var allowHtml = action_datum != null && S("fac_html_strictness") == 0; // Deprecated, maar nog wel backwards compatible voor oude berichten
@@ -139,6 +143,16 @@ if (allowHtml) {
FcltMgr.closeDetail(window, { cancel: true } );
}
function refresh_pvimage(json) {
if (json.delete) {
$("#pvimage").empty();
} else if (json.icon) {
$("#pvimage").html(I(json.icon));
} else if (json.deepUrl) {
$("#pvimage").html("<img src='" + json.deepUrl + "'>");
}
}
function preview()
{
<% if (allowHtml) { %>
@@ -159,16 +173,17 @@ if (allowHtml) {
}
);
<% } %>
$('#pvimage').html("<i class='nieuwsicon fal fa-fw {0}'></i>".format($('#image').val()));
$('#pvtitel').text($('#subject').val());
$('.nieuwsbody').attr('class', 'nieuwsbody'); // reset
$('.nieuwsbody').addClass('newsgrp'+$('#nwsgroup').val());
$('.nieuwsbody').addClass('newsgrp' + $('#nwsgroup').val());
$("#pvgrp").text($('#nwsgroup :selected').text());
}
$(function()
{
$('textarea').resize(function () { FcltMgr.resized(window) } );
$('textarea').autogrow();
$("#pvgrp").text($('#nwsgroup :selected').text());
});
</script>
@@ -189,26 +204,26 @@ SUBFRAME_START();
<%
BLOCK_START("msgMessage", L("lcl_msg_datum"), {icon: "fa-calendar"});
var sql_arr = [];
for (var i=1; i<4; i++)
{
sql_arr.push("SELECT " + i + ", " + safe.quoted_sql(msg.getmsgnieuwsshowtext(i)) + " FROM DUAL");
}
FCLTselector("nieuws_show" , sql_arr.join( " UNION ")
, { label: L("lcl_msg_nieuws_show")
, initKey: nieuws_show
, emptyOption: null
}
);
%> <tr>
<td class="label"><label><%=L("lcl_msg_nieuws_show")%></label></td>
<td><%
for (var i = 1; i <= 4; i = i * 2) {
CHECKBOX("", "nieuws_show_" + i, (nieuws_show & i));
%> <label for="nieuws_show_<%=i%>"><%=msg.getmsgnieuwsshowtext(i)%></label>
<br>
<% } %>
</td>
</tr><%
FCLTcalendar( "datefrom",
{ label : L("lcl_period_from"),
datum: vandate,
initEmpty: true,
volgnr: 1
});
FCLTcalendar( "dateto",
{ label : L("lcl_period_to"),
datum: totdate,
initEmpty: true,
volgnr: 2
});
@@ -228,7 +243,7 @@ SUBFRAME_START();
BLOCK_END();
BLOCK_START("msgAlg", L("lcl_msg_plaats"), {icon: "fa-map-marker-alt"});
FCLTplaatsselector (authparams.ALGreadlevel, { startlevel: 1, eindlevel:4, districtkey: district_key, locatiekey: locatie_key, gebouwkey: gebouw_key, verdiepingkey: verdieping_key});
FCLTplaatsselector (authparamsMSGBOF.ALGreadlevel, { startlevel: 1, eindlevel:4, districtkey: district_key, locatiekey: locatie_key, gebouwkey: gebouw_key, verdiepingkey: verdieping_key});
BLOCK_END();
BLOCK_START("msgMessage", L("lcl_mes_message"), {icon: "fa-envelope", wide: true});
RWFIELDTR("subject", "fld", L("lcl_mes_subject"), subject, {required: true, maxlength: 100});
@@ -243,18 +258,33 @@ SUBFRAME_START();
emptyOption: ""
}
);
ICONPICKERTR("image", L("lcl_image"), image);
RWTEXTAREATR("ta_message", "", L("lcl_mes_message"), mess_dsc, { "bb_codes": !allowHtml, "no_bb_codes": allowHtml, "upload_params": { "module": "MSG", "refkey": nieuws_key }, "placeholder": L("lcl_mes_empty") });
RWSYMBOLTR("image", L("lcl_image"), image, { "module": "NEWS", "key": nieuws_key, "callback": "refresh_pvimage" });
RWTEXTAREATR("ta_message", "fldtxt required", L("lcl_mes_message"), mess_dsc, { "bb_codes": !allowHtml, "no_bb_codes": allowHtml, "upload_params": { "module": "MSG", "refkey": nieuws_key }, "placeholder": L("lcl_mes_empty") });
%>
<tr>
<td class="label"></td>
<td>
<input type='button' class='button' value='<%=L("lcl_msg_preview")%>' onclick="preview()">
<div class='nieuwsbody'>
<div class='nieuwstitel' id='pvtitel'></div>
<div class='nieuwsicon' id='pvimage'></div>
<div class='nieuwstekst' id='pvtekst'></div>
<div>
<input type='button' class='button' value='<%=L("lcl_msg_preview")%>' onclick="preview()">
<div class='nieuwsbody'>
<div class='nieuwscontainer'>
<div class='nieuwstitel' id='pvtitel'>
<%=safe.html(subject)%>
</div>
<div class="nieuwsdetails">
<span class="ngrp" id='pvgrp'></span>
</div>
<div class='nieuwscontent'>
<div class='nieuwsicon' id='pvimage'>
<% if (nieuws_key > 0) {
Response.Write(SYMBOL(image, { "module": "NEWS", "key": nieuws_key }));
} %>
</div>
<span class='nieuwstekst' id='pvtekst'>
<%=safe.fclthtml(mess_dsc, { "file_params": { "module": "MSG", "key": nieuws_key }})%>
</span>
</div>
<div>
<div>
</td>
</tr>

View File

@@ -9,7 +9,6 @@
Context: save bestand van fac_edit_nieuws.asp
Note:
*/ %>
<%
var JSON_Result = true;
@@ -18,9 +17,26 @@ var JSON_Result = true;
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../shared/save2db.inc" -->
<!-- #include file="../Shared/FlexFiles.inc" -->
<!-- #include file="../MSG/msg.inc" -->
<%
protectRequest.validateToken();
var authparams = user.checkAutorisation("WEB_MSGBOF");
var nieuws_key = getQParamInt("nieuws_key", -1);
var nieuws_show = 0;
if (hasFParam("nieuws_show")) { // Vanuit mobile
nieuws_show = getFParamInt("nieuws_show");
} else {
if (hasFParam("has_nieuws_show_1") && getFParam("nieuws_show_1", "off") == "on") { nieuws_show += 1; }
if (hasFParam("has_nieuws_show_2") && getFParam("nieuws_show_2", "off") == "on") { nieuws_show += 2; }
if (hasFParam("has_nieuws_show_4") && getFParam("nieuws_show_4", "off") == "on") { nieuws_show += 4; }
}
var authparams = (nieuws_show & 4)
? user.checkAutorisation("WEB_MSGUSE")
: user.checkAutorisation("WEB_MSGBOF");
if (nieuws_show & 4) {
var msg_info = msg.func_enabled(nieuws_key);
user.auth_required_or_abort(msg_info.canChangeMsg);
}
var district_key = getFParamInt("districtkey", -1);
var location_key = getFParamInt("locatiekey", -1);
@@ -30,31 +46,28 @@ var JSON_Result = true;
var groep_list = getFParamIntArray("msggroup", []);
var nieuws_key = getQParamInt("nieuws_key", -1);
var subject = "" + getFParam("subject");
if (nieuws_show != 4 || !hasFParam("parent_key")) {
var subject = "" + getFParam("subject"); /* Voor de verplichting */
}
var message = "" + getFParam("ta_message");
var vandatum = getFParamDate("datefrom", null); // periode tot
var totdatum = getFParamDate("dateto", null); // Periode van
var onrgoed_niveau_key = " NULL, NULL"; // for ALL users
if (verdieping_key != -1)
onrgoed_niveau_key = "'V', " + verdieping_key;
else if (bld_key != -1)
onrgoed_niveau_key = "'G', " + bld_key;
else if (location_key != -1)
onrgoed_niveau_key = "'L', " + location_key;
else if (district_key != -1)
onrgoed_niveau_key = "'D', " + district_key;
var fields = [ { dbs: "fac_nieuws_titel", typ: "varchar", frm: "subject", len: 100 },
{ dbs: "fac_nieuws_image", typ: "varchar", frm: "image", len: 255 },
{ dbs: "fac_nieuws_groep_key", typ: "key", frm: "nwsgroup"},
{ dbs: "fac_nieuws_omschrijving", typ: "varchar", frm: "ta_message", len: 4000 },
{ dbs: "fac_nieuws_van", typ: "date", frm: "datefrom" },
{ dbs: "fac_nieuws_tot", typ: "date", frm: "dateto" },
{ dbs: "fac_nieuws_show", typ: "number", frm: "nieuws_show" },
{ dbs: "prs_perslid_key", typ: "key", val: user_key }
]
{ dbs: "fac_nieuws_show", typ: "number", val: nieuws_show }
];
if (nieuws_show == 4) {
fields.push({ dbs: "fac_nieuws_parentkey", typ: "key", frm: "parent_key" });
}
if (nieuws_key === -1) {
fields.push({ dbs: "prs_perslid_key", typ: "key", val: user_key });
}
if (verdieping_key != -1) {
niv = 'V';
@@ -98,6 +111,7 @@ var JSON_Result = true;
fields.pop();
}
var nkey = req.sequences["fac_nieuws_key"];
move_new_bb_files("NEWS", nkey, getFParamStringArray("image", []));
move_new_bb_files("MSG", nkey, getFParamStringArray("bb_files", []));
result = {success: true, nieuws_key: nkey, close: false, keepForm: !!warning, warning: warning};
} else {
@@ -110,6 +124,13 @@ var JSON_Result = true;
}
result = {success: true, nieuws_key: nieuws_key, close: false, keepForm: !!warning, warning: warning};
}
if (nieuws_show == 4) { /* TODO, pagina refreshed direct, dus -> tonen op nieuwe pagina */
result.toaster = nieuws_key == -1
? (hasFParam("parent_key")
? "Nieuwe reactie geplaatst"
: "Nieuw bericht geplaatst")
: "Bericht gewijzigd";
}
Response.Write(JSON.stringify(result));
%>

View File

@@ -30,7 +30,14 @@ var dateon = getQParamDate("date_on", null); // Periode van
var searchtext = getQParam("searchtext", null);
var authgroup = getQParamIntArray("msggroup", []);
var categorie = getQParamIntArray("nwsgroup", []);
var nieuwsshow = getQParamInt("nieuws_show", -1);
var nieuwsshow = 0;
if (hasQParam("has_nieuws_show_1") && getQParam("nieuws_show_1", "off") == "on") { nieuwsshow += 1; }
if (hasQParam("has_nieuws_show_2") && getQParam("nieuws_show_2", "off") == "on") { nieuwsshow += 2; }
if (hasQParam("has_nieuws_show_4") && getQParam("nieuws_show_4", "off") == "on") { nieuwsshow += 4; }
var fac_nieuws_parentkey = getQParamInt("fac_nieuws_parentkey", -1);
var tiny = getQParamInt("tiny", 0);
var inline = getQParamInt("inline", 0);
var dist_key = getQParamInt("districtkey", -1); // District
var loc_key = getQParamInt("locatiekey", -1); // Locatie
var bld_key = getQParamInt("gebouwkey", -1); // Gebouw
@@ -45,6 +52,9 @@ msg_list ( autfunction,
authgroup: authgroup,
categorie: categorie,
nieuwsshow: nieuwsshow,
fac_nieuws_parentkey: fac_nieuws_parentkey,
tiny: tiny,
inline: inline,
dateon: dateon,
dist_key: (dist_key != -1? dist_key : null),
loc_key: (loc_key != -1? loc_key : null),

View File

@@ -11,11 +11,12 @@
*/ %>
<!-- #include file="../Shared/resultset_table_v2.inc" -->
<!-- #include file="../msg/msg.inc"-->
<%
FCLTHeader.Requires({ plugins:["jQuery"] })
function fnrowData(oRs)
function fnrowData(oRs)
{
var nieuws_key = oRs("nieuws_key").value;
@@ -24,6 +25,9 @@ FCLTHeader.Requires({ plugins:["jQuery"] })
return JSON.stringify(data);
}
function fnHasReactions(oRs) {
return oRs("nrreplies").Value > 0;
}
function msg_list(pautfunction, params)
{
@@ -40,6 +44,9 @@ function msg_list(pautfunction, params)
var categorie_arr = params.categorie;
var dateon = params.dateon;
var nieuwsshow = params.nieuwsshow;
var fac_nieuws_parentkey = params.fac_nieuws_parentkey;
var tiny = params.tiny;
var inline = params.inline;
var dist_key = params.dist_key;
var loc_key = params.loc_key;
var bld_key = params.bld_key;
@@ -55,8 +62,14 @@ function msg_list(pautfunction, params)
<html>
<head>
<% FCLTHeader.Generate({outputmode:outputmode}) %>
<% if (!params.inline) {
FCLTHeader.Generate({ outputmode: outputmode });
} %>
<script type="text/javascript">
function inlineReactionsUrl(row) {
var fac_nieuws_key = row.getAttribute("ROWKEY");
return "fac_list_nieuws.asp?tiny=1&inline=1&fac_nieuws_parentkey=" + fac_nieuws_key;
}
function msgDelete(rowArray, isMulti)
{
@@ -88,6 +101,7 @@ function msg_list(pautfunction, params)
+ " n.fac_nieuws_key nieuws_key,"
+ " n.fac_nieuws_onrgoed_niveau niveau,"
+ " n.fac_nieuws_omschrijving oms,"
+ " n.fac_nieuws_show,"
+ " scope.descript,"
+ " scope.locatie,"
+ " n.fac_nieuws_van van,"
@@ -97,7 +111,11 @@ function msg_list(pautfunction, params)
+ " n.fac_nieuws_aanmaak aanmaak,"
+ " n.fac_groep_key,"
+ lcl.xsql("f.fac_groep_omschrijving", "f.fac_groep_key") + " fac_groep_naam,"
+ lcl.xsql("fng.fac_nieuws_groep_omschrijving", "fng.fac_nieuws_groep_key") + " fac_nieuwsgroep"
+ lcl.xsql("fng.fac_nieuws_groep_omschrijving", "fng.fac_nieuws_groep_key") + " fac_nieuwsgroep,"
+ " (SELECT COUNT (*)"
+ " FROM fac_nieuws fn"
+ " WHERE fn.fac_nieuws_parentkey = n.fac_nieuws_key"
+ " AND fac_nieuws_omschrijving IS NOT NULL) nrreplies"
+ " FROM fac_nieuws n,"
+ " prs_perslid p,"
+ " fac_nieuws_groep fng,"
@@ -137,7 +155,8 @@ function msg_list(pautfunction, params)
+ " AND n.fac_nieuws_onrgoed_key = SCOPE.thekey(+)"
+ " AND n.fac_nieuws_onrgoed_niveau = SCOPE.thelevel(+)"
+ " AND n.fac_nieuws_groep_key = fng.fac_nieuws_groep_key(+)"
+ " AND n.fac_groep_key = f.fac_groep_key(+)";
+ " AND n.fac_groep_key = f.fac_groep_key(+)"
+ " AND n.fac_nieuws_omschrijving IS NOT NULL"; /* Filter de ##LIKE##'s eruit */
if (verdieping_key)
{
@@ -179,40 +198,66 @@ function msg_list(pautfunction, params)
{
sqln += " AND n.fac_nieuws_groep_key IN (" + categorie_arr.join(",") + ")";
}
if (nieuwsshow > -1)
if (nieuwsshow > 0)
{
sqln += "AND n.fac_nieuws_show = " + nieuwsshow;
sqln += " AND BITAND(n.fac_nieuws_show, " + nieuwsshow + ") <> 0";
}
if (fac_nieuws_parentkey > -1) {
sqln += " AND n.fac_nieuws_parentkey = " + fac_nieuws_parentkey;
} else {
sqln += " AND n.fac_nieuws_parentkey IS NULL";
}
sqln += " ORDER BY n.fac_nieuws_van DESC, n.fac_nieuws_tot DESC";
sqln += " ORDER BY COALESCE(n.fac_nieuws_van, n.fac_nieuws_aanmaak) DESC";
function fnNieuwsShow (oRs)
{
var result = [];
for (var i = 1; i <= 15; i = i * 2) {
if (oRs("fac_nieuws_show").Value & i) {
result.push(msg.getmsgnieuwsshowtext(i));
}
}
return result.join(" | ")
}
buttons = [];
var addurl = "appl/msg/fac_nieuws.asp";
// TODO: check schrijfrechten
buttons.push({ icon: "fa-plus", title: L("lcl_add"), action: "FcltMgr.openDetail('" + addurl + "', '" + safe.jsstring(L("lcl_add")) + "')" });
if (!inline) {
buttons.push({ icon: "fa-plus", title: L("lcl_add"), action: "FcltMgr.openDetail('" + addurl + "', '" + safe.jsstring(L("lcl_add")) + "')" });
}
var rst = new ResultsetTable({sql:sqln,
keyColumn: "nieuws_key",
ID: "fac_list_nieuws",
title: L("lcl_msg_search"),
rowData: fnrowData,
inlineDetails: "inlineReactionsUrl",
hasInlineDetails: fnHasReactions,
inline: inline,
outputmode: outputmode,
showAll: showall,
filterParams: params,
buttons: buttons
});
});
rst.addColumn(new Column({caption: L("lcl_msg_geldig_van"), content: "van"}));
rst.addColumn(new Column({caption: L("lcl_msg_geldig_tot"), content: "tot"}));
rst.addColumn(new Column({caption: L("lcl_msg_titel"), content: "titel", hasActions: true}));
rst.addColumn(new Column({caption: L("fac_nieuws_groep"), content: "fac_nieuwsgroep"}));
rst.addColumn(new Column({caption: L("fac_groep"), content: "fac_groep_naam"}));
rst.addColumn(new Column({caption: L("lcl_location"), content: "locatie"}));
rst.addColumn(new Column({caption: L("lcl_msg_alg_omschr"), content: "descript"}));
if (!tiny) {
rst.addColumn(new Column({caption: L("lcl_msg_nieuws_show"), content: fnNieuwsShow, hasActions: true}));
rst.addColumn(new Column({caption: L("lcl_msg_geldig_van"), content: "van"}));
rst.addColumn(new Column({caption: L("lcl_msg_geldig_tot"), content: "tot"}));
rst.addColumn(new Column({caption: L("lcl_msg_titel"), content: "titel"}));
rst.addColumn(new Column({caption: L("fac_nieuws_groep"), content: "fac_nieuwsgroep"}));
rst.addColumn(new Column({caption: L("fac_groep"), content: "fac_groep_naam"}));
rst.addColumn(new Column({caption: L("lcl_location"), content: "locatie"}));
rst.addColumn(new Column({caption: L("lcl_place"), content: "descript"}));
} else {
rst.addColumn(new Column({caption: L("lcl_msg_reply"), content: "oms", hasActions: true}));
}
rst.addColumn(new Column({caption: L("lcl_user"), content: "naam"}));
rst.addColumn(new Column({caption: L("lcl_msg_nieuws_aanmaak"), content: "aanmaak"}));
rst.addAction({ action: "msgEdit", caption: L("lcl_change"), isDefault: true});
rst.addAction({ action: "msgEdit", caption: L("lcl_change"), enabler: "eEdit", isDefault: true});
rst.addAction({ action: "msgDelete", caption: L("lcl_delete"), multi: true, multiOnce: true});
var cnt = rst.processResultset();

View File

@@ -22,6 +22,7 @@ var verdieping_key = getQParamInt("verdieping_key", -1);
autfunction = "WEB_MSGBOF";
var authparams = user.checkAutorisation(autfunction);
var xfunc = user.func_enabled2("MSG");
%>
<html>
@@ -60,18 +61,16 @@ var authparams = user.checkAutorisation(autfunction);
multi: true
}
);
var sql_arr = [];
for (var i=1; i<4; i++)
{
sql_arr.push("SELECT " + i + ", " + safe.quoted_sql(msg.getmsgnieuwsshowtext(i)) + " FROM DUAL");
}
FCLTselector( "nieuws_show"
, sql_arr.join( " UNION ")
, { label: L("lcl_msg_nieuws_show")
, emptyOption: ""
}
);
%> <tr>
<td class="label"><label><%=L("lcl_msg_nieuws_show")%></label></td>
<td><%
for (var i = 1; i <= (xfunc.canRead("WEB_MSGUSE") ? 4 : 2); i = i * 2) {
CHECKBOX("", "nieuws_show_" + i, (3 & i));
%> <label for="nieuws_show_<%=i%>"><%=msg.getmsgnieuwsshowtext(i)%></label>
<br>
<% } %>
</td>
</tr><%
SEARCH_BLOCK_END();
SEARCH_BLOCK_START();

View File

@@ -62,12 +62,12 @@ var eindLevel;
subject = oRsMes("fac_nieuws_titel").value;
image = oRsMes("fac_nieuws_image").value;
sender_name = oRsMes("prs_perslid_naam_full").value;
vandate = new Date(oRsMes("fac_nieuws_van").value);
totdate = new Date(oRsMes("fac_nieuws_tot").value);
vandate = oRsMes("fac_nieuws_van").value != null ? new Date(oRsMes("fac_nieuws_van").value) : null;
totdate = oRsMes("fac_nieuws_tot").value != null ? new Date(oRsMes("fac_nieuws_tot").value) : null;
plaatsniveau = oRsMes("fac_nieuws_onrgoed_niveau").value;
plaatskey = oRsMes("fac_nieuws_onrgoed_key").value;
autgroep_key = oRsMes("fac_groep_key").value;
nieuws_show = msg.getmsgnieuwsshowtext(oRsMes("fac_nieuws_show").Value);
nieuws_show = oRsMes("fac_nieuws_show").Value;
nieuws_groep = oRsMes("fac_nieuws_groep_omschrijving").value;
switch(plaatsniveau){
@@ -151,19 +151,18 @@ var eindLevel;
IFRAMER_HEADER(L("lcl_mes_message"), buttons);
BLOCK_START("msgDates", L("lcl_msg_datum"), {icon: "fa-calendar"});
ROFIELDTR("fld", L("lcl_msg_nieuws_show"), nieuws_show);
FCLTcalendar( "datefrom",
{ label : L("lcl_period_from"),
datum: vandate,
volgnr: 1,
readonly: true
});
FCLTcalendar( "dateto",
{ label : L("lcl_period_to"),
datum: totdate,
volgnr: 2,
readonly: true
});
%> <tr>
<td class="label "><label><%=L("lcl_msg_nieuws_show")%></label></td>
<td><%
for (var i = 1; i <= 4; i = i * 2) {
CHECKBOX("", "nieuws_show_" + i, (nieuws_show & i), { "readonly": true });
%> <label for="nieuws_show_<%=i%>"><%=msg.getmsgnieuwsshowtext(i)%></label>
<br>
<% } %>
</td>
</tr>
<% ROFIELDTR("datefrom", L("lcl_period_from"), toDateString(vandate, false, false, true), { suppressEmpty: true});
ROFIELDTR("dateto", L("lcl_period_to"), toDateString(totdate, false, false, true), { suppressEmpty: true});
ROFIELDTR("fld", L("lcl_mes_send_date_time"), toDateTimeString(action_datum));
BLOCK_END();
BLOCK_START("msgPrs", L("lcl_msg_groep"), {icon: "fa-users"});
@@ -185,7 +184,7 @@ var eindLevel;
ROFIELDTR("fld", L("lcl_from"), sender_name, {suppressEmpty: true});
ROFIELDTR("fld", L("lcl_mes_subject"), subject);
ROFIELDTR("fld", L("fac_nieuws_groep"), nieuws_groep, {suppressEmpty: true});
ICONPICKERTR("image", L("lcl_image"), image, { "readonly": true });
ROSYMBOLTR("image", L("lcl_image"), image, { "module": "NEWS", "key": nieuws_key });
var allowHtml = S("fac_html_strictness") == 0; // Deprecated, maar nog wel backwards compatible voor oude berichten
if (allowHtml) {
var sql_v = "SELECT adm_tracking_date" // Berichten gemaakt voor deze datum mogen nog html bevatten

View File

@@ -7,22 +7,225 @@
<%
msg = {
getmsgnieuwsshowtext: function(p)
{
var tekst = "??";
var s = parseInt(p, 10);
switch (s)
{
case 1: { tekst = L("lcl_msg_nieuws_portal"); break; }
case 2: { tekst = L("lcl_msg_nieuws_blogpagina"); break; }
case 3: { tekst = L("lcl_msg_nieuws_beide"); break; }
case 4: { tekst = L("lcl_msg_nieuws_sticky"); break; }
}
if (Session("logging")>0)
tekst += " ("+String(p)+")";
return tekst;
}
getmsgnieuwsshowtext: function _getmsgnieuwsshowtext(p) {
var tekst = "??";
var s = parseInt(p, 10);
switch (s)
{
case 1: { tekst = L("lcl_msg_nieuws_portal"); break; }
case 2: { tekst = L("lcl_msg_nieuws_blogpagina"); break; }
case 3: { tekst = L("lcl_msg_nieuws_beide"); break; }
case 4: { tekst = L("lcl_msg_community"); break; }
// FUTURE USE; case n: { tekst = L("lcl_msg_nieuws_sticky"); break;
}
if (Session("logging")>0)
tekst += " ("+String(p)+")";
return tekst;
},
func_enabled: function _func_enabled(msg_key) {
var mresult = user.func_enabled2("MSG");
var result = {
canRead: mresult.canRead("WEB_MSGUSE"),
canChange: mresult.canWrite("WEB_MSGUSE"),
canChangeMsg: mresult.canWrite("WEB_MSGUSE")
}
if (result.canChangeMsg && msg_key > 0 && !mresult.canWrite("WEB_MSGBOF")) { /* Met MSGBOF mag je alles wel */
var sql = "SELECT prs_perslid_key FROM fac_nieuws WHERE fac_nieuws_key = " + msg_key + " AND BITAND(fac_nieuws_show, 4) <> 0";
var oRs = Oracle.Execute(sql);
result.canChangeMsg = !oRs.EoF && oRs("prs_perslid_key").Value == user_key;
oRs.Close();
}
return result;
},
msg_info: function _msg_info(msg_key, params) {
var params = params || {};
var sql = "SELECT fac_nieuws_key,"
+ lcl.xsqla("fac_nieuws_titel", "fac_nieuws_key") + ","
+ " n.fac_nieuws_image,"
+ lcl.xsqla("fac_nieuws_omschrijving", "fac_nieuws_key") + ","
+ " n.fac_nieuws_groep_key,"
+ " ng.fac_nieuws_groep_omschrijving,"
+ " fac_nieuws_aanmaak,"
+ " fac_nieuws_show,"
+ (!("msgType" in params) || params.msgType & 4
? " (SELECT COUNT (*)"
+ " FROM fac_nieuws fn"
+ " WHERE fn.fac_nieuws_parentkey = n.fac_nieuws_key"
+ " AND fac_nieuws_titel = '##LIKE##'"
+ " AND fac_nieuws_omschrijving IS NULL"
+ " AND prs_perslid_key = " + user_key + ") my_like,"
+ " (SELECT COUNT (*)"
+ " FROM fac_nieuws fn"
+ " WHERE fn.fac_nieuws_parentkey = n.fac_nieuws_key"
+ " AND fac_nieuws_titel = '##LIKE##'"
+ " AND fac_nieuws_omschrijving IS NULL) nrlikes,"
+ " (SELECT COUNT (*)"
+ " FROM fac_nieuws fn"
+ " WHERE fn.fac_nieuws_parentkey = n.fac_nieuws_key"
+ " AND fac_nieuws_omschrijving IS NOT NULL"
+ " AND prs_perslid_key = " + user_key + ") my_replies,"
+ " (SELECT COUNT (*)"
+ " FROM fac_nieuws fn"
+ " WHERE fn.fac_nieuws_parentkey = n.fac_nieuws_key"
+ " AND fac_nieuws_omschrijving IS NOT NULL) nrreplies,"
: "")
+ " n.prs_perslid_key"
+ " FROM fac_nieuws n, fac_nieuws_groep ng"
+ " WHERE n.fac_nieuws_groep_key = ng.fac_nieuws_groep_key(+)"
+ " AND (n.fac_nieuws_van IS NULL OR SYSDATE >= n.fac_nieuws_van)"
+ " AND (n.fac_nieuws_tot IS NULL OR SYSDATE <= n.fac_nieuws_tot)" /* t/m */
+ " AND n.fac_nieuws_parentkey IS NULL"
+ ("msgType" in params
? " AND BITAND (fac_nieuws_show, " + params.msgType + ") <> 0"
: "")
+ " AND n.fac_nieuws_key = " + msg_key
+ " ORDER BY COALESCE(n.fac_nieuws_van, n.fac_nieuws_aanmaak) DESC";
var oRs = Oracle.Execute(sql);
if (oRs.Eof) {
shared.record_not_found(L("lcl_message") + " " + msg_key);
}
var result = {
author_key: oRs("prs_perslid_key").Value,
msg_type: oRs("fac_nieuws_show").Value,
category_key: oRs("fac_nieuws_groep_key").Value,
category: oRs("fac_nieuws_groep_omschrijving").Value,
msg_created: new Date(oRs("fac_nieuws_aanmaak").Value),
msg_subject: oRs("fac_nieuws_titel").Value,
msg_image: oRs("fac_nieuws_image").Value,
msg_omschrijving: oRs("fac_nieuws_omschrijving").Value
}
if (!("msgType" in params) || params.msgType & 4) {
result.my_like = oRs("my_like").Value;
result.like_count = oRs("nrlikes").Value;
result.my_reply_count = oRs("my_replies").Value;
result.reply_count = oRs("nrreplies").Value;
}
if (params.withReplies) {
result.replies = [];
var sql_replies = "SELECT fac_nieuws_key,"
+ lcl.xsqla("fac_nieuws_omschrijving", "fac_nieuws_key") + ","
+ " fac_nieuws_aanmaak,"
+ " prs_perslid_key"
+ " FROM fac_nieuws"
+ " WHERE fac_nieuws_parentkey = " + msg_key
+ " AND fac_nieuws_titel IS NULL"
+ " AND fac_nieuws_omschrijving IS NOT NULL"
+ " ORDER BY fac_nieuws_aanmaak DESC";
var oRs_replies = Oracle.Execute(sql_replies);
while (!oRs_replies.EoF) {
result.replies.push({
reply_key: oRs_replies("fac_nieuws_key").Value,
reply_author_key: oRs_replies("prs_perslid_key").Value,
reply_author: (oRs_replies("prs_perslid_key").Value == user_key ? null : prs.prs_perslid(oRs_replies("prs_perslid_key").Value)),
reply_created: new Date(oRs_replies("fac_nieuws_aanmaak").Value),
reply: oRs_replies("fac_nieuws_omschrijving").Value
});
oRs_replies.moveNext();
}
oRs_replies.Close();
}
var props = flexProps("NEWS", oRs("fac_nieuws_key").Value);
if (props.files && props.files.length) {
result.msg_image_src = props.files[0].deepurl;
}
oRs.Close();
return result;
},
print_mobile_msg: function _print_mobile_msg(msg_key, mode, msg_info) {
var doReply = getQParamInt("reply", 0) == 1;
var msg_info = msg_info || msg.msg_info(msg_key, { "withReplies": mode == "show" });
var carddata = { "key": msg_key };
if (msg_info.category_key) {
carddata.category = msg_info.category_key;
}
CARD_START({ "cls": "msg" + (mode == "show" ? "" : " preview"), "data": carddata });
var author = prs.prs_perslid(msg_info.author_key, { withPhoto: true });
%> <div class="msg-card-header">
<span class="msg-info">
<span class="profile-photo" style="background-image: url('<%=safe.htmlattr(author.photopaththumb)%>');"></span>
<h2 class="msg-author"><%=safe.html(author.naam)%></h2>
</span>
<span class="msg-details">
<div class="msg-category"><%=safe.html(msg_info.category)%></div>
<div class="msg-date"><%=toDateTimeString(msg_info.msg_created, false, false, true, false)%></div>
</span>
</div>
<div class="msg-image flex-center">
<% if (msg_key != -1) {
Response.Write(SYMBOL(msg_info.msg_image || msg_info.msg_image_src, { "module": "NEWS", "key": msg_key }));
}
if (mode == "edit" && !(msg_info.msg_image || msg_info.msg_image_src)) { %>
<div class="msg-img-upload flex-center">
<span class="flex-center"><%=I("fa-camera fa-3x")%></span>
</div>
<% } %>
</div>
<div class="card-content<%=(mode == "list" ? " tappable" : "")%>">
<div class="card-title"><%=safe.html(msg_info.msg_subject)%></div>
<div class="card-descr"><%=safe.fclthtml(msg_info.msg_omschrijving, { "file_params": { "module": "MSG", "key": msg_key }})%></div>
</div>
<% if (mode != "edit" && msg_key != -1) { %>
<div class="msg-actions">
<span class="msg-interactions">
<span class="msg-inter-action msg-reaction tappable" data-type="like" data-count="<%=msg_info.like_count%>">
<%=I("fa-xl fa-thumbs-up" + (msg_info.my_like ? " far" : ""))%>
</span>
<% if (mode == "show") {
if (!doReply) { %>
<span class="msg-inter-action msg-reactions tappable">
<%=I("fa-xl fa-reply")%>
</span>
<% }
} else { %>
<span class="msg-inter-action msg-reactions tappable" data-count="<%=msg_info.reply_count%>">
<%=I("fa-xl fa-comment" + (msg_info.my_reply_count > 0 ? " far" : ""))%>
</span>
<% } %>
</span>
<span class="msg-modifications">
<% if (msg_info.author_key === user_key) { %>
<span class="msg-action msg-action-edit tappable">
<%=I("fa-xl fa-fclt-edit")%>
</span>
<span class="msg-action msg-action-delete tappable">
<%=I("fa-xl fa-trash-alt")%>
</span>
<% } %>
</span>
</div>
<% if (msg_info.replies) {
FORM_START("reply-form"); %>
<div class="msg-edit-reply<%=doReply ? "" : " invisible"%>">
<% HIFIELD("nieuws_show", 4);
HIFIELD("parent_key", msg_key); %>
<textarea name="ta_message" class="required" autofocus></textarea>
<a onclick="mobile.button.click(event, this)" mobClick="replySubmit()" class="primary-action-button msg-post-reply-container" data-ajax="false" singlepress="true"><%=I("fa-paper-plane")%></a>
</div>
<% FORM_RVT();
FORM_END(); %>
<div class="msg-replies-container"><%
for (var i = 0; i < msg_info.replies.length; i++) { %>
<span class="msg-reply-container card<%=(msg_info.replies[i].reply_author_key == user_key ? " self" : "")%>" data-key="<%=msg_info.replies[i].reply_key%>">
<span class="reply-header">
<% if (msg_info.replies[i].reply_author_key != user_key) { %>
<span class="reply-author"><%=safe.html(msg_info.replies[i].reply_author.naam)%></span>
<% } %>
<span class="reply-timestamp"><%=toDateTimeString(msg_info.replies[i].reply_created, false, false, true, false)%></span>
</span>
<span class="reply-body">
<%=safe.fclthtml(msg_info.replies[i].reply)%>
</span>
</span>
<% }
%></div>
<% }
}
CARD_END();
return true;
}
}
%>

View File

@@ -1,52 +1,260 @@
<%@language="javascript"%>
<% /*
$Revision$
$Id$
File: pda/bericht.asp
Description: Add/wijzig bericht (Mobile version)
Parameters: msg_key voor bestaand bericht
msg_key=-1 voor nieuwe bericht
*/ %>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="./mobile.inc" -->
<!-- #include file="./iface.inc" -->
<!-- #include file="../Shared/FlexFiles.inc" -->
<!-- #include file="../MSG/msg.inc" -->
<!-- #include file="../PRS/prs.inc" -->
<!-- #include file="../Shared/selector.inc" -->
<%
var bericht_key = getQParamInt("ber_key", -1);
var berichttype = 4; // constante
var msg_key = getQParamInt("msg_key", -1);
var mode = getQParamSafe("mode", (msg_key == -1 ? "edit" : "show"));
var SHOW_TYPE = getQParamInt("show_type", 4); // Constante
var authparams = user.checkAutorisation("WEB_MSGUSE");
var this_msg = msg.func_enabled(msg_key);
user.auth_required_or_abort(mode == "edit" ? this_msg.canChange : this_msg.canRead);
if (msg_key > 0) {
var msg_info = msg.msg_info(msg_key, { "withReplies": mode == "show" });
} else {
var msg_info = {
author_key: user_key,
msg_type: SHOW_TYPE,
category: L("fac_nieuws_groep"),
msg_created: new Date(),
my_like: 0,
like_count: 0,
my_reply_count: 0,
reply_count: 0
}
}
%>
<html>
<head>
<% FCLTMHeader.Generate({}); %>
<script>
<% if (mode == "show") { %>
function viewMsg(e) {
let msg_key = $(this).closest("article").get(0).dataset.key;
let url = "bericht.asp?msg_key=" + msg_key;
for (var i in e.data) {
url += "&" + i + "=" + e.data[i];
}
window.location.href = url;
}
function react() {
react_type = this.dataset.type || "like";
let msg_key = $(this).closest("article").get(0).dataset.key;
let data = {
action: "msg_react",
react_type: react_type,
msg_key: msg_key
};
<% protectRequest.dataToken("data"); %>
$.post("get_mobile_ajax.asp",
data,
reactCallback,
"json");
}
function reactCallback(json) {
if (json.success) {
var $this_reaction = $("article[data-key=" + json.msg_key + "]")
.find(".msg-reaction[data-type=" + json.react_type.toLowerCase() + "]");
$this_reaction.get(0).dataset.count = json.msg_count;
$this_reaction.find("i").toggleClass("fal", !json.state)
.toggleClass("far", json.state);
}
}
function msg_delete() {
let msg_key = $(this).closest("article").get(0).dataset.key;
let data = {
action: "msg_delete",
msg_key: msg_key
};
<% protectRequest.dataToken("data"); %>
FcltMgr.confirm(L("lcl_msg_del_confirm"), () => {
$.post("get_mobile_ajax.asp",
data,
FcltCallbackAndThen(() => { window.location.href = "berichten.asp"; }),
"json");
});
}
function openReplies() {
$(".msg-edit-reply").removeClass("invisible");
$(".msg-edit-reply textarea").focus();
}
async function replySubmit() {
if (!await validateForm("reply-form")) {
return false;
}
$.post("../MSG/fac_edit_nieuws_save.asp",
$("#reply-form").serialize(),
FcltCallbackRefresh,
"json");
}
$(() => {
$(".msg-reaction").on("click", react);
$(".msg-reactions").one("click", openReplies);
$(".msg-action-edit").on("click", { "mode": "edit" }, viewMsg);
$(".msg-action-delete").on("click", msg_delete);
});
<% } else if (mode == "edit") { %>
var untouched = true;
var uploads = [];
function cancel() {
var autoconfirm =
!$("[name=image]").length &&
!$("#subject").val() &&
!$("#ta_message").val();
FcltMgr.confirm(L("lcl_msg_del_concept"), { "autoconfirm": untouched || autoconfirm }, () => {
window.history.back();
})
}
function msgUpload() {
$("#msgimg").trigger("click");
}
function doUpload() {
if (this.value) { /* Niets doen bij 'Annuleren' */
untouched = false;
uploads.push(
new Promise((resolve, reject) => {
$.when(
$.ajax({
url: "<%=protectQS.create("../Shared/UploadForm_save.asp?module=NEWS&key=" + msg_key + "&usenow=1")%>",
type: "POST",
data: new FormData(document.getElementById("msg-form")),
cache: false,
contentType: false,
processData: false,
success: FcltCallbackAndThen(uploadDone)
}).done(resolve)
);
})
);
}
}
function uploadDone(json) {
if (json?.safefilename[0]) {
$("[name=image]").remove();
$("form").append($('<input type="hidden" name="image" value="' + safe.htmlattr(json.safefilename[0]) + '">'));
$(".msg-image > :is(.msg-img-upload, i, img):first-child").replaceWith("<img src='" + json.deepUrl[0] + "'>");
}
}
function onChangeCategorie() {
$(".msg-category").text($("#nwsgroup :selected").text());
}
async function msgSubmit() {
await Promise.all(uploads);
if (!await validateForm("msg-form")) {
return false;
}
$.post("../MSG/fac_edit_nieuws_save.asp?nieuws_key=<%=msg_key%>",
$("#msg-form").serialize(),
FcltCallbackAndThen(msgSubmitCallback),
"json");
}
function msgSubmitCallback() {
window.location.href = "berichten.asp";
}
$(() => {
$(".msg-image.tappable").on("click", msgUpload);
$("#msgimg").on("change", doUpload);
$("#subject").on("input", () => { untouched = false; $(".card-title").html(safe.html($("#subject").val())); });
$("#ta_message").on("input", () => { untouched = false; $(".card-descr").html(safe.html($("#ta_message").val()).replace(/\n/g, "<br>")); });
onChangeCategorie(); /* Alvast invullen */
});
<% } %>
</script>
</head>
<body>
<body class="body-msg">
<%
PAGE_START();
if (mode == "edit" || msg_key == -1) {
HEADER({
title: L("lcl_msg_new"),
useraction: { action: "cancel()", icon: "fa fa-times" }
});
CONTENT_START();
FORM_START("msg-form", { "action": "../MSG/fac_edit_nieuws_save.asp?nieuws_key=" + msg_key, "method": "POST" });
%> <input type="file" name="msgimg" id="msgimg" accept="image/*" data-role="none">
<% HIFIELD("nieuws_show", msg_info.msg_type);
HIFIELD("fac_nieuws_key", msg_key);
if (bericht_key > 0)
{
sql = "SELECT " + lcl.xsqla('fac_nieuws_titel', 'fac_nieuws_key')
+ " ," + lcl.xsqla('fac_nieuws_omschrijving', 'fac_nieuws_key')
+ " , fac_nieuws_image"
+ " , fac_nieuws_van"
+ " , fac_nieuws_aanmaak"
+ " , (SELECT prs_perslid_naam_friendly FROM prs_v_perslid_fullnames pf WHERE pf.prs_perslid_key = n.prs_perslid_key) prs_perslid_naam_friendly"
+ " FROM fac_nieuws n"
+ " WHERE n.fac_nieuws_key = " + bericht_key
+ " AND BITAND(fac_nieuws_show, "+berichttype+") = " + berichttype;
var sql = "SELECT * FROM fac_nieuws_groep";
FCLTselector("nwsgroup",
sql,
{ label: L("fac_nieuws_groep"),
initKey: msg_info.category_key || -1,
onChange: "onChangeCategorie()",
mobile: true
});
%>
<div class="msg-image flex-center tappable">
<% if (msg_key != -1) {
Response.Write(SYMBOL(msg_info.msg_image || msg_info.msg_image_src, { "module": "NEWS", "key": msg_key }));
}
if (mode == "edit" && !(msg_info.msg_image || msg_info.msg_image_src)) { %>
<div class="msg-img-upload flex-center">
<span class="flex-center"><%=I("fa-camera fa-3x")%></span>
</div>
<% } %>
</div>
<%
RWFIELD("subject", L("lcl_mes_subject"), msg_info.msg_subject || "", { "pclass": "required" });
RWFIELD("ta_message", L("lcl_message"), msg_info.msg_omschrijving || "", { "multi": true, "pclass": "required msg-main-body" });
%> <a onclick="mobile.button.click(event, this)" mobClick="msgSubmit()" class="primary-action-button msg-post-msg" data-ajax="false" singlepress="true"><%=I("fa-paper-plane")%></a><%
IFACE.FORM_END();
FORM_END();
CONTENT_END();
} else if (msg_key > 0) {
HEADER({
title: L("lcl_message"),
back: true
});
}
oRs = Oracle.Execute(sql);
var title = oRs("fac_nieuws_titel").value;
var content = oRs("fac_nieuws_omschrijving").value;
var content_date = new Date(oRs("fac_nieuws_aanmaak").value);
var poster = oRs("prs_perslid_naam_friendly").value;
CONTENT_START();
CARDS_WRAPPER_START();
msg.print_mobile_msg(msg_key, mode, msg_info);
CARDS_WRAPPER_END();
CONTENT_END();
oRs.Close();
PAGE_START();
HEADER({title: title, back: true, home: true});
CONTENT_START();
ROFIELD("fld", L("lcl_from"), poster);
ROFIELD("fld", L("lcl_date"), toDateTimeString(content_date));
ROFIELD("fld", L("lcl_message"), content);
CONTENT_END();
FOOTER();
PAGE_END();
PDA_PAGE_END();
}
FOOTER();
PAGE_END();
PDA_PAGE_END();
%>
</body>
</html>

View File

@@ -6,140 +6,127 @@
Peer-to-peer berichten, forum, community, hoe je het noemt
Mensen kunnen een bericht plaatsen, lezen en op reageren.
Status: POC, trial
Context:
Parameters: -
Parameters: -
*/
INTENTIONALLYADDEDTODISABLE
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="./resultset_table.inc" -->
<!-- #include file="../Shared/FlexFiles.inc" -->
<!-- #include file="./mobile.inc" -->
<!-- #include file="./iface.inc" -->
<!-- #include file="../MSG/msg.inc" -->
<!-- #include file="../PRS/prs.inc" -->
<%
var berichttype = 4; // constante voor communitieberichten
var bericht_key = getQParamInt("ber_key", -1); // zo kunnen we ook voor replies gebruiken?
// AUTORISATIECONTROLE OP MSGUSE
var sqln = "SELECT " + lcl.xsqla('fac_nieuws_titel', 'fac_nieuws_key')
+ " ," + lcl.xsqla('fac_nieuws_omschrijving', 'fac_nieuws_key')
+ " , fac_nieuws_key"
+ " , fac_nieuws_image"
+ " , fac_nieuws_van"
+ " , fac_nieuws_aanmaak"
+ " , (SELECT prs_perslid_naam_friendly FROM prs_v_perslid_fullnames pf WHERE pf.prs_perslid_key = n.prs_perslid_key) prs_perslid_naam_friendly"
+ " , (SELECT count(*) FROM fac_nieuws nn WHERE nn.fac_nieuws_parentkey = n.fac_nieuws_key) nrreplies"
+ " FROM fac_nieuws n"
+ " WHERE "
+ (bericht_key > 0
? " n.fac_nieuws_parentkey = " + bericht_key
: " n.fac_nieuws_parentkey IS NULL AND BITAND(fac_nieuws_show, "+berichttype+") = " + berichttype
)
+ " ORDER BY fac_nieuws_aanmaak " + (bericht_key > 0 ? "ASC" :"DESC");
function fnNieuwsOmschrijving (oRs)
{
var safe_oms = safe.fclthtml(oRs("fac_nieuws_omschrijving").value, { "file_params": { "module": "MSG", "key": oRs("fac_nieuws_key").value }});
var safe_poster = I("fa-user") + "&nbsp;" + safe.html(oRs("prs_perslid_naam_friendly").Value);
var safe_datum = I("fa-clock") + "&nbsp;" + safe.html(toDateTimeString(oRs("fac_nieuws_aanmaak").Value));
var returnhtml = "<div class='bericons'><span class='beruser'>" + safe_poster + "</span><span class='berdatum'>" + safe_datum + "</span></div><span class='beroms'>" + safe_oms + "</span>";
return returnhtml;
}
function fnNieuwsTitel (oRs) {
var titel = safe.html(oRs("fac_nieuws_titel").Value || "");
var icon = oRs("fac_nieuws_image").Value;
if (icon && icon.match(/^fa-/)) {
titel = I(icon + " fa-2x") + "<span class='bertitel'>" + titel + "</span>";
}
return titel;
}
function fncolLink(oRs)
{
// verfijnen.
// een rootbericht klikt naar details+replies. Details is niet veel meer dan de totale tekst (nog een keer), misschien een afbeelding.
// afhankelijk van implementatie moet je dat ook met (nog) 0 replies kunnen, of dan is de link specifiek een "addReply"
// Bij reply op reply (als we dat toelaten) zou je wellicht liever openklappen en weer een vervolgpagine.
var url = "";
if (oRs("nrreplies").value > 0 || bericht_key == -1)
url = rooturl + "/appl/pda/berichten.asp?ber_key="+oRs("fac_nieuws_key").value;
return url;
}
var SHOW_TYPE = getQParamInt("show_type", 4); // Constante
var authparams = user.checkAutorisation("WEB_MSGUSE");
%>
<html>
<head>
<% FCLTMHeader.Generate({}); %>
<style>
/* voor het idee, uiteindelijk natuurlijk naar css */
.bertitel {margin-left: 10px; font-size: 1.2em;}
.beroms {white-space: normal; font-size: .8em;}
.beruser, .berdatum {font-size: .6em; opacity: 0.8; margin-right: 10px;}
.bericons {margin-bottom: 6px; }
</style>
<script>
function viewMsg(e) {
let msg_key = $(this).closest("article").get(0).dataset.key;
let url = "bericht.asp?msg_key=" + msg_key;
for (var i in e.data) {
url += "&" + i + "=" + e.data[i];
}
window.location.href = url;
}
function react() {
react_type = this.dataset.type || "like";
let msg_key = $(this).closest("article").get(0).dataset.key;
let data = {
action: "msg_react",
react_type: react_type,
msg_key: msg_key
};
<% protectRequest.dataToken("data"); %>
$.post("get_mobile_ajax.asp",
data,
reactCallback,
"json");
}
function reactCallback(json) {
if (json.success) {
var $this_reaction = $("article[data-key=" + json.msg_key + "]")
.find(".msg-reaction[data-type=" + json.react_type.toLowerCase() + "]");
$this_reaction.get(0).dataset.count = json.msg_count;
$this_reaction.find("i").toggleClass("fal", !json.state)
.toggleClass("far", json.state);
}
}
function msg_delete() {
let msg_key = $(this).closest("article").get(0).dataset.key;
let data = {
action: "msg_delete",
msg_key: msg_key
};
<% protectRequest.dataToken("data"); %>
FcltMgr.confirm(L("lcl_msg_del_confirm"), () => {
$.post("get_mobile_ajax.asp",
data,
FcltCallbackRefresh,
"json");
});
}
/* Laat alleen items uit deze categorie zien, of toggle dat weer uit */
function toggleCategory() {
this.dataset.active = this.dataset.active != "true";
var cat_key = $(this).closest("article").data("category");
if (this.dataset.active == "true") { /* Alleen deze tonen */
$("article[data-category!=" + cat_key + "]").addClass("invisible");
$("article[data-category=" + cat_key + "] .msg-category").attr("data-active", "true");
} else { /* Alles tonen */
$("article").removeClass("invisible")
.find(".msg-category").attr("data-active", "false");
}
}
$(() => {
$(".msg-reaction").on("click", react);
$(".msg-reactions").on("click", { "reply": 1 }, viewMsg);
$(".msg-action-edit").on("click", { "mode": "edit" }, viewMsg);
$(".msg-action-delete").on("click", msg_delete);
$(".card-content, .msg-image").on("click", viewMsg);
$(".msg-category").on("click", toggleCategory);
});
</script>
</head>
<body>
<body class="body-msg">
<%
HEADER({title: L("lcl_msg_community"),
back: (!qrc),
addaction: (rooturl + "/appl/pda/bericht.asp?ber_key=-1")});
CONTENT_START();
if (bericht_key > 0)
{
// een specifiek bericht plus reacties
sql = "SELECT " + lcl.xsqla('fac_nieuws_titel', 'fac_nieuws_key')
+ " ," + lcl.xsqla('fac_nieuws_omschrijving', 'fac_nieuws_key')
+ " , fac_nieuws_image"
+ " , fac_nieuws_van"
+ " , fac_nieuws_aanmaak"
+ " , (SELECT prs_perslid_naam_friendly FROM prs_v_perslid_fullnames pf WHERE pf.prs_perslid_key = n.prs_perslid_key) prs_perslid_naam_friendly"
+ " FROM fac_nieuws n"
+ " WHERE n.fac_nieuws_key = " + bericht_key
+ " AND BITAND(fac_nieuws_show, "+berichttype+") = " + berichttype;
oRs = Oracle.Execute(sql);
var title = oRs("fac_nieuws_titel").value;
var content = oRs("fac_nieuws_omschrijving").value;
var content_date = new Date(oRs("fac_nieuws_aanmaak").value);
var poster = oRs("prs_perslid_naam_friendly").value;
CARDS_WRAPPER_START({ "title": (bericht_key > 0 ? oRs("fac_nieuws_titel").value : "") });
oRs.Close();
//ROFIELD("fld", L("lcl_from"), poster);
//ROFIELD("fld", L("lcl_date"), toDateTimeString(content_date));
//ROFIELD("fld", L("lcl_message"), content);
Response.Write("<div>"+safe.fclthtml(content)+"</div>")
CARD_START({ "title": "lcl_replies", "cls": "nested" });
}
var rst = new ResultsetTable({ ID: "messengertable",
sql: sqln,
layout: (1 ? "card" : "vertical"),
iconColumn: "fac_nieuws_image",
headerColumn: "fac_nieuws_titel",
contentColumn: fnNieuwsOmschrijving,
asideColumn: "nrreplies",
linkColumn: fncolLink,
emptySetString: (bericht_key > 0 ? "<a href='#'>"+L("lcl_msg_firstreply")+"</a>" : "<a href='#'>"+L("lcl_msg_firstpost")+"</a>"), // lcl+todo
noSearch: true,
showAll: true
});
var cnt = rst.processResultset();
if (bericht_key > 0)
{
CARD_END();
CARDS_WRAPPER_END();
}
CONTENT_END();
FOOTER();
HEADER({ title: L("lcl_msg_community_title") });
CONTENT_START();
CARDS_WRAPPER_START();
var sql = "SELECT fac_nieuws_key"
+ " FROM fac_nieuws"
+ " WHERE fac_nieuws_parentkey IS NULL"
+ " AND (fac_nieuws_van IS NULL OR SYSDATE >= fac_nieuws_van)"
+ " AND (fac_nieuws_tot IS NULL OR SYSDATE <= fac_nieuws_tot)" /* t/m */
+ " AND BITAND (fac_nieuws_show, " + SHOW_TYPE + ") <> 0"
+ " AND COALESCE(fac_nieuws_van, fac_nieuws_aanmaak) > TRUNC(SYSDATE - " + S("msg_max_history") + ")"
+ " ORDER BY COALESCE(fac_nieuws_van, fac_nieuws_aanmaak) DESC";
var oRs = Oracle.Execute(sql);
if (oRs.EoF) {
%> <p><%=L("lcl_msg_no_messages")%></p><%
}
while (!oRs.EoF) {
msg.print_mobile_msg(oRs("fac_nieuws_key").Value, "list");
oRs.moveNext();
}
oRs.Close();
CARDS_WRAPPER_END();
%> <a href="<%=rooturl + "/appl/pda/bericht.asp?msg_key=-1"%>" class="primary-action-button link-fixed-bottom-right" data-ajax="false"><%=I("fa-pen-line")%></a><%
CONTENT_END();
FOOTER();
%>
<% PDA_PAGE_END(); %>
</body>

View File

@@ -59,6 +59,11 @@ div.ui-controlgroup {
*, *::before, *::after {
box-sizing: content-box;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
/* Voorzichtig voor bootstrap (op desktop is dit global) */
:is(#page-signature, .container-fluid),
:is(#page-signature, .container-fluid) :is(*, *::before, *::after) {
@@ -202,7 +207,7 @@ div.subheader {
padding: 0.4em;
margin: 0;
background-color: rgba(0, 0, 0, 0.03);
border-left: 0.3em solid var(--notesbackgroundcolor);
border-left: 0.3em var(--fclt-border-style) var(--notesbackgroundcolor);
}
.reply-header-m,
@@ -231,6 +236,7 @@ div.subheader {
-webkit-line-clamp: 1;
max-height: 1.3em; /* Dit is de IE11 fallback, hoogte = 1 line-height */
}
img.bb-image,
img.note-image {
max-height: 800px;
max-width: 100%;
@@ -322,7 +328,7 @@ h3 > .cs1 {
display: inline-flex;
align-items: center;
white-space: normal;
gap: 1em; /* Ruimte voor het icoontje */
gap: var(--fclt-gap-xl); /* Ruimte voor het icoontje */
}
#newstable .portalnewstext { /* Nieuwsbericht */
font-size: smaller;
@@ -485,7 +491,7 @@ div.dbezet .plantime {
}
.modconfirm ~ .modhint {
padding-top: 17px;
border-top: 1px dashed var(--textcolor);
border-top: var(--fclt-border-width) dashed var(--textcolor);
}
/* Dropdown-knop/icoon */
@@ -529,16 +535,17 @@ div.dbezet .plantime {
.pda-action-menu > [class^=pda-button-] {
display: block;
line-height: 2.8em;
padding: 0 0.75em;
padding: 0 var(--fclt-card-padding);
text-align: left;
text-decoration: none;
}
.pda-button-label {
color: var(--textcolor);
font-weight: 400;
}
.active {
.active:not(label) {
background-color: rgba(0, 0, 0, 0.1);
}
@@ -564,12 +571,13 @@ div.dbezet .plantime {
max-height: 200px;
}
.profile-photo {
display: inline-block;
height: 35px;
width: 35px;
border-radius: 50%;
background-position: center;
background-size: cover;
border: 1px solid rgba(255, 255, 255, .33);
border: var(--fclt-border-width) var(--fclt-border-style) rgba(255, 255, 255, .33);
}
.numspinner {
height: 40px;
@@ -613,7 +621,7 @@ div.dbezet .plantime {
}
body.modal .fcltblock {
background-color: transparent;
border:0px;
border: 0;
}
.fcltblock .inside {
padding: 1px 3px 2px 3px;
@@ -631,7 +639,7 @@ body.modal .fcltblock {
background-color: #FFFFFF; /* harde kleur.. */
}
.suggestsr, span.suggestMore {
border-bottom: 1px solid #f3f3f3;
border-bottom: var(--fclt-border-width) var(--fclt-border-style) #f3f3f3;
background-color: #FFFFFF; /* harde kleur.. */
}
.suggestsrs, .suggestsr, .suggestsrt, .suggestsrc {
@@ -645,11 +653,11 @@ body.modal .fcltblock {
}
#mobplan img {
border: 1px solid #333;
border: var(--fclt-border-width) var(--fclt-border-style) #333;
}
img.kenmerk {
border: 1px solid #ccc;
border: var(--fclt-border-width) var(--fclt-border-style) #ccc;
max-height: 180px;
max-width: 180px;
display:block;
@@ -667,7 +675,7 @@ img.kenmerk {
}
.fclthtml table, .fclthtml td, .fclthtml th {
border-collapse: collapse;
border: solid 1px #888;
border: var(--fclt-border-width) var(--fclt-border-style) #888;
}
.fclthtml th {
background-color: #999; /* harde kleur.. */
@@ -804,24 +812,11 @@ span.count-badge:not(:empty) {
font-size: 0.8em;
opacity: 0.8;
}
.page-footer.fake {
opacity: 0;
pointer-events: none;
height: 49px;
}
.page-footer {
position: fixed;
bottom: 0;
width: 100%;
padding: 0;
background-color: white;
border-top: 1px solid var(--fclt-border-color);
border-top: var(--fclt-border);
z-index: 3;
}
.ui-content .page-footer {
margin: 0 -1rem;
}
.page-footer ul {
height: 3em;
display: flex;
@@ -857,7 +852,7 @@ span.count-badge:not(:empty) {
height: 1em;
width: 1em;
padding: 0.2em;
border: 1px solid white;
border: var(--fclt-border-width) var(--fclt-border-style) white;
border-radius: 50%;
display: inline-flex;
justify-content: center;
@@ -878,14 +873,19 @@ textarea {
background-color: var(--inputbackgroundcolor) !important;
}
.ui-input-text,
.ui-select,
.ui-input-search {
background-color: var(--inputbackgroundcolor) !important;
border: 0;
}
.ui-input-text,
.ui-select,
.add_attachment > .ui-btn {
margin: 0.1em 0;
}
.ui-content .ui-select .ui-btn select {
max-width: calc(100% - 8px);
}
.ui-input-text input,
.ui-input-search input {
background-color: transparent !important;
@@ -978,7 +978,7 @@ html head + body .ui-page .ui-btn:is(.ui-btn-icon-left,
.ui-checkbox .ui-btn-icon-left.ui-btn.ui-checkbox-on::after,
.ui-checkbox .ui-btn-icon-left.ui-btn.ui-checkbox-off:after {
background-color: #fff;
border: 1px solid var(--textcolor);
border: var(--fclt-border-width) var(--fclt-border-style) var(--textcolor);
opacity: 1;
}
@@ -1025,7 +1025,7 @@ html body .ui-listview .child > .ui-btn {
background-color: #CBCED2;
}
html body .ui-listview .vervolg > .ui-btn {
border-left: 4px solid #666;
border-left: 4px var(--fclt-border-style) #666;
}
html body .ui-listview .unsolved > .ui-btn {
background-color: #E4E8F8;
@@ -1103,7 +1103,7 @@ html body .ui-group-theme-b a
label.uploadbutton {
font-weight: bold !important;
border: 1px solid #ccc;
border: var(--fclt-border-width) var(--fclt-border-style) #ccc;
display: inline-block;
padding: 1px 10px;
text-align: center;
@@ -1280,7 +1280,7 @@ ul#stdmldtable li h3 {
/* Begin Font awesome icons in jQuery-mobile layout */
.fal, .far, .fas {
text-shadow: none; /* jQuery-mobile gebruikt standaard wat text-shadow, super lelijk bij iconen .. */
text-shadow: none!important; /* jQuery-mobile gebruikt standaard wat text-shadow, super lelijk bij iconen .. */
}
.ui-header .ui-btn-left,
.ui-header .ui-btn-right {
@@ -1412,16 +1412,16 @@ h2.section-title {
:is(.horizontal-card-array, .vertical-card-array) {
display: flex;
flex-wrap: nowrap;
gap: 1em;
gap: var(--fclt-gap-xl);
width: 100%;
overflow-y: hidden;
padding: 1em;
scrollbar-width: none; /* Firefox */
}
.nested :is(.horizontal-card-array, .vertical-card-array) {
overflow-y: scroll;
scrollbar-width: thin; /* Firefox */
/* max-height: calc(100vh - 11.142rem); Unsupported by webview (App) */
/* overflow-y: scroll; Zonder hoogte scrollt dit element niet meer */
padding-top: 0;
margin-top: 0;
}
@@ -1433,11 +1433,11 @@ h2.section-title {
}
/* Alleen horizontaal */
.horizontal-card-array .card {
flex: 0 0 calc(90% - 1.5em - 2px);
max-width: calc(500px - 1.5em - 2px);
flex: 0 0 calc(90% - 2 * var(--fclt-card-padding) - 2 * var(--fclt-border-width));
max-width: calc(500px - 2 * var(--fclt-card-padding) - 2 * var(--fclt-border-width));
}
.horizontal-card-array .card:only-child {
flex-basis: calc(100% - 1.5em - 2px); /* 100% min 2x 0.75em padding min 2x 1px border */
flex-basis: calc(100% - 2 * var(--fclt-card-padding) - 2 * var(--fclt-border-width)); /* 100% min 2x card padding min 2x border-width */
max-width: none;
}
/* section heeft geen padding / border */
@@ -1460,12 +1460,15 @@ h2.section-title {
.vertical-card-array .card.with-icon > :first-child {
margin-bottom: .75rem;
}
.vertical-card-array .card.with-icon > img:first-child {
object-fit: cover;
}
/* CARD */
.card {
display: flex;
background-color: white;
color: var(--textcolor);
padding: 0.75em;
padding: var(--fclt-card-padding);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.05),
-2px 2px 2px rgba(0, 0, 0, .05);
}
@@ -1477,31 +1480,40 @@ h2.section-title {
}
.card.with-icon {
height: 4em;
column-gap: 1em;
flex-direction: row;
column-gap: var(--fclt-gap-xl);
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
}
section .card.with-icon .msg-image {
flex-basis: 100%;
flex-shrink: 0;
}
.horizontal-card-array .card.with-icon {
flex-direction: row;
}
/* :first-child is het icoontje/plaatje */
.icon-color-1 > i:first-child { background-color: var(--fclt-color-hard-1); }
.icon-color-2 > i:first-child { background-color: var(--fclt-color-hard-2); }
.icon-color-3 > i:first-child { background-color: var(--fclt-color-hard-3); }
.icon-color-4 > i:first-child { background-color: var(--fclt-color-hard-4); }
.icon-color-5 > i:first-child { background-color: var(--fclt-color-soft-1); }
.icon-color-6 > i:first-child { background-color: var(--fclt-color-soft-2); }
.icon-color-7 > i:first-child { background-color: var(--fclt-color-soft-3); }
.icon-color-8 > i:first-child { background-color: var(--fclt-color-soft-4); }
.icon-color:nth-child(8n + 1) > i:first-child { background-color: var(--fclt-color-hard-1); }
.icon-color:nth-child(8n + 2) > i:first-child { background-color: var(--fclt-color-hard-2); }
.icon-color:nth-child(8n + 3) > i:first-child { background-color: var(--fclt-color-hard-3); }
.icon-color:nth-child(8n + 4) > i:first-child { background-color: var(--fclt-color-hard-4); }
.icon-color:nth-child(8n + 5) > i:first-child { background-color: var(--fclt-color-soft-1); }
.icon-color:nth-child(8n + 6) > i:first-child { background-color: var(--fclt-color-soft-2); }
.icon-color:nth-child(8n + 7) > i:first-child { background-color: var(--fclt-color-soft-3); }
.icon-color:nth-child(8n + 8) > i:first-child { background-color: var(--fclt-color-soft-4); }
.card.with-icon > :first-child {
.card.with-icon > :not(.msg-image):first-child {
border-radius: inherit;
font-size: 3rem;
height: 4rem;
width: 4rem;
line-height: 4rem;
display: flex;
justify-content: center;
align-items: center;
flex-basis: 4rem;
flex-shrink: 0;
flex-grow: 0;
color: white;
align-self: flex-start;
}
.card.with-icon > :first-child + *, /* .card-content, of .card-title */
.card-content:first-child {
display: flex;
@@ -1509,9 +1521,6 @@ h2.section-title {
justify-content: space-between;
height: 100%;
}
.card.with-icon > :first-child + * {
width: calc(100% - 5em); /* 4em icon + 1em gap */
}
.card-content > .card-title,
.card-content > .card-descr {
display: -webkit-box;
@@ -1567,14 +1576,265 @@ h2.card-title {
}
.faq .card-descr {
background-color: rgba(255, 255, 255, 0.95); /* 95% wit, 5% wat hierboven staat */
padding: calc(1px + 0.75em);
margin: calc(-1px - 0.75em);
padding: calc(var(--fclt-border-width) + var(--fclt-card-padding));
margin: calc(-1 * var(--fclt-border-width) - var(--fclt-card-padding));
margin-top: 0;
border-radius: inherit;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
/* Berichten / Community (MSG) */
.body-msg * {
text-shadow: none;
}
.body-msg div[data-role=header] { /* Neem de notitie-kleuren over */
background-color: var(--notesbackgroundcolor);
color: white;
}
/* MSG commons */
.card.msg {
gap: var(--fclt-gap-lg);
padding: 0 0.5em;
margin: 0 -0.5em;
border: 0;
box-shadow: none;
}
.msg-image {
/* max-height: 25vh; Unsupported by webview (App) */
max-height: 200px;
overflow: hidden;
border-radius: var(--fclt-border-radius-lg);
}
.msg-image i {
font-size: 4em;
}
.msg-image img {
max-width: 100%;
}
.horizontal-card-array .card.with-icon > .msg-image:first-child {
font-size: inherit;
height: 5.5rem;
flex-basis: 5.5rem;
flex-shrink: 0;
flex-grow: 0;
margin-left: calc(-1 * var(--fclt-card-padding));
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.horizontal-card-array img {
object-fit: cover;
max-height: 100%; /* Vierkante container, we verwachten hier landscape plaatjes, dus max-height */
max-width: none; /* en overflow de breedte */
}
.vertical-card-array .card.with-icon > .msg-image {
max-height: 200px;
overflow: hidden;
border-radius: inherit;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
margin: calc(-1 * var(--fclt-card-padding)) calc(-1 * var(--fclt-card-padding)) var(--fclt-card-padding) calc(-1 * var(--fclt-card-padding)); /* Hug the border */
width: calc(100% + 2 * var(--fclt-card-padding));
}
.vertical-card-array .msg-image img {
border-radius: var(--fclt-border-radius-lg);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.primary-action-button { /* Grote ronde knop */
opacity: 0.85;
font-size: 1.5rem;
border-radius: 50%;
background-color: var(--notesbackgroundcolor);
box-shadow: 0 0 0 1px white,
0 0 5px -1px black;
height: 2.25em;
width: 2.25em;
display: flex;
justify-content: center;
align-items: center;
}
.primary-action-button i {
color: #FFFFFF;
}
.link-fixed-bottom-left,
.link-fixed-bottom-right {
position: fixed;
z-index: 1;
bottom: calc(1.5em + 3rem + 1px);
right: 1.5em;
}
.link-fixed-bottom-left {
left: 1.5em;
}
/* Edit-scherm */
.body-msg label:not(.selector) { /* Placeholders zijn voldoende */
display: none;
}
.body-msg article.invisible,
.msg-edit-reply.invisible {
display: none;
}
.msg-main-body { /* Het bericht-textarea */
min-height: 200px;
max-height: 200px;
}
.msg-post-msg {
margin: 0.5em 0.5em 0 auto;
}
#msg-form .msg-image,
#msg-form .msg-image img {
border-radius: 0;
}
.msg-img-upload { /* msg-image placeholder fa-camera */
inset: 0;
color: var(--fclt-border-color);
}
.msg-img-upload span {
aspect-ratio: 1 / 1;
padding: var(--fclt-card-padding);
margin: 1em 0;
color: var(--fclt-border-color);
border: var(--fclt-border);
border-radius: 50%;
}
/* Berichten-lijst */
/* Alle visible opvolgers van andere visible articles krijgen een top-border */
.body-msg article:not(.invisible) ~ article:not(.invisible)::before,
.msg-replies-container:not(:empty)::before,
.msg-edit-reply:not(.invisible)::before {
content: "";
position: absolute;
height: 0;
width: 90%;
border-top: var(--fclt-border);
padding: 0;
margin: 0;
top: calc(var(--fclt-gap-xl) / -2);
left: 50%;
transform: translateX(-50%);
}
/* Show-mode (ook de preview op het edit-scherm) */
.msg-card-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: var(--fclt-gap);
max-width: 100%;
white-space: nowrap;
}
.msg-info { /* (link) wrapper voor profiel & naam */
display: flex;
align-items: center;
gap: var(--fclt-gap);
min-width: 0;
}
.profile-photo {
flex-shrink: 0;
}
.msg-author {
overflow: hidden;
text-overflow: ellipsis;
}
.msg-details { /* (rechter) wrapper voor categorie & datum */
display: flex;
flex-direction: column;
align-items: flex-end;
gap: var(--fclt-gap-sm);
}
.msg-date {
font-size: 0.9em;
color: var(--textcolor);
}
.msg-category {
line-height: 2em;
border-radius: 1em;
padding: 0 0.5em;
background-color: var(--notesbackgroundcolor);
color: #FFFFFF;
}
.msg-category[data-active=true] {
box-shadow: 0 0 4px 2px var(--notesbackgroundcolor);
}
.card.msg .card-descr { /* Volledige bericht */
-webkit-line-clamp: initial;
margin-top: 0.5em;
}
.card.msg.preview .card-descr { /* Bericht in lijst afgekapt op 8 regels */
-webkit-line-clamp: 8;
}
.msg-actions { /* Bericht-acties container */
display: flex;
justify-content: space-between;
}
.msg-actions > * {
display: flex;
align-items: center;
line-height: 2.5em;
gap: var(--fclt-gap-lg);
padding: 0 0.5em;
color: var(--notesbackgroundcolor);
}
.msg-inter-action,
.msg-action { /* Alle interactie- en reactie-knoppen */
display: inline-block;
text-align: center;
min-width: 2.5em;
border-radius: var(--fclt-border-radius-lg);
}
.msg-edit-reply { /* Edit-knop */
position: relative;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: var(--fclt-gap);
}
/* MSG Replies */
.msg-post-reply-container { /* Reply textarea container */
font-size: 1rem;
margin-right: 0.5em;
}
.msg-replies-container { /* Replies container */
position: relative;
display: flex;
flex-direction: column;
gap: var(--fclt-gap);
padding-top: 0.5em;
}
.msg-reply-container { /* Reply container */
width: 85%;
align-self: flex-start;
justify-content: center;
box-shadow: -0.1em 0.2em 0.2em var(--fclt-border-color);
}
.msg-reply-container.self {
align-self: flex-end;
background-color: var(--notesbackgroundcolor);
color: white;
box-shadow: 0.1em 0.2em 0.2em var(--fclt-border-color);
}
[data-count]::after { /* Interactie-counter (likes, replies) */
content: attr(data-count);
}
.reply-header {
display: flex;
justify-content: space-between;
}
.reply-author {
font-weight: 600;
}
.reply-timestamp {
font-size: 0.8em;
}
.reply-header .reply-timestamp:only-child {
margin-left: auto;
}
/*////////////////////////////////////////////////////////
// //
// Zwaar wegende styling //
@@ -1582,7 +1842,7 @@ h2.card-title {
////////////////////////////////////////////////////////*/
.required.required {
border-left: 2px solid var(--requiredbordercolor) !important;
border-left: 2px var(--fclt-border-style) var(--requiredbordercolor) !important;
}
.missing.missing,
.suggest.missing.suggest.missing {

View File

@@ -199,7 +199,8 @@ function fac_list(days_in_the_future)
ID: "fac_list_m",
showAll: true,
noSearch: false,
layout: "card"
layout: "card",
wrapper: { nested: true }
});
var cnt = rst.processResultset();
CARD_END();
@@ -207,7 +208,7 @@ function fac_list(days_in_the_future)
CARDS_WRAPPER_END();
} else if (!specific_day) {
Response.Write(L("lcl_empty_rstable"));
Response.Write("<p>" + L("lcl_empty_rstable") + "</p>");
}
}
%>

View File

@@ -84,7 +84,7 @@ function HEADER(params)
<header class="page-banner" style="background-image: url('<%=safe.htmlattr(bannerUrl)%>')">
<div class="ui-title<%=params.bigtitle ? ' bigtitle' : '' %>"><%=(params.title ? use_title : L("lcl_mobile_title"))%></div>
</header>
<% } %><div data-role="header" data-theme="<%=jQHeaderTheme%>" data-position="fixed">
<% } %><div data-role="header" data-theme="<%=jQHeaderTheme%>" data-position="fixed" data-tap-toggle="false" data-hide-during-focus="false">
<% if (L("lcl_facilitor_header_prefix") != "") { %>
<div class='headerprefix'><%=L("lcl_facilitor_header_prefix") %></div>
<% } %>
@@ -100,7 +100,7 @@ function HEADER(params)
%><a href="<%=rooturl + "/appl/pda/"%>productsearch.asp" data-role="button" data-icon="fa fa-search" data-iconpos="<%=jQButtonIconpos%>" data-direction="reverse" data-ajax='false'><%=L("lcl_search")%></a><%
}
if (params.useraction) {
%><a onclick="<%=params.useraction.action%>" data-role="button" data-icon="<%=params.useraction.icon%>" data-iconpos="<%=jQButtonIconpos%>" data-direction="reverse"><%=params.useraction.label%></a><%
%><a onclick="<%=params.useraction.action%>" data-role="button" data-icon="<%=ICONS.placeholder(params.useraction.icon, true)%>" data-iconpos="<%=jQButtonIconpos%>" data-direction="reverse"><%=params.useraction.label%></a><%
}
%>
</div><!-- ui-btn-left -->
@@ -131,6 +131,9 @@ function HEADER(params)
if (params.delaction) {
%><a href="<%=params.delaction%>" data-role="button" data-icon="fa fa-times" data-iconpos="<%=jQButtonIconpos%>" data-ajax='false'><%=L("lcl_delete")%></a><%
}
if (params.customActionRight) {
%><a onclick="<%=params.customActionRight.action%>" data-role="button" data-icon="<%=ICONS.placeholder(params.customActionRight.icon, true)%>" data-iconpos="<%=jQButtonIconpos%>" data-direction="reverse"><%=params.customActionRight.label%></a><%
}
%>
</div><!-- ui-btn-right -->
<%
@@ -263,26 +266,33 @@ function FOOTER(params)
<script>
$(function() {
$('.pda-button-more').off('click').on('click', function() {
$(this).toggleClass('open');
$(".pda-button-more").off("click").on("click", function() {
$(this).toggleClass("open");
});
$('.pda-action-menu > [class^=pda-button-], .page-footer li > a').off('touchstart').on('touchstart', function() {
$(this).addClass('active');
});
$(".tappable")
.off("touchstart touchend touchcancel")
.on("touchstart", function() {
$(this).addClass("active");
$(document).one("scrollstart", () => {
$(".tappable.active").removeClass("active");
});
}).on("touchend touchcancel", function() {
$(this).removeClass("active");
$(document).off("scrollstart");
});
$('.pda-action-menu > [class^=pda-button-], .page-footer li > a').off('touchend touchcancel').on('touchend touchcancel', function() {
$(this).removeClass('active');
});
});
</script>
<span class="page-footer fake" data-role="footer" data-position="fixed"></span>
<nav class="page-footer">
<nav class="page-footer" data-role="footer" data-position="fixed" data-tap-toggle="false" data-hide-during-focus="false">
<ul>
<li><a href="Facilitor.asp" data-ajax="false"><%=I("fa-home fa-xl")%></a></li>
<li><a href="fac_list.asp" data-ajax="false"><%=I("fa-ballot-check fa-xl")%></a></li>
<li><a href="message_list.asp" data-ajax="false"<%=berichten ? ' data-badge="' + berichten + '"' : ''%>><%=I("fa-bell fa-xl")%></a></li>
<li><a href="Facilitor.asp" class="tappable" data-ajax="false"><%=I("fa-home fa-xl")%></a></li>
<li><a href="fac_list.asp" class="tappable" data-ajax="false"><%=I("fa-ballot-check fa-xl")%></a></li>
<li><a href="message_list.asp" class="tappable" data-ajax="false"<%=berichten ? ' data-badge="' + berichten + '"' : ''%>><%=I("fa-bell fa-xl")%></a></li>
<% if (user.has("WEB_MSGUSE")) { %>
<li><a href="berichten.asp" class="tappable" data-ajax="false"><%=I("fa-circle-y fa-xl")%></a></li>
<% } %>
<li><%
Response.Write(DROPDOWN(hamburger_actions, { "icon": "fa-bars fa-xl" }));
%> </li>
@@ -391,7 +401,10 @@ function BLOCK_END()
/* Een container met daarbinnen CARD's */
function CARDS_WRAPPER_START_HTML(params) {
params = params || "";
var result = "<section>";
var result = "";
if (!params.nested) {
result += "<section>";
}
if (params.title) {
result += "<h2 class='section-title'>" + params.title + "</h2>";
}
@@ -401,19 +414,27 @@ function CARDS_WRAPPER_START_HTML(params) {
result += "<div class='" + (params.layout && params.layout === "horizontal" ? "horizontal" : "vertical") + "-card-array" + (params.cls ? " " + params.cls : "") + "'>";
return result;
}
function CARDS_WRAPPER_END_HTML() {
return "</div></section>";
function CARDS_WRAPPER_END_HTML(params) {
params = params || "";
var result = "</div>";
if (!params.nested) {
result += "</section>";
}
return result;
}
function CARDS_WRAPPER_START(params) {
Response.Write(CARDS_WRAPPER_START_HTML(params));
}
function CARDS_WRAPPER_END() {
Response.Write(CARDS_WRAPPER_END_HTML());
function CARDS_WRAPPER_END(params) {
Response.Write(CARDS_WRAPPER_END_HTML(params));
}
function CARD_START_HTML(params) {
params = params || {};
var result = "<div class='card" + (params.cls ? " " + params.cls : "") + "'";
var result = "<article class='card" + (params.cls ? " " + params.cls : "") + "'";
if ("action" in params) {
result += " onclick='" + params.action + "'";
}
if ("data" in params) {
for (var x in params.data) {
result += " data-" + x + "='" + params.data[x] + "'";
@@ -432,7 +453,7 @@ function CARD_END_HTML(params) {
if (params.moreLink) {
result += "<a class='more-link' href='" + params.moreLink + "' data-ajax='false'>" + L("lcl_rs_truncated") + "</a>";
}
result += "</div>";
result += "</article>";
return result;
}
function CARD_START(params) {
@@ -741,7 +762,7 @@ function FORM_START(pId, params)
var vform = "<form" + ( pId ? " id='" + pId + "'" + (params.name ? "" : " name='" + pId + "'") : "")
+ ( params.name ? " name='" + params.name + "'" : "")
+ ( params.action ? " action='" + safe.htmlattr(params.action) + "'" : "")
+ ( params.method && (params.method=="get" || params.method=="post") ? " method='" + params.method + "'" : "")
+ ( params.method && (inArray(params.method.toUpperCase(), ["GET", "POST"])) ? " method='" + params.method.toUpperCase() + "'" : "")
//onsubmit
//enctype
//target
@@ -780,7 +801,7 @@ function DROPDOWN(actions, params) {
for (x in actions) {
var action = actions[x];
var elem = ("action" in action) ? "div" : "a"
ddMenu += "<" + elem + " class='pda-button-" + safe.htmlattr(action.name) + "'";
ddMenu += "<" + elem + " class='pda-button-" + safe.htmlattr(action.name) + " tappable'";
if ("action" in action) {
ddMenu += " onclick='" + safe.htmlattr(action.action) + "'>"
} else if ("href" in action) {
@@ -927,11 +948,11 @@ function CATLIST_ARTIKEL(p_cat_id, params)
function SYMBOL(name, params) {
params = params || {};
var symbol = name || params.defVal;
if (symbol) {
return symbol.match(/^fa-/) !== null ? I(symbol, params)
: IMG(symbol, params);
if (symbol && symbol.match(/^fa-/) !== null) {
return I(symbol, params);
} else {
return IMG(symbol, params);
}
return "";
}
function IMG(fileName, params) {
@@ -946,7 +967,7 @@ function IMG(fileName, params) {
var fileProps = flexProps(params.module, params.key || null, null, null, flexParams);
if (fileProps.files.length && fso.FileExists(fileProps.AttachPath + fileProps.files[0].name)) {
return "<img loading='lazy' src='" + safe.htmlattr(fileProps.files[0].deepurl) + "' alt='" + safe.htmlattr(params.alt || L("lcl_photos")) + "'>";
} else {
} else if (fileName) {
return "<span title='{0}'>".format(safe.htmlattr(fileName || "")) + I("fa-question") + "</span>";
}
}

View File

@@ -28,6 +28,7 @@ function portalnews(ploc, pgeb, pshowInt, mode, fac_nieuws_key)
+ " )"
+ " OR (fac_groep_key IS NULL)"
+ " )"
+ " AND n.fac_nieuws_parentkey IS NULL"
+ (fac_nieuws_key > 0
? " AND fac_nieuws_key = " + fac_nieuws_key
: " AND BITAND(fac_nieuws_show, "+pshowInt+") = " + pshowInt);
@@ -47,6 +48,7 @@ function portalnews(ploc, pgeb, pshowInt, mode, fac_nieuws_key)
+ " AND n.fac_nieuws_onrgoed_key = " + ploc
+ " AND (n.fac_nieuws_van IS NULL OR SYSDATE >= n.fac_nieuws_van)"
+ " AND (n.fac_nieuws_tot IS NULL OR SYSDATE < n.fac_nieuws_tot + 1)"
+ " AND n.fac_nieuws_parentkey IS NULL"
+ (fac_nieuws_key > 0
? " AND fac_nieuws_key = " + fac_nieuws_key
: " AND BITAND(fac_nieuws_show, "+pshowInt+") = " + pshowInt);
@@ -64,6 +66,7 @@ function portalnews(ploc, pgeb, pshowInt, mode, fac_nieuws_key)
+ " AND n.fac_nieuws_onrgoed_key = " + pgeb
+ " AND (n.fac_nieuws_van IS NULL OR SYSDATE >= n.fac_nieuws_van)"
+ " AND (n.fac_nieuws_tot IS NULL OR SYSDATE < n.fac_nieuws_tot + 1)"
+ " AND n.fac_nieuws_parentkey IS NULL"
+ (fac_nieuws_key > 0
? " AND fac_nieuws_key = " + fac_nieuws_key
: " AND BITAND(fac_nieuws_show, "+pshowInt+") = " + pshowInt);
@@ -71,6 +74,20 @@ function portalnews(ploc, pgeb, pshowInt, mode, fac_nieuws_key)
sqln += " ORDER BY fac_nieuws_van ASC";
}
function fnNieuwIcon (oRs) {
var icon = oRs("fac_nieuws_image").Value;
var result = "";
if (icon && icon.match(/^fa-/)) {
result = I(icon);
} else {
var props = flexProps("NEWS", oRs("fac_nieuws_key").Value);
if (props.files && props.files.length) {
result = "<div class='msg-image flex-center'><img src='" + safe.htmlattr(props.files[0].deepurl) + "'></div>";
}
}
return result;
}
function fnNieuwsOmschrijving (oRs)
{
var allowHtml = S("fac_html_strictness") == 0; // Deprecated, maar nog wel backwards compatible voor oude berichten
@@ -116,7 +133,7 @@ function portalnews(ploc, pgeb, pshowInt, mode, fac_nieuws_key)
headerColumn: fnNieuwsTitel,
ID: "newstable",
layout: "card",
iconColumn: "fac_nieuws_image",
iconColumn: fnNieuwIcon,
contentColumn: fnNieuwsOmschrijving,
linkColumn: fnLinkColumn,
emptySetString: "",

View File

@@ -459,7 +459,7 @@ function showPlan(actueel, rsv)
{
Response.Write("</br>");
}
Response.Write("<div id='mobplan' style='max-width:100%,overflow:scroll;'>");
Response.Write("<div id='mobplan' style='max-width:100%;overflow:scroll;'>");
Response.Write(" <img alt='" + L("lcl_room_cad") + "' width='auto' height='" + (zoom * 100) + "%' src='" + safe.htmlattr(imgurl) + "'>");
Response.Write("</div>");
Response.Write("<script>");
@@ -899,7 +899,7 @@ else
, reqId : user_key
, defaults : rsv.flex_defaults
, rsv_ruimte_key : rsv_ruimte_key
, reado: !this_res.canChange
, reado: rsv_ruimte_key > -1 && !this_res.canChange
, mobile: true
}
);

View File

@@ -211,7 +211,7 @@ function __rsProcessResultset(processParams)
if (this.layout === "card") {
html += CARDS_WRAPPER_START_HTML(this.wrapper)
+ lines.join("")
+ CARDS_WRAPPER_END_HTML();
+ CARDS_WRAPPER_END_HTML(this.wrapper);
} else if (!this.groupColumn) {
var html = "<ul data-role='listview' data-theme='c' data-inset='" + (this.inset? "true" : "false") + "' data-divider-theme='b'" + (this.ID? " id='"+this.ID+"'" : "") + " data-icon='fa fa-angle-right'";
if (!this.noSearch && cnt > filterCutOff) {
@@ -263,8 +263,7 @@ function __rsMakeCard(oRs, cnt) {
} else if (!icon.match(/^</)) { // Zal wel een src van een plaatje zijn dan
icon = '<img loading="lazy" src="' + safe.htmlattr(icon) + '" alt="' + L("lcl_photos") + '">';
}
var rand = ~~(Math.random() * 8) + 1;
cardClass = cardClass + (cardClass ? " " : "") + "with-icon icon-color-" + rand;
cardClass = cardClass + (cardClass ? " " : "") + "with-icon icon-color";
}
}
@@ -295,7 +294,7 @@ function __rsMakeCard(oRs, cnt) {
if (this.linkColumn) {
var lnk = __fnContent(this.linkColumn)(oRs, this.processParams);
if (lnk) {
line += "<a href='" + safe.htmlattr(lnk) + "' class='card-link' data-ajax='false'></a>";
line += "<a href='" + safe.htmlattr(lnk) + "' class='card-link tappable' data-ajax='false'></a>";
}
}

View File

@@ -204,9 +204,10 @@ prs =
}
if (params.withPhoto)
{
result.photomap = prs.photoinfo().photomap;
result.photopath = prs.photoinfo().photopath;
result.photopaththumb = prs.photoinfo().photopaththumb;
var photoinfo = prs.photoinfo();
result.photomap = photoinfo.photomap;
result.photopath = photoinfo.photopath;
result.photopaththumb = photoinfo.photopaththumb;
}
if (params.withProfiel_fordisc>0) // withProfiel_fordisc is een disc_key

View File

@@ -77,14 +77,14 @@
</head>
<body class="modal" id="mod_authQR">
<% MODAL_START();
<% MODAL_START();
MODAL_BLOCK_START();%>
<div id="myQR"><%=L("lcl_qrc_auth_header").format(user.prs_perslid_email(), safe.html(site + bookmark), S("qr_auth_expire"))%></div>
<div id="myQR"><%=L("lcl_qrc_auth_header").format(safe.html(user.prs_perslid_email()), safe.html(site + bookmark), S("qr_auth_expire"))%></div>
<center><img alt="<%=L("lcl_fac_qrcode")%>" class="QRC" src='../shared/qrcode.asp?nocache=1&size=4&text=<%=Server.URLEncode(bookmark + "&no302=1")%>'><br>
</center>
<div id="footer"><%=L("lcl_qrc_auth_footer")%></div>
<% MODAL_BLOCK_END();
<% MODAL_BLOCK_END();
MODAL_END(); %>
</body>
</html>

View File

@@ -68,7 +68,7 @@ var sql = "SELECT rr.res_reservering_key"
+ " , rr.res_rsv_ruimte_van"
+ " , rr.res_rsv_ruimte_volgnr"
+ " , rr.res_status_fo_key"
+ " , rr.res_ruimte_startdatum"
+ " , r.res_ruimte_startdatum"
+ " , r.res_ruimte_vervaldatum"
+ " , r.res_ruimte_extern_id"
+ " FROM res_rsv_ruimte rr"

View File

@@ -186,27 +186,27 @@ function select_and_planbord_options(par, opt)
function res_load_title_rsv(pparams, picons) // static version of the ajax-one
{
var title_rsv = {};
var icons = "";
var safe_icons = "";
if (pparams.flag_status && pparams.flag_status > 0)
icons += "<span title='" + safe.html(L("lcl_res_flag" + pparams.flag_status)) + "' class='resflag" + pparams.flag_status + " ress'>" + I("fa-fclt-flag") + "</span>";
safe_icons += "<span title='" + safe.html(L("lcl_res_flag" + pparams.flag_status)) + "' class='resflag" + pparams.flag_status + " ress'>" + I("fa-fclt-flag") + "</span>";
if (picons)
{
// Indicatie iconen
if (pparams.aantalM && pparams.aantalM > 0) // Res heeft meldingen
icons += I("fa-digging");
safe_icons += I("fa-digging");
if (pparams.aantalD && pparams.aantalD > 0) // Res heeft voorzieningen
icons += I("fa-projector");
safe_icons += I("fa-projector");
if (pparams.aantalA && pparams.aantalA > 0) // Res heeft catering
icons += I("fa-utensils-alt");
safe_icons += I("fa-utensils-alt");
}
if (pparams.dirtlevel && pparams.dirtlevel > 0) // Ongeldig
icons += I("fa-exclamation-triangle");
if (icons)
safe_icons += I("fa-exclamation-triangle");
if (safe_icons)
{
icons = "<div class='ric'>" + icons + "</div>";
title_rsv.icons = "<div class='ric'>" + icons + "</div>";
safe_icons = "<div class='ric'>" + safe_icons + "</div>";
title_rsv.safe_icons = "<div class='ric'>" + safe_icons + "</div>";
}
// Get config(opstelling) based on pparams.res_opstel_key
@@ -228,11 +228,11 @@ function res_load_title_rsv(pparams, picons) // static version of the ajax-one
switch (showTooltip) // Welke gegevens mogen worden getoond.
{
case 0: // geen geheim!
title_rsv.info = [ { tclass: "rdk", tval: safe.html(pparams.fo_status==3?L("lcl_blokkade"):pparams.activiteit) }
title_rsv.info = [ { tclass: "rdk", tval: pparams.fo_status==3?L("lcl_blokkade"):pparams.activiteit }
, { tclass: "time-from-to", tval: toTimeString(new Date(pparams.res_van)) + "-" + toTimeString(new Date(pparams.res_tot)) }
, { tclass: "", tval: ((pparams.dirtlevel & res.dirtlevel.ruimte.notavailable) ? L("lcl_res_dirtyroom_short") : "") }
, { tclass: "rdt", tval: (pparams.intern && pparams.intern.omschrijving ? safe.html(pparams.intern.omschrijving) : "") }
, { tclass: "opst", tval: (opst != "" ? safe.html(opst) : "") }
, { tclass: "rdt", tval: (pparams.intern && pparams.intern.omschrijving ? pparams.intern.omschrijving : "") }
, { tclass: "opst", tval: (opst != "" ? opst : "") }
];
break;
case 1: // geheim voor FE!
@@ -250,7 +250,7 @@ function res_load_title_rsv(pparams, picons) // static version of the ajax-one
title_rsv.info = [ { tclass: "", tval: pparams.extern.res_nr + " " + toTimeString(pparams.res_van)
+ "-" + toTimeString(pparams.res_tot)
+ "\n" + pparams.extern.omschrijving
, turl: safe.htmlattr(pparams.extern.deepurl)
, turl: pparams.extern.deepurl
}
];
break;
@@ -279,7 +279,7 @@ function res_load_title_rsv(pparams, picons) // static version of the ajax-one
}
if (hostname || (false && pparams.contact_key))
{
title_rsv.info.push( { tclass: "rdn", tval: safe.html(hostname + (false && pparams.contact_key ? " (" + contactname + ")" : ""))} );
title_rsv.info.push( { tclass: "rdn", tval: hostname + (false && pparams.contact_key ? " (" + contactname + ")" : "")} );
}
if (pparams.bezoekers && pparams.bezoekers > 1) // 1 bezoeker geloof ik ook wel (vaak concentratieruimte oid)
@@ -289,31 +289,31 @@ function res_load_title_rsv(pparams, picons) // static version of the ajax-one
}
// Maak de inline en tooltip.
var rsv_inline = "";
var rsv_tooltip = "";
var rsv_deepurl = "";
var safe_rsv_inline = "";
var safe_rsv_tooltip = "";
var safe_rsv_deepurl = "";
if (title_rsv && title_rsv.info)
{
for (var i=0; i<title_rsv.info.length; i++)
{
if (title_rsv.info[i].tval != "")
{
rsv_inline += ( title_rsv.info[i].tclass
safe_rsv_inline += ( title_rsv.info[i].tclass
? "<span class='" + title_rsv.info[i].tclass + "'>" + safe.html(title_rsv.info[i].tval) + "</span>"
: safe.html(title_rsv.info[i].tval)
);
rsv_tooltip += (rsv_tooltip != "" ? "\n" : "") + safe.htmlattr(title_rsv.info[i].tval);
rsv_deepurl += (title_rsv.info[i].turl ? title_rsv.info[i].turl : "");
safe_rsv_tooltip += (safe_rsv_tooltip != "" ? "\n" : "") + safe.htmlattr(title_rsv.info[i].tval);
safe_rsv_deepurl += (title_rsv.info[i].turl ? safe.htmlattr(title_rsv.info[i].turl) : "");
}
}
rsv_inline = "<div class='rd'>" + icons + rsv_inline + "</div>"
rsv_tooltip = " title='" + rsv_tooltip + "'" + (rsv_deepurl != "" ? " deepurl='" + rsv_deepurl + "'" : "");
safe_rsv_inline = "<div class='rd'>" + safe_icons + safe_rsv_inline + "</div>"
safe_rsv_tooltip = " title='" + safe_rsv_tooltip + "'" + (safe_rsv_deepurl != "" ? " deepurl='" + safe_rsv_deepurl + "'" : "");
}
var hasTooltip = select_and_planbord_options(pparams, 2);
var noInline = select_and_planbord_options(pparams, 8);
return { inline: (noInline ? "" : rsv_inline)
, tooltip: (hasTooltip ? rsv_tooltip : "")
return { safe_inline: (noInline ? "" : safe_rsv_inline)
, safe_tooltip: (hasTooltip ? safe_rsv_tooltip : "")
};
}
@@ -507,9 +507,9 @@ function make_plan_regel(room, ar, params, nr_days, row, hour_px)
div += ' data-row="' + row + '"';
div += (preclean ? " prc=" + preclean : "");
div += " style='" + tijdbalk.gridtimeposition(startplanblok, endplanblok, gridcolumns) + " grid-row: " + row + " ;'";
div += safetxt.tooltip;
div += safetxt.safe_tooltip;
div += ">";
div += (nr_days < S("res_plantable_condensed_from") ? safetxt.inline : "")
div += (nr_days < S("res_plantable_condensed_from") ? safetxt.safe_inline : "")
+ overflowleft + overflowright + "</div>";
html.push("\n"+div);

View File

@@ -137,7 +137,7 @@ if (!groep || groep == "IMPORT")
var oRs = Oracle.Execute(sql);
while (!oRs.Eof)
{
bijlagen(oRs("fac_functie_code").Value || "WEB_FACTAB", (oRs("fac_import_app_oms").Value || oRs("fac_import_app_code").Value), "IMPORTS", true, oRs("fac_import_app_key").Value);
bijlagen(oRs("fac_functie_code").Value || "WEB_FACTAB", (oRs("fac_import_app_oms").Value || oRs("fac_import_app_code").Value), "IMPORTS", false, oRs("fac_import_app_key").Value);
oRs.MoveNext()
}
oRs.Close()

View File

@@ -646,6 +646,7 @@ MODAL_BLOCK_START("bijlagen", L("lcl_appendixes"), { icon: "fa-paperclip" });
fileName: "<%=safe.jsstring(fileArray.length > 0? fileArray[0].name : "")%>"
<% if (fileArray.length === 1) { %>
, deleteUrl: "<%=protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?DoDelete=" + Server.URLEncode(fileArray[0].name) + transitParam)%>"
, deepUrl: "<%=protectQS.create(rooturl + "/appl/shared/BijlagenStream.asp?module=" + pModule + "&key=" + pKey + "&filename=" + Server.URLEncode(fileArray[0].name))%>"
<% } %>
};
FcltMgr.setCloseParams(window.return_data); // Zelfs als je kruisje gebruikt

View File

@@ -61,12 +61,6 @@ var picsPerLine = getQParamInt("nrOfPict", -1);
%>
<script type="text/javascript">
function ShowPicture(imageName)
{
newWindow = FcltMgr.windowopen(imageName, "newWindow", "resizable=yes, scrollbars=yes");
newWindow.document.close();
}
$(function() {
var pictures = <%=lijst.length%>;
var loaded = 0;

View File

@@ -511,7 +511,10 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
result.regexp = (result.regexp ? result.regexp : kenmerk_geg.kenmerk_regexp);
}
break;
case "MSG":
case "NEWS": // Het plaatje horende bij het nieuwsbericht
result.forcesingle = true; // Verwijder eventuele anderen
result.regexp = S("msg_photo_size");
case "MSG": // BB-plaatjes binnen het nieuwsbericht
result.AttachSubPath = pModule + "/";
result.extFilter = S("imgAllowedExt");
case "ORDN":

View File

@@ -334,31 +334,21 @@ function getFiltClausePersoon(pfiltcode, params)
+ " )";
break;
case 'INSB': // Objectbeheerders, met schrijfrechten op INSMAN of INSUSE - gokje
lfiltClause = " AND ( (1 = "+ S("ins_can_edit_own_objects")+" )"
+ " OR p.prs_perslid_key IN"
+ "( SELECT prs_perslid_key"
+ " FROM fac_v_webgebruiker g"
+ " WHERE g.fac_functie_key IN"
+ "( SELECT fac_functie_key"
+ " FROM fac_functie"
+ " WHERE fac_functie_code IN ('WEB_INSMAN', 'WEB_INSUSE')"
+ ")"
+ " AND g.fac_gebruiker_alg_level_write < 9"
+ " AND g.fac_gebruiker_prs_level_write < 9"
+ ")"
+ " )"
+ " AND (p.prs_perslid_key IN"
+ "( SELECT prs_perslid_key"
+ " FROM fac_v_webgebruiker g"
+ " WHERE g.fac_functie_key IN"
+ "( SELECT fac_functie_key"
+ " FROM fac_functie"
+ " WHERE fac_functie_code IN ('WEB_INSMAN', 'WEB_INSUSE')"
+ ")"
+ " AND g.fac_gebruiker_alg_level_read < 9"
+ " AND g.fac_gebruiker_prs_level_read < 9"
+ ")"
+ " )"
lfiltClause = " AND (p.prs_perslid_key IN"
+ " ( SELECT prs_perslid_key"
+ " FROM fac_v_webgebruiker g"
+ " WHERE g.fac_functie_key IN"
+ " ( SELECT fac_functie_key"
+ " FROM fac_functie"
+ " WHERE fac_functie_code IN ('WEB_INSMAN', 'WEB_INSUSE')"
+ " )"
+ ((S("ins_can_edit_own_objects") == 1) // Dan volstaan leesrechten
? " AND g.fac_gebruiker_alg_level_read < 9"
+ " AND g.fac_gebruiker_prs_level_read < 9"
: " AND g.fac_gebruiker_alg_level_write < 9"
+ " AND g.fac_gebruiker_prs_level_write < 9")
+ " )"
+ " )";
break;
case 'INS': // Bestaande beheerders van bestaande objecten
lfiltClause = " AND p.prs_perslid_key IN (SELECT prs_perslid_key_beh FROM ins_deel WHERE ins_deel_verwijder IS NULL)";

View File

@@ -3,7 +3,7 @@
$Revision$
$Id$
File: upploadform_save.asp
File: UploadForm_save.asp
Description: Opvangscript van uploadform.asp
Parameters:
extfilter extensie filter
@@ -131,6 +131,7 @@ var oorzaak_bekend = false;
var VB_result = VB_getfiles();
var result = { message: VB_result("message") || "",
safefilename: [],
deepUrl: [],
deleteUrl: [],
filesize: [],
digest: []
@@ -198,6 +199,10 @@ var oorzaak_bekend = false;
result.filesize.push(fso.GetFile(attachfile).Size);
var oCrypto = new ActiveXObject("SLNKDWF.Crypto");
result.digest.push(oCrypto.hex_sha1_file(attachfile));
if (getQParamInt("usenow", 0) == 1) {
var deepurl = HTTP.urlzelf() + "/appl/shared/BijlagenStream.asp?module=" + pModule + "&key=" + pKey + "&filename=" + Server.URLencode(savedfilename);
result.deepUrl.push(protectQS.create(deepurl));
}
result.deleteUrl.push(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?DoDelete=" + Server.URLEncode(savedfilename) + deleteTransit));
var linkedFilename = savedfilename;
if (pModule.indexOf("FGII") === 0) {
@@ -231,6 +236,7 @@ var oorzaak_bekend = false;
case "RESPHD":
case "INSPHD":
case "SML":
case "NEWS":
// Eerst Resize/crop
var resize_params = { resizecode: clientresize?null:params.regexp // Als clientresize dan alleen nog voor thumb
, attachpath: params.AttachPath
@@ -247,6 +253,17 @@ var oorzaak_bekend = false;
{
__Log("filesize: " + result.filesize[i] + " --> " + resize_result.newsize);
result.filesize[i] = resize_result.newsize;
if (pModule === "NEWS") { /* Vervang het origineel door de resized */
if (fso.fileExists(resize_result.file_resized)) {
try {
CreateFullPath(params.AttachPath);
fso.CopyFile(resize_result.file_resized, params.AttachPath + savedfilename, true); /* Kopieren, want daarmee kunnen we overschrijven */
fso.DeleteFile(resize_result.file_resized); /* En verwijder de eerste */
} catch(e) {
__DoLog("Replace original by resized file failed: " + e.description);
}
}
}
}
break;
case "FGII":
@@ -300,7 +317,7 @@ var oorzaak_bekend = false;
if (vFileName != result.safefilename[0])
{
__Log("Autodelete: " + params.AttachPath + vFileName)
DeleteFile(params.AttachPath + vFileName);
DeleteFile(params.AttachPath + vFileName, params);
}
}
}

View File

@@ -2405,13 +2405,25 @@ div.wbackground {
border: 0px solid #ccc;
color: var(--newscolor);
}
.nieuwscontainer {
display: flex;
flex-direction: column;
}
.nieuwscontent {
margin: 0 10px;
}
.nieuwsicon {
color: var(--newscolor);
font-size: 2rem;
display: inline;
float: left;
margin: 0 10px;
text-shadow: 1px 1px 1px #333;
}
.nieuwsicon img {
object-fit: cover;
max-height: 200px;
border-radius: var(--fclt-border-radius);
}
.nieuwsicon :is(i, img) {
margin: 0 10px 10px 0;
}
.nieuwstitel {
font-weight: bold;
@@ -2727,14 +2739,14 @@ input[type=button][disabled] {
.blockbuttoncontainer #buttons ul li,
.blockbuttoncontainer #buttons ul li span {
transition: background-color 0.2s;
transition: background-color 0.2s, color 0.2s;
display: inline;
vertical-align: baseline;
}
/* is ook maar een button */
:is(.modal, .subframe) .blockbuttoncontainer #buttons ul li {
:is(.modal, .subframe) .blockbuttoncontainer #buttons ul li:is(*, :hover) {
box-shadow: 1.5px 1.5px 3px #ccc;
font-size: 0.9em;
padding: 0.3em 1em 0.5em;
@@ -6380,6 +6392,7 @@ img.note-image {
section.fullscreen {
position: absolute;
inset: 0;
padding: 1em;
display: flex;
align-items: center;
justify-content: center;

View File

@@ -60,7 +60,7 @@ settings =
&& typeof Application("SET_TM_" + customerId) != "undefined" // We hebben ooit gecached
&& typeof Application("DEFAULTS_DB_SCHEMA") != "undefined" // Er is bij een voorgaande cache het DB schema nummer opgeslagen
&& typeof Application("SET_" + customerId + "_DB_SCHEMA") != "undefined" // We hebben bij een voorgaande cache ons eigen schemanummer opgeslagen
&& parseInt(Application("SET_" + customerId + "_DB_SCHEMA"), 10) >= parseInt(Application("DEFAULTS_DB_SCHEMA"), 10)) // Ons schemanummer is niet nieuwer dan die van de opgeslagen defaults
&& parseInt(Application("SET_" + customerId + "_DB_SCHEMA"), 10) <= parseInt(Application("DEFAULTS_DB_SCHEMA"), 10)) // Ons schemanummer is niet nieuwer dan die van de opgeslagen defaults
{
if (typeof CACHE_checkfreshness == "undefined")
return; // we hebben ze al gecached en we gaan geen freshness controleren

View File

@@ -367,7 +367,7 @@ function SEARCH_PAGE_START_HTML(params)
var lheader = params.header || L("lcl_filterblok"); // default L("lcl_filterblok") zijn, want dat is-ie 100%?
var safe_header = (params.ishtmlsafe ? lheader : safe.html(lheader));
var icon = params.icon || "fa-ballot-check";
var icon = params.icon || "fa-ballot-check";
if (params.header)
{
@@ -1015,7 +1015,7 @@ function BB_ATTACHMENTS_HTML(pmodule, pkey, prefix, mode) {
case "docx": result += I("fa-file-word"); break;
case "csv": result += I("fa-file-csv"); break;
case "xsl":
case "xslx": result += I("fa-file-spreadsheet"); break;
case "xlsx": result += I("fa-file-spreadsheet"); break;
case "eml":
case "msg": result += I("fa-envelope"); break;
case "zip":
@@ -1150,7 +1150,6 @@ function FILEPICKER_HTML(pname, plabel, pvalue, params) {
+ " data-new='" + (params.key > 0 ? 0 : 1) + "'"
+ " data-module='" + params.module + "'"
+ (params.reloadOnCallback ? " data-reload-on-callback='1'" : "")
+ (params.callback ? " data-callback='" + params.callback + "'" : "")
+ " data-upload-url='" + protectQS.create("../shared/BijlagenForm.asp?key=" + (params.key || -1) + "&module=" + params.module) + "'>"
+ "</span>";
return result;
@@ -1167,12 +1166,12 @@ function ICONPICKERTR_HTML(pname, plabel, pvalue, params) {
+ " </td>";
} else {
result += " <td class='iconpicker'>"
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'>"
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'" + (params.callback ? " data-callback='" + params.callback + "'" : "") + ">"
+ ICONPICKER_HTML(pname, plabel, pvalue)
+ " <span class='default-clickable-icon symbol-delete' aria-controls='" + pname + "' title='" + L("lcl_delete") + "'>"
+ I("fa-trash-alt")
+ " </span>"
+ " </td>"
+ " </td>";
}
result += "</tr>";
return result;
@@ -1221,7 +1220,7 @@ function FILEPICKERTR_HTML(pname, plabel, pvalue, params) {
+ " <label>" + safe.html(plabel) + "</label>"
+ " </td>"
+ " <td class='filepicker'>"
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'>"
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'" + (params.callback ? " data-callback='" + params.callback + "'" : "") + ">"
+ FILEPICKER_HTML(pname, plabel, pvalue, params)
+ " <span class='default-clickable-icon symbol-delete' aria-controls='" + pname + "' title='" + L("lcl_delete") + "'"
+ (fileProps.linkImmediate || !(fileProps.multi && fileProps.pickfile) // Bij multi = true && pickfile = true wordt er met deze knop niets gedelete
@@ -1274,11 +1273,11 @@ function RWSYMBOLTR_HTML(pname, plabel, pvalue, params)
+ " <label>" + safe.html(plabel) + "</label>"
+ " </td>"
+ " <td data-type='" + valType + "'>"
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'>"
+ " <input type='hidden' id='" + pname + "' name='" + pname + "' value='" + safe.htmlattr(pvalue) + "'" + (params.callback ? " data-callback='" + params.callback + "'" : "") + ">"
+ ICONPICKER_HTML(pname, plabel, pvalue)
+ FILEPICKER_HTML(pname, plabel, pvalue, params)
+ " <span class='default-clickable-icon symbol-delete' aria-controls='" + pname + "' title='" + L("lcl_delete") + "'"
+ (valType == 2 ? " data-delete-url='" + safe.htmlattr(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?key=" + (params.key || -1) + "&module=" + params.module)) + "'"
+ (valType == 2 ? " data-delete-url='" + safe.htmlattr(protectQS.create(rooturl + "/appl/Shared/Bijlagenform_delete.asp?DoDelete=" + Server.URLEncode(pvalue) + "&key=" + (params.key || -1) + "&module=" + params.module)) + "'"
: "")
+ ">"
+ I("fa-trash-alt")
@@ -1417,11 +1416,11 @@ IFACE =
function SYMBOL(name, params) {
params = params || {};
var symbol = name || params.defVal;
if (symbol) {
return symbol.match(/^fa-/) !== null ? I(symbol, params)
: IMG(symbol, params);
if (symbol && symbol.match(/^fa-/) !== null) {
return I(symbol, params);
} else {
return IMG(symbol, params);
}
return "";
}
function IMG(fileName, params) {
@@ -1436,7 +1435,7 @@ function IMG(fileName, params) {
var fileProps = flexProps(params.module, params.key || null, null, null, flexParams);
if (fileProps.files.length && fso.FileExists(fileProps.AttachPath + fileProps.files[0].name)) {
return "<img loading='lazy' src='" + safe.htmlattr(fileProps.files[0].deepurl) + "' alt='" + safe.htmlattr(params.alt || L("lcl_photos")) + "'>";
} else {
} else if (fileName) {
return "<span title='{0}'>".format(safe.htmlattr(fileName || "")) + I("fa-question") + "</span>";
}
}

View File

@@ -267,16 +267,16 @@ function FCLTplaatsselector(alglevel, params)
oRs.close();
} // topkey > 0
function _getUrlAdd(slevel)
function _getUrlAddParams(slevel)
{
var urlAddArr = [];
for (var xx in params.urlAdd)
{
urlAddArr.push(' {urlParam: "'+params.urlAdd[xx].urlParam
+(params.urlAdd[xx].val?'", val: "'+(params.urlAdd[xx].val):"")
+(params.urlAdd[xx].field?'", field: "'+(params.urlAdd[xx].field):"")
+(params.urlAdd[xx].jqfield?'", jqfield: "'+params.urlAdd[xx].jqfield:"")
+'"}');
urlAddArr.push(' {urlParam: "'+params.urlAdd[xx].urlParam
+(params.urlAdd[xx].val?'", val: "'+(params.urlAdd[xx].val):"")
+(params.urlAdd[xx].field?'", field: "'+(params.urlAdd[xx].field):"")
+(params.urlAdd[xx].jqfield?'", jqfield: "'+params.urlAdd[xx].jqfield:"")
+'"}');
}
if (params.startlevel < slevel)
{
@@ -288,9 +288,18 @@ function FCLTplaatsselector(alglevel, params)
if (params.startlevel < 6 && 6 <= slevel) urlAddArr.push(' {urlParam: "ruikey", field: "ruimtekey' + (idadd) + '"}');
}
if (urlAddArr.length)
return 'urlAdd: [' + urlAddArr.join(",") + '],'
return urlAddArr;
else
return "";
return "";
}
function _getUrlAdd(slevel)
{
var urlAddArr = _getUrlAddParams(slevel);
if (urlAddArr.length)
return "urlAdd: [" + urlAddArr.join(",") + "],";
else
return "";
}
function _regiofield(pkey, plevel, params)
@@ -808,7 +817,32 @@ function FCLTplaatsselector(alglevel, params)
if (vkey == -1)
return;
var urlAddParams = ""; // Url parameter aan link toevoegen
var urlAdd = [<%= _getUrlAddParams(5) %>];
if (urlAdd)
for (var i = 0; i < urlAdd.length; i++)
{
urlAddParams += "&" + urlAdd[i].urlParam + "=";
var theVal = urlAdd[i].val;
if (typeof theVal == "undefined") {
var selector = urlAdd[i].jqfield;
var hasselector = "";
if (!selector || selector == "") // JQuery selector, handig voor radio
{
selector = "#" + urlAdd[i].field;
hasselector = "#has_" + urlAdd[i].field;
}
// Is het misschien een checkbox? Dan is de waarde niet belangrijk maar of deze is aangevinkt.
if (hasselector != "" && $(hasselector).length > 0) { // Het is een checkbox. Controleer of de checkbox is aangevinkt.
theVal = $(selector).prop("checked") ? 1 : 0; // Wel (1) of niet (0) aangevinkt.
} else
theVal = $(selector).val() ? $(selector).val() : -1; // Indien niets geselecteerd dan -1;
}
urlAddParams += theVal;
}
var url = "../cad/selectRoom.asp?ver_key=" + vkey
+ urlAddParams
+ (has_cadShowdiscfn ? "&discs=" + cadShowdiscfn() : "")
+ (has_cadShowgrpfn ? "&srtgs=" + cadShowgrpfn() : "")
+ (has_cadShowsrtfn ? "&srtds=" + cadShowsrtfn() : "")

View File

@@ -77,10 +77,20 @@
--fclt-color-red: rgb(236, 24, 24);
--fclt-color-red-contrast: rgb(255, 255, 255);
/* BORDERS */
/* Borders */
--fclt-border-width: 1px;
--fclt-border-style: solid;
--fclt-border-radius: .25rem;
--fclt-border-radius-lg: var(--bs-border-radius, .375rem);
--fclt-border-color: rgba(0, 0, 0, 0.125);
--fclt-border: var(--fclt-border-width) var(--fclt-border-style) var(--fclt-border-color);
/* Gaps */
--fclt-gap-sm: 0.25em;
--fclt-gap: 0.5em;
--fclt-gap-lg: 0.75em;
--fclt-gap-xl: 1em;
--fclt-card-padding: 0.75em;
/* Font Awesome */
--fa-animation-duration: 1s;

View File

@@ -276,11 +276,24 @@ function GetStylesheet(xmlnode, concept)
function make_xml(params)
{
var sql_xtra = 'NULL';
// FCLT#81165 tijdelijke fix omdat xtrakey soms onverwacht een fac_tracking_key bevat
// wat 95% van de bonnen niet verwacht (die verwachten een note_key van de
// notitie die je bij het handmatig mailen hebt ingegeven)
if (params.xtrakey > 0
&& (params.xmlnode != 'melding' || params.srtnotificatie == 'MLDMAI')
&& (params.xmlnode != 'opdracht' || params.srtnotificatie == 'ORDMAI')
&& (params.xmlnode != 'contract' || params.srtnotificatie == 'CNTMAI')
&& (params.xmlnode != 'factuur' || params.srtnotificatie == 'FINMAI')
)
{
sql_xtra = String(params.xtrakey);
}
var sql_params = safe.quoted_sql(params.xmlnode)
+ ", " + params.key + " , "
+ safe.quoted_sql(customerId)
+ ", '$AspSession$'"
+ ", " + (params.xtrakey ? params.xtrakey : 'NULL')
+ ", " + sql_xtra
+ ", " + (params.where ? safe.quoted_sql(params.where) : "''");
var sql = "SELECT xml.make_xml2(" + sql_params + ") xml_blob FROM dual";