VLKC#41524 icoontje toegevoegd aan reservering in het res_planbord waaraan een melding is gekoppeld

svn path=/Website/trunk/; revision=37827
This commit is contained in:
2018-05-02 14:25:48 +00:00
parent bfc398529c
commit d3e93e889e
3 changed files with 61 additions and 42 deletions

View File

@@ -123,28 +123,16 @@ table.planbord div.gepland{ position: absolute;
height: 16px;
top: 0px;
}
div.metobj:before,
div.metcat:before,
div.metobjcat:before {
position: absolute;
font-family: 'FontAwesome';
line-height: 1.25em;
font-size: 1.25em;
color: #444;
left: 50%;
}
div.metobj:before {
content: "\f26c";
margin-left: -0.6em;
}
div.metcat:before {
content: "\f0f5";
margin-left: -0.5em;
}
div.metobjcat:before {
content: "\f26c\00a0\f0f5";
margin-left: -1.25em;
div.resIcon {
position : absolute;
width : 100%;
height : 100%;
white-space : nowrap;
line-height : 1.25em;
font-size : 1.25em;
text-align : center;
font-family : 'FontAwesome';
color : #444;
}
table.planbord div.begintijd{ position: absolute;

View File

@@ -1502,6 +1502,8 @@ res = {
+ " , (SELECT count(1) FROM res_v_aanwezigrsv_deel rrd"
+ " WHERE rrd.res_rsv_ruimte_key = rv.res_rsv_ruimte_key"
+ " AND rrd.bez_bezoekers_key IS NULL) aantalD" // Uitsluiten parkeerplaatsen met een bez_bezoekers_key.
+ " , (SELECT count(1) FROM mld_melding mld_res"
+ " WHERE mld_res.res_rsv_ruimte_key = rv.res_rsv_ruimte_key) aantalM"
+ " FROM res_v_aanwezigrsv_ruimte rv"
+ " , res_ruimte_opstelling ro"
+ " , res_activiteit ra"
@@ -1575,6 +1577,8 @@ res = {
data.aantalA = oRs("aantalA").Value;
if (oRs("aantalD").Value)
data.aantalD = oRs("aantalD").Value;
if (oRs("aantalM").Value)
data.aantalM = oRs("aantalM").Value;
}
else if (oRs("res_rsv_ruimte_host_key").Value == params.prs_key || oRs("res_rsv_ruimte_contact_key").Value == params.prs_key)
{

View File

@@ -148,6 +148,7 @@ function make_plan_regel(room, ar, params, nr_days, hour_px)
statClass += " res_current";
var theClass = statClass + " gepland" + (room.extern_id != null? " extern" : "");
var iconDiv = "";
if (ar[ci].na_koppel == 1 || params.forSelectRoom || params.urole=='fe')
{
@@ -155,12 +156,15 @@ function make_plan_regel(room, ar, params, nr_days, hour_px)
}
else
{
if (ar[ci].aantalA > 0 && ar[ci].aantalD > 0)
theClass += " metobjcat";
else if (ar[ci].aantalA > 0)
theClass += " metcat";
else if (ar[ci].aantalD > 0)
theClass += " metobj";
// Voeg indicatie iconen toe
if (ar[ci].aantalM > 0) // Res heeft meldingen
iconDiv += I("fa-wrench");
if (ar[ci].aantalD > 0) // Res heeft voorzieningen
iconDiv += I("fa-television");
if (ar[ci].aantalA > 0) // Res heeft catering
iconDiv += I("fa-cutlery");
if (iconDiv != "")
iconDiv = "<div class=\"resIcon\">" + iconDiv + "</div>";
}
if (ar[ci].dirtlevel & res.dirtlevel.ruimte.notavailable)
@@ -223,8 +227,7 @@ function make_plan_regel(room, ar, params, nr_days, hour_px)
var res_flag = "";
if (ar[ci].flag_status > 0)
{
//res_flag = "<img src='../pictures/resflag"+ar[ci].flag_status+".png'>";
res_flag = I("fa-circle respl resflag"+ar[ci].flag_status);
res_flag = "<div style=\"float:left\">" + I("fa-circle fa-fw respl resflag"+ar[ci].flag_status) + "</div>";
}
if (!ar[ci].na_koppel && !not_available && !params.forSelectRoom)
@@ -243,8 +246,8 @@ function make_plan_regel(room, ar, params, nr_days, hour_px)
if (ar[ci].extern.deepurl)
div += " deepurl='" + safe.htmlattr(ar[ci].extern.deepurl) + "'";
}
var safetxt = "";
/*
var safetxt = "";
if (hour_px >= 24) // dan is de omschrijving opgehaald
{
if (px_width > 60) // totale balk 60 pixels
@@ -256,7 +259,7 @@ function make_plan_regel(room, ar, params, nr_days, hour_px)
}
*/
div += " style='z-index:"+ci+";left:"+px_start+"px;width:"+px_width+"px;"+theStyleLeft+theStyleRight+"'>"
+res_flag+safetxt+"&nbsp;</div>";
+res_flag+iconDiv+"</div>";
html.push("\n"+div);
}
html.push("</div></td>")
@@ -413,16 +416,40 @@ __Log("start make_plan_room");
<% if (!params.noclicker) { %>
<script>
$(function () {
$("table#<%=params.id%>").on("mouseover", "td div.gepland", function (e)
{
var obj = e.currentTarget;
rsv_title(obj);
});
$("table#<%=params.id%>").on("click", "td div.click", function (e)
{
var obj = e.currentTarget;
rsv_click(obj, '<%=params.urole%>');
});
$("div.resIcon").each(function() {
var $parent = $(this).parents("div");
// Bereken width van iconDiv
var thisContentWidth = 0;
$(this).children().each(function() {
thisContentWidth += $(this).width();
});
if (thisContentWidth > $parent.width())
{
// Kijken of we wat aan kunnen passen (uitdijen)
if (thisContentWidth <= $parent.outerWidth())
{
$(this).css("width", $parent.outerWidth());
$(this).css("left", (-1 * parseFloat($parent.css("borderLeftWidth"))));
}
else // Of maar weg moeten halen
$(this).remove();
}
});
$("table#<%=params.id%>").on("mouseover", "td div.gepland", function (e)
{
var obj = e.currentTarget;
rsv_title(obj);
});
$("table#<%=params.id%>").on("click", "td div.click", function (e)
{
var obj = e.currentTarget;
rsv_click(obj, '<%=params.urole%>');
});
});
</script>
<% } %>