Skip to content

Commit

Permalink
BUGFIX: CalendarWidget not respecting jquery_included
Browse files Browse the repository at this point in the history
  • Loading branch information
unclecheese committed Jan 9, 2013
1 parent d8ff595 commit 028fbfd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code/CalendarWidget.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<?php


Expand Down Expand Up @@ -55,12 +54,14 @@ 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}");
Requirements::javascript("event_calendar/javascript/calendar_widget_init.js");
Requirements::css("event_calendar/css/calendar_widget.css");
return '<div class="calendar-widget" ' . $this->getDataAttributes() . '></div>';
}
}
}

0 comments on commit 028fbfd

Please sign in to comment.