summaryrefslogtreecommitdiff
path: root/app/php/controls/scripts
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-09 10:38:23 +0200
committeremkael <emkael@tlen.pl>2016-05-09 12:38:03 +0200
commitad11c511f7d2516a3e2f04da4e5cd1eaf89e4d0b (patch)
tree0367b80e26ffaaa951079b45ad030a2f6e38c837 /app/php/controls/scripts
parentbd9ca1eea24cfa98c0bcbea1ee546d131d5c10c1 (diff)
* calendar label for user selection list
Diffstat (limited to 'app/php/controls/scripts')
-rw-r--r--app/php/controls/scripts/CalendarLabel.js11
1 files changed, 11 insertions, 0 deletions
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();
+ }
+ });
+});