Skip to content

Commit

Permalink
ENHANCEMENT: CMS JS now uses Entwine
Browse files Browse the repository at this point in the history
  • Loading branch information
unclecheese committed Jul 17, 2012
1 parent 38766d0 commit 568971a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions code/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class Calendar extends Page {
public function getCMSFields()
{

Requirements::javascript(THIRDPARTY_DIR.'/jquery-livequery/jquery.livequery.js');
Requirements::javascript('event_calendar/javascript/calendar_cms.js');

$f = parent::getCMSFields();
Expand Down Expand Up @@ -116,7 +115,7 @@ public function getCMSFields()
GridFieldConfig_RecordEditor::create()
));

$otherCals = DataList::create("Calendar")->exclude("Calendar\".\"ID",$this->ID);
$otherCals = Calendar::get()->filter("ID:Negation",$this->ID);
if($otherCals->exists()) {
$f->addFieldToTab("Root.$feeds", new CheckboxSetField(
'NestedCalendars',
Expand Down
1 change: 0 additions & 1 deletion code/CalendarEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class CalendarEvent extends Page

public function getCMSFields()
{
Requirements::javascript(THIRDPARTY_DIR.'/jquery-livequery/jquery.livequery.js');
Requirements::javascript('event_calendar/javascript/calendar_cms.js');
$f = parent::getCMSFields();
$dt = _t('CalendarEvent.DATESANDTIMES','Dates and Times');
Expand Down
9 changes: 5 additions & 4 deletions javascript/calendar_cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ $(function() {
}).change();


$('#Recursion').livequery(function() {
$('#Recursion').entwine({
onmatch: function() {


var $tab = $(this).closest('.tab');
var $recursion = $(this);
var $tab = this.closest('.tab');
var $recursion = this;
var $customRecursionType = $tab.find('#CustomRecursionType').hide();
var $dailyInterval = $tab.find('.dailyinterval').hide();
var $weeklyInterval = $tab.find('.weeklyinterval').hide();
Expand Down Expand Up @@ -88,7 +89,7 @@ $(function() {



});
}});



Expand Down

0 comments on commit 568971a

Please sign in to comment.