Skip to content

Commit

Permalink
Merge PR ExactTarget#1627 'weekly' into refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
interactivellama committed Dec 28, 2015
1 parent a89f55d commit d2e23f8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions js/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,16 +492,20 @@
} else if (recur.FREQ === 'HOURLY') {
item = 'hourly';
} else if (recur.FREQ === 'WEEKLY') {
item = 'weekly';

if (recur.BYDAY) {
item = this.$element.find('.repeat-days-of-the-week .btn-group');
item.find('label').removeClass('active');
commaSplitPattern = recur.BYDAY.split(',');
for (i = 0, commaSplitPattern.length; i < commaSplitPattern.length; i++) {
item.find('input[data-value="' + commaSplitPattern[i] + '"]').prop('checked',true).parent().addClass('active');
if (recur.BYDAY === 'MO,TU,WE,TH,FR') {
item = 'weekdays';
} else {
var el = this.$element.find('.repeat-days-of-the-week .btn-group');
el.find('label').removeClass('active');
commaSplitPattern = recur.BYDAY.split(',');
for (i = 0; i < commaSplitPattern.length; i++) {
el.find('input[data-value="' + commaSplitPattern[i] + '"]').prop('checked',true).parent().addClass('active');
}
}
}

item = 'weekly';
} else if (recur.FREQ === 'MONTHLY') {
this.$element.find('.repeat-monthly input').removeAttr('checked').removeClass('checked');
this.$element.find('.repeat-monthly label.radio-custom').removeClass('checked');
Expand Down

0 comments on commit d2e23f8

Please sign in to comment.