Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1373 from interactivellama/scheduler-repeat-selec…
Browse files Browse the repository at this point in the history
…tor-specifity

Correct scheduler selection of `.year-month`
  • Loading branch information
Kevin Parkerson committed Jun 30, 2015
2 parents 3e2aa70 + ec51691 commit 69e5d33
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@
day = parseInt(this.$element.find('.repeat-monthly-date .selectlist').selectlist('selectedItem').text, 10);
pattern += 'BYMONTHDAY=' + day + ';';
} else if (type === 'bysetpos') {
days = this.$element.find('.month-days').selectlist('selectedItem').value;
pos = this.$element.find('.month-day-pos').selectlist('selectedItem').value;
days = this.$element.find('.repeat-monthly-day .month-days').selectlist('selectedItem').value;
pos = this.$element.find('.repeat-monthly-day .month-day-pos').selectlist('selectedItem').value;
pattern += 'BYDAY=' + days + ';';
pattern += 'BYSETPOS=' + pos + ';';
}
Expand All @@ -323,13 +323,15 @@
type = this.$element.find('input[name=repeat-yearly]:checked').val();

if (type === 'bymonthday') {
// there are multiple .year-month classed elements in scheduler markup
month = this.$element.find('.repeat-yearly-date .year-month').selectlist('selectedItem').value;
day = this.$element.find('.year-month-day').selectlist('selectedItem').text;
day = this.$element.find('.repeat-yearly-date .year-month-day').selectlist('selectedItem').text;
pattern += 'BYMONTH=' + month + ';';
pattern += 'BYMONTHDAY=' + day + ';';
} else if (type === 'bysetpos') {
days = this.$element.find('.year-month-days').selectlist('selectedItem').value;
pos = this.$element.find('.year-month-day-pos').selectlist('selectedItem').value;
days = this.$element.find('.repeat-yearly-day .year-month-days').selectlist('selectedItem').value;
pos = this.$element.find('.repeat-yearly-day .year-month-day-pos').selectlist('selectedItem').value;
// there are multiple .year-month classed elements in scheduler markup
month = this.$element.find('.repeat-yearly-day .year-month').selectlist('selectedItem').value;

pattern += 'BYDAY=' + days + ';';
Expand Down

0 comments on commit 69e5d33

Please sign in to comment.