mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-19 22:35:19 +00:00
Style events depending on user participation state
Also use one-time binding for non-ghost events.
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user