diff options
author | Benjamin Kiessling <mittagessen@l.unchti.me> | 2012-01-12 22:25:40 +0100 |
---|---|---|
committer | Benjamin Kiessling <mittagessen@l.unchti.me> | 2012-01-12 22:25:40 +0100 |
commit | b83f34c7634bd308be74285736d28bd6ac1d80eb (patch) | |
tree | ca71a66d55a16234787dd2f141ab4e595c96915e /slideshows/default/template/events.js | |
parent | 1a66193d28e9fb7af0145c3c9c58f39f55806c5b (diff) |
Update example for new event file format
Diffstat (limited to 'slideshows/default/template/events.js')
-rw-r--r-- | slideshows/default/template/events.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/slideshows/default/template/events.js b/slideshows/default/template/events.js index a6202ff..9d69547 100644 --- a/slideshows/default/template/events.js +++ b/slideshows/default/template/events.js @@ -9,4 +9,17 @@ $(document).ready(function(){ var marg = $('.event').outerWidth(true) - $('.event').outerWidth();
$('.event').width((screenWidth-(tot * (bord+padd+marg)))/tot);
+ $('.eventDate').each(function(index, value) {
+ var colours = ['blue', 'green', 'chreme'];
+ $(this).addClass(colours[index % 3]);
+ });
+
+ $('.eventField').each(function(index, value) {
+ var classStr = $(this).attr('class').split(/\s+/);
+ if(classStr.indexOf('start') != -1) {
+ $(this).show();
+ } else if(classStr.indexOf('summary') != -1) {
+ $(this).show();
+ }
+ });
});
|