From 028fbfdd2534b583290ef5a26f82c48734a969fd Mon Sep 17 00:00:00 2001 From: unclecheese <unclecheese@leftandmain.com> Date: Wed, 9 Jan 2013 15:59:10 -0500 Subject: [PATCH] BUGFIX: CalendarWidget not respecting jquery_included --- code/CalendarWidget.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/CalendarWidget.php b/code/CalendarWidget.php index 09f0e54..082bae9 100755 --- a/code/CalendarWidget.php +++ b/code/CalendarWidget.php @@ -1,4 +1,3 @@ - <?php @@ -55,7 +54,9 @@ public function setSelectionEnd($date) { public function forTemplate() { - Requirements::javascript(THIRDPARTY_DIR."/jquery/jquery.js"); + if(!Calendar::$jquery_included) { + Requirements::javascript(THIRDPARTY_DIR."/jquery/jquery.js"); + } Requirements::javascript("event_calendar/javascript/calendar_widget.js"); $locale_file = _t('Calendar.DATEJSFILE','calendar_en.js'); Requirements::javascript("event_calendar/javascript/lang/{$locale_file}"); @@ -63,4 +64,4 @@ public function forTemplate() { Requirements::css("event_calendar/css/calendar_widget.css"); return '<div class="calendar-widget" ' . $this->getDataAttributes() . '></div>'; } -} \ No newline at end of file +}