homepage.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. if(file_exists('config'.DIRECTORY_SEPARATOR.'config.php')){
  3. $pageHomepage = '
  4. <script>
  5. !function($) {
  6. "use strict";
  7. var CalendarApp = function() {
  8. this.$body = $("body")
  9. this.$calendar = $("#calendar"),
  10. this.$event = ("#calendar-events div.calendar-events"),
  11. this.$categoryForm = $("#add-new-event form"),
  12. this.$extEvents = $("#calendar-events"),
  13. this.$modal = $("#my-event"),
  14. this.$saveCategoryBtn = $(".save-category"),
  15. this.$calendarObj = null
  16. };
  17. /* Initializing */
  18. CalendarApp.prototype.init = function() {
  19. /* Initialize the calendar */
  20. var date = new Date();
  21. var d = date.getDate();
  22. var m = date.getMonth();
  23. var y = date.getFullYear();
  24. var form = "";
  25. var today = new Date($.now());
  26. var $this = this;
  27. $this.$calendarObj = $this.$calendar.fullCalendar({
  28. defaultView: "'.$GLOBALS['calendarDefault'].'",
  29. firstDay: "'.$GLOBALS['calendarFirstDay'].'",
  30. timeFormat: "'.$GLOBALS['calendarTimeFormat'].'",
  31. handleWindowResize: true,
  32. header: {
  33. left: "prev,next",
  34. center: "title",
  35. right: "month,basicDay,basicWeek"
  36. },
  37. timezone: "local",
  38. editable: false,
  39. droppable: false, // this allows things to be dropped onto the calendar !!!
  40. eventLimit: false, // allow "more" link when too many events
  41. //eventLimit: tof("'.$GLOBALS['calendarLimit'].'","b"), // allow "more" link when too many events
  42. selectable: false,
  43. height: "auto",
  44. eventRender: function eventRender( event, element, view ) {
  45. if (typeof filter !== "undefined") {
  46. if(filter === "all"){
  47. return event.imagetype === event.imagetype;
  48. }else if(filter !== "all"){
  49. return filter === event.imagetype;
  50. }
  51. if(filter === null){
  52. return event.imagetype === event.imagetype;
  53. }
  54. }else {
  55. return event.imagetype === event.imagetype;
  56. }
  57. },
  58. });
  59. },
  60. //init CalendarApp
  61. $.CalendarApp = new CalendarApp, $.CalendarApp.Constructor = CalendarApp
  62. }(window.jQuery),
  63. //initializing CalendarApp
  64. function($) {
  65. "use strict";
  66. $.CalendarApp.init()
  67. }(window.jQuery);
  68. </script>
  69. <link href="plugins/bower_components/owl.carousel/owl.carousel.min.css" rel="stylesheet" type="text/css" />
  70. <link href="plugins/bower_components/owl.carousel/owl.theme.default.css" rel="stylesheet" type="text/css" />
  71. <div class="container-fluid p-t-10" id="homepage-items">
  72. '.buildHomepage().'
  73. </div>
  74. <!-- /.container-fluid -->
  75. ';
  76. }