$("#eventcontent").text(data.response.event.t);
},
'json');
+ },
+
+ showNextDay: function()
+ {
+ KronolithMobile.currentDate.addDays(1);
+ KronolithMobile.doAction('listEvents',
+ {'start': KronolithMobile.currentDate.toString("yyyyMMdd"), 'end': KronolithMobile.currentDate.toString("yyyyMMdd"), 'cal': Kronolith.conf.default_calendar},
+ KronolithMobile.listEventsCallback
+ );
+ },
+
+ showPrevDay: function()
+ {
+ KronolithMobile.currentDate.addDays(-1);
+ KronolithMobile.doAction('listEvents',
+ {'start': KronolithMobile.currentDate.toString("yyyyMMdd"), 'end': KronolithMobile.currentDate.toString("yyyyMMdd"), 'cal': Kronolith.conf.default_calendar},
+ KronolithMobile.listEventsCallback
+ );
}
};
// For now, start at today's day view
KronolithMobile.currentDate = new Date();
- $('body').bind('swipeleft', function(e) {
- KronolithMobile.currentDate.addDays(1);
- KronolithMobile.doAction('listEvents',
- {'start': KronolithMobile.currentDate.toString("yyyyMMdd"), 'end': KronolithMobile.currentDate.toString("yyyyMMdd"), 'cal': Kronolith.conf.default_calendar},
- KronolithMobile.listEventsCallback
- );
- });
-
- $('body').bind('swiperight', function(e) {
- KronolithMobile.currentDate.addDays(-1);
- KronolithMobile.doAction('listEvents',
- {'start': KronolithMobile.currentDate.toString("yyyyMMdd"), 'end': KronolithMobile.currentDate.toString("yyyyMMdd"), 'cal': Kronolith.conf.default_calendar},
- KronolithMobile.listEventsCallback
- );
- });
+ $('body').bind('swipeleft', KronolithMobile.showNextDay);
+ $('body').bind('swiperight', KronolithMobile.showPrevDay);
+ $('#prevDay').bind('click', KronolithMobile.showPrevDay);
+ $('#nextDay').bind('click', KronolithMobile.showNextDay);
// Load today
KronolithMobile.doAction('listEvents',
<h1>My Calendar:Day</h1>
<a class="ui-btn-left" href="<?php echo Horde::getServiceLink('portal', 'horde')?>"><?php echo _("Home")?></a>
<a rel="external" class="ui-btn-right" href="<?php echo Horde::getServiceLink('logout', 'horde')?>"><?php echo _("Logout")?></a>
- <h4 id="todayheader"></h4>
+ <div class="ui-bar-b" style="width:100%;text-align:center;"><a href="#" data-icon="arrow-l" id="prevDay"><?php echo _("Previous")?></a><span id="todayheader"></span><a href="#" data-icon="arrow-r" id="nextDay"><?php echo _("Next")?></a></div>
+
</div>
<div data-role="content" class="ui-body" id="daycontent"></div>
<div data-role="footer">