UNPKG

calenstyle

Version:

CalenStyle is a Responsive Drag-and-Drop Event Calendar for Web, iOS, Android & Windows. CalenStyle is customizable plugin having multiple, clean-designed event calendar templates specially designed for web & mobile applications.

157 lines (116 loc) 5.47 kB
<!DOCTYPE html> <html> <head> <title>Default View for Mobile</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../js/jquery-ui-custom-1.11.2.min.js"></script> <link rel="stylesheet" type="text/css" href="../css/jquery-ui-custom-1.11.2.min.css" /> <script type="text/javascript" src="../js/jquery.ui.touch-punch.js"></script> <script type="text/javascript" src="../js/hammer.min.js"></script> <script type="text/javascript" src="../js/fastclick.js"></script> <link rel="stylesheet" type="text/css" href="../../src/calenstyle.css" /> <link rel="stylesheet" type="text/css" href="../../src/calenstyle-jquery-ui-override.css" /> <link rel="stylesheet" type="text/css" href="../../src/calenstyle-iconfont.css" /> <script type="text/javascript" src="../../src/calenstyle.js"></script> <link rel="stylesheet" type="text/css" href="../css/CalEventList.css" /> <script type="text/javascript" src="../js/CalJsonGenerator.js"></script> <style type="text/css"> .calendarContOuter { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; font-size: 12px; text-shadow: none; } .cElemDatePicker { font-size: 13px; } .cdvCalendarCont { max-height: none; } </style> <script type="text/javascript"> $(function() { FastClick.attach(document.body); $(".calendarContOuter").CalenStyle( { visibleView: "WeekView", headerSectionsList: { left: ["HeaderLabelWithDropdownMenuArrow"], center: [], right: ["PreviousButton", "NextButton"] }, dropdownMenuElements: ["ViewsToDisplay", "DatePicker"], isTooltipInMonthView: false, isTooltipInDetailView: false, calDataSource: [ { sourceFetchType: "DateRange", sourceType: "FUNCTION", source: function(fetchStartDate, fetchEndDate, durationStartDate, durationEndDate, oConfig, loadViewCallback) { var calObj1 = this; calObj1.incrementDataLoadingCount(1); var oEventResponse = generateJsonEvents(fetchStartDate, fetchEndDate); console.log("Response " + fetchStartDate + " " + fetchEndDate); console.log(oEventResponse); if(oEventResponse != undefined) { if(oEventResponse[0]) { calObj1.parseDataSource("eventSource", oEventResponse[1], durationStartDate, durationEndDate, loadViewCallback, oConfig, false); } } } } ], eventClicked: function() { console.log("Event Clicked"); }, addEventHandlersInHeader: function() { var oCal1 = $(".calendarContOuter").CalenStyle(); var oHammer1 = new Hammer(oCal1.elem); oHammer1.on("swiperight", function(ev) { oCal1.navigateToPrevView(); }); oHammer1.on("swipeleft", function(ev) { oCal1.navigateToNextView(); }); var oCal2 =oCal1.setting.datePickerObject; var oHammer2 = new Hammer(oCal2.elem, { threshold: 0, velocity: 0 }); oHammer2.on("swiperight", function(ev) { oCal2.navigateToPrevView(); }); oHammer2.on("swipeleft", function(ev) { oCal2.navigateToNextView(); }); }, useHammerjsAsGestureLibrary: false, //hideEventIcon: {Default: false}, hideEventTime: {Default: true} }); }); </script> </head> <body> <div class="calendarContOuter"></div> </body> </html>