DLLG#90075 Ondersteuning werkplekbeheer in verschillende tijdzones
svn path=/Website/trunk/; revision=70113
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
Note:
|
||||
|
||||
*/ %>
|
||||
<!--#include file="../Shared/common.inc" -->
|
||||
<!--#include file="../Shared/iface.inc" -->
|
||||
<!-- #include file="../Shared/common.inc" -->
|
||||
<!-- #include file="../Shared/iface.inc" -->
|
||||
<!-- #include file="../Shared/calendar.inc" -->
|
||||
|
||||
<!--#include file="../Shared/selector.inc" -->
|
||||
<!--#include file="../Shared/plaatsselector.inc" -->
|
||||
<!-- #include file="../Shared/selector.inc" -->
|
||||
<!-- #include file="../Shared/timezoneselector.inc" -->
|
||||
<!-- #include file="../Shared/plaatsselector.inc" -->
|
||||
<!-- #include file="alg_flexkenmerk.inc" -->
|
||||
<!-- #include file="alg.inc" -->
|
||||
|
||||
@@ -59,6 +59,7 @@ if (loc_key > 0)
|
||||
var dienstniveau = oRs("mld_dienstniveau_key").Value;
|
||||
var loc_score1 = oRs("alg_locatie_mjb_score1").Value;
|
||||
var vervaldatum = oRs("alg_locatie_vervaldatum").Value != null ? new Date(oRs("alg_locatie_vervaldatum").Value) : null;
|
||||
var alg_tz = oRs("alg_locatie_timezone").Value;
|
||||
|
||||
oRs.Close();
|
||||
}
|
||||
@@ -131,6 +132,7 @@ BLOCK_END();
|
||||
|
||||
BLOCK_START("facFM", L("lcl_operations_block"), {icon: "fa-users-cog"});
|
||||
manRWFIELD("loc_volgnr", "fld", L("lcl_alg_locatie_volgnr"), loc_volgnr, {maxlength: 3});
|
||||
FCLTtimezoneselector("alg_tz", { initKey: alg_tz });
|
||||
FCLTcalendar("vervaldatum",
|
||||
{ datum: vervaldatum,
|
||||
initEmpty: vervaldatum==null,
|
||||
|
||||
@@ -49,7 +49,9 @@ if (this_alg.writeman)
|
||||
{ dbs: "alg_locatie_vervaldatum", typ: "date", frm: "vervaldatum", track: L("lcl_alg_vervaldatum") },
|
||||
{ dbs: "alg_locatie_email", typ: "varchar", frm: "loc_mail", track: L("lcl_noti_email") },
|
||||
{ dbs: "alg_locatie_image", typ: "varchar", frm: "loc_image", track: L("lcl_alg_locatie_image") },
|
||||
{ dbs: "alg_locatie_volgnr", typ: "number", frm: "loc_volgnr", track: L("lcl_alg_locatie_volgnr") });
|
||||
{ dbs: "alg_locatie_volgnr", typ: "number", frm: "loc_volgnr", track: L("lcl_alg_locatie_volgnr") },
|
||||
{ dbs: "alg_locatie_timezone", typ: "varchar", frm: "alg_tz", track: L("lcl_timezone") }
|
||||
);
|
||||
|
||||
if (alg.canWriteDistrict(dis_key, this_alg.authparams("WEB_ALGMAN").ALGwritelevel))
|
||||
fields.push({ dbs: "alg_district_key", typ: "key", val: dis_key });
|
||||
|
||||
@@ -49,6 +49,8 @@ var pst_land = oRs("alg_locatie_post_land").Value;
|
||||
var loc_deleted = oRs("alg_locatie_verwijder").Value != null;
|
||||
var vervaldatum = oRs("alg_locatie_vervaldatum").Value;
|
||||
var dienstniveau_key = oRs("mld_dienstniveau_key").Value;
|
||||
var alg_tz = oRs("alg_locatie_timezone").Value;
|
||||
|
||||
oRs.Close();
|
||||
%>
|
||||
<html>
|
||||
@@ -136,6 +138,7 @@ oRs.Close();
|
||||
|
||||
BLOCK_START("facFM", L("lcl_operations_block"), {icon: "fa-users-cog"});
|
||||
ROFIELDTR("fld", L("lcl_alg_locatie_volgnr"), loc_volgnr, {suppressEmpty: true});
|
||||
ROFIELDTR("fld", L("lcl_timezone"), alg_tz, {suppressEmpty: true});
|
||||
var fldcls = "fld";
|
||||
if (vervaldatum <= new Date())
|
||||
fldcls += " expired2";
|
||||
|
||||
40
APPL/Shared/timezoneselector.inc
Normal file
40
APPL/Shared/timezoneselector.inc
Normal file
@@ -0,0 +1,40 @@
|
||||
<% /*
|
||||
$Revision$
|
||||
$Id$
|
||||
|
||||
File: timezoneselector.inc
|
||||
Description: Algemene interface functie om een timezone te kiezen
|
||||
Deze moet je kunnen includen en aanroepen.
|
||||
parameters fieldName: veldnaam van het srtperslidKey veld. Dit veld wordt gesubmit.
|
||||
params: object met meegegeven parameters.
|
||||
*/ %>
|
||||
|
||||
<%
|
||||
FCLTHeader.Requires({ plugins: ["jQuery"] });
|
||||
|
||||
// moet deze zelf selector.inc nog includen of is dat al (gegarandeerd)?
|
||||
|
||||
function FCLTtimezoneselector(fieldName, params)
|
||||
{
|
||||
if (typeof params == "undefined") params = {};
|
||||
|
||||
// De lijst mag wel een heel stuk korter
|
||||
// Wat we opslaan is een string. Door readonly hier te ondersteunen regelen we de presentatie centraal
|
||||
var sql = " SELECT DISTINCT (tzname), '(UTC ' || RTRIM (TZ_OFFSET (tzname), CHR (0)) || ') ' || tzname"
|
||||
+ " FROM V$TIMEZONE_NAMES "
|
||||
+ ((params.readonly && params.initKey)
|
||||
? " WHERE SUBSTR (TZ_OFFSET (tzname),5) = " + params.initKey
|
||||
: " GROUP BY tzname, TZ_OFFSET (tzname) "
|
||||
+ " ORDER BY TO_NUMBER(SUBSTR (TZ_OFFSET (tzname), 1, 3) "
|
||||
+ " || SUBSTR (TZ_OFFSET (tzname), 5, 2)) ASC,"
|
||||
+ " tzname");
|
||||
|
||||
FCLTselector(fieldName, sql,
|
||||
{ label: params.label||L("lcl_timezone"),
|
||||
initKey: params.initKey || "", // of de servertijdzone?
|
||||
emptyKey: params.emptyKey || "",
|
||||
emptyOption: params.emptyOption || ""
|
||||
});
|
||||
|
||||
}
|
||||
%>
|
||||
Reference in New Issue
Block a user