From ad11c511f7d2516a3e2f04da4e5cd1eaf89e4d0b Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 9 May 2016 10:38:23 +0200 Subject: * calendar label for user selection list --- app/php/controls/CalendarLabel.php | 13 +++++++++++++ app/php/controls/CalendarLabel.tpl | 12 ++++++++++++ app/php/controls/scripts/CalendarLabel.js | 11 +++++++++++ 3 files changed, 36 insertions(+) create mode 100644 app/php/controls/CalendarLabel.php create mode 100644 app/php/controls/CalendarLabel.tpl create mode 100644 app/php/controls/scripts/CalendarLabel.js diff --git a/app/php/controls/CalendarLabel.php b/app/php/controls/CalendarLabel.php new file mode 100644 index 0000000..667e847 --- /dev/null +++ b/app/php/controls/CalendarLabel.php @@ -0,0 +1,13 @@ + diff --git a/app/php/controls/CalendarLabel.tpl b/app/php/controls/CalendarLabel.tpl new file mode 100644 index 0000000..69e0147 --- /dev/null +++ b/app/php/controls/CalendarLabel.tpl @@ -0,0 +1,12 @@ + + <%= $this->Calendar->GroupID %> + + <%= $this->Service->constructUrl('Calendar', ['calendar' => $this->Calendar->Url]) %> + <%= $this->Calendar->Name %> + + + <%= $this->Facade %> + <%= $this->Calendar->Url %> + <%= $this->User %> + + diff --git a/app/php/controls/scripts/CalendarLabel.js b/app/php/controls/scripts/CalendarLabel.js new file mode 100644 index 0000000..8193e56 --- /dev/null +++ b/app/php/controls/scripts/CalendarLabel.js @@ -0,0 +1,11 @@ +$(document).on('Application.calendarGroupFilterChanged', function(event, args) { + var selectedGroups = args.groups || []; + $('.calendar').each(function() { + var label = $(this); + if (selectedGroups.indexOf(label.attr('data-group')) >= 0) { + label.show(); + } else { + label.hide(); + } + }); +}); -- cgit v1.2.3