Style events depending on user participation state

Also use one-time binding for non-ghost events.
This commit is contained in:
Francis Lachapelle committed 2016-04-22 10:55:26 -04:00
1 parent 0bc7e5f5bd
commit 1a30df03c8
7 files changed
+125 -63

No files matched your search

@@ -46,7 +46,7 @@
});
function initGhost() {
var pid, calendarData;
var pid, calendarData, userState;
// Expose ghost block to the scope
scope.block = Component.$ghost;
@@ -62,6 +62,11 @@
if (!pid)
pid = scope.block.component.pid;
// Add class for user's participation state
userState = scope.block.component.blocks[0].userState;
if (userState)
iElement.addClass('sg-event--' + userState);
// Set background color
iElement.addClass('bg-folder' + pid);
}