From c9c1581eb2bfbdd09e10a406192839a6dcf2a429 Mon Sep 17 00:00:00 2001 From: Chris W Date: Mon, 30 Nov 2015 14:06:16 -0500 Subject: [PATCH] add a report list for equipment group display which shows reservations broken down by eq item; manager reservation legen item is an active control that toggles visibility of management reservations in list view --- css/WMS_bootstrap_PATCH.css | 9 +- ...t_group_schedules_of_reservations.frag.php | 138 +++++++++++++----- js/equipment_group.js | 36 +++++ 3 files changed, 142 insertions(+), 41 deletions(-) diff --git a/css/WMS_bootstrap_PATCH.css b/css/WMS_bootstrap_PATCH.css index 519bed0..67b1682 100644 --- a/css/WMS_bootstrap_PATCH.css +++ b/css/WMS_bootstrap_PATCH.css @@ -82,13 +82,14 @@ Purpose: CSS that's not an extension / modification of the bootstrap framework } .rendered-object > .render-hover-info { - position: fixed; + position: relative; border: 1px solid #000000; background-color: #ddd; max-width: 300px; margin: 0; padding: 8px; visibility: hidden; + float: right; } .rendered-object:hover > .render-hover-info { @@ -108,7 +109,7 @@ input[type="checkbox"].comm_pref-checkbox { padding-bottom: 5px; } -#reservationSchedules > li { +#reservationSchedules > li .item-listing ul { padding-bottom: 7px; } @@ -157,6 +158,10 @@ ul.subgroup-ul { line-height: 36px; } +.mgt-reservation-legend-item-strikethrough { + text-decoration: line-through; +} + /*------------------------- transient alert*/ .transient_alert diff --git a/equipment_group_schedules_of_reservations.frag.php b/equipment_group_schedules_of_reservations.frag.php index c89d513..fd689ab 100755 --- a/equipment_group_schedules_of_reservations.frag.php +++ b/equipment_group_schedules_of_reservations.frag.php @@ -4,16 +4,19 @@ List View Monthly Calendar View + Report
- legend: manager reservation user reservation + legend: manager reservation user reservation

+ +
diff --git a/js/equipment_group.js b/js/equipment_group.js index 65ba47d..b60dc1b 100755 --- a/js/equipment_group.js +++ b/js/equipment_group.js @@ -52,6 +52,15 @@ $(document).ready(function () { } } + $(document).on("click", "#mgt-reservation-legend-item", function(){ + $("#mgt-reservation-legend-item").toggleClass("mgt-reservation-legend-item-strikethrough"); + if ($("#mgt-reservation-legend-item").hasClass("mgt-reservation-legend-item-strikethrough")) { + $(".list-items-mgr").addClass("hide"); + } else { + $(".list-items-mgr").removeClass("hide"); + } + }); + //****** related to showing reservations list $(document).on("click", "#show-reservations-buttons .show-this-month", function(){ var show_which = $('.show-this-month').attr('data-show-month'); @@ -1365,6 +1374,23 @@ var durationsJSON = '{ //********************************** // Calendar related + $(document).on("click", "#reservations_view .show_reservation_report", function () { + //Successfully gets the calendar day + if($('.report').hasClass("hide")){ + if($('.calendar').hasClass('hide')){ + $('.calendar_day').addClass('hide'); + }else{ + $('.calendar').addClass("hide"); + } + if($('.schedule').hasClass('hide')){ + $('.calendar_day').addClass('hide'); + }else{ + $('.schedule').addClass("hide"); + } + $('.report').removeClass("hide"); + } + }); + $(document).on("click", "#reservations_view .show_reservation_list", function () { //Successfully gets the calendar day if($('.schedule').hasClass("hide")){ @@ -1373,6 +1399,11 @@ var durationsJSON = '{ }else{ $('.calendar').addClass("hide"); } + if($('.report').hasClass('hide')){ + $('.calendar_day').addClass('hide'); + }else{ + $('.report').addClass("hide"); + } $('.schedule').removeClass("hide"); } }); @@ -1384,6 +1415,11 @@ var durationsJSON = '{ }else{ $('.schedule').addClass("hide"); } + if($('.report').hasClass('hide')){ + $('.calendar_day').addClass('hide'); + }else{ + $('.report').addClass("hide"); + } $('.calendar').removeClass("hide"); } });