~mihirsoni/ubuntu-calendar-app/dateSelectNewEventTest

« back to all changes in this revision

Viewing changes to EventRepetition.qml

  • Committer: Mihir Soni
  • Date: 2014-10-04 04:37:34 UTC
  • mto: This revision was merged to the branch mainline in revision 496.
  • Revision ID: mihirsoni.123@gmail.com-20141004043734-b01zzx3z92u9hfh0
More Code smilplfied , addressed all comments

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import Ubuntu.Components.Pickers 1.0
24
24
import QtOrganizer 5.0
25
25
import "Defines.js" as Defines
 
26
import "Recurrence.js" as Recurrence
26
27
 
27
28
Page {
28
29
    id: repetition
61
62
                    // If limit is infinite
62
63
                    limitOptions.selectedIndex = 0;
63
64
                }
64
 
                switch(index){
 
65
                switch (index) {
65
66
                case RecurrenceRule.Weekly:
66
67
                    index = eventUtils.getWeekDaysIndex(rule.daysOfWeek.sort());
67
 
                    if(rule.daysOfWeek.length>0 && index === 5){
68
 
                        for(var j = 0;j<rule.daysOfWeek.length;++j){
 
68
                    if (rule.daysOfWeek.length>0 && index === Recurrence.OnDiffDays) {
 
69
                        for (var j = 0; j < rule.daysOfWeek.length; ++j) {
69
70
                            //Start childern after first element.
70
71
                            weeksRow.children[rule.daysOfWeek[j] === 7 ? 0 :rule.daysOfWeek[j]].children[1].checked = true;
71
72
                        }
72
73
                    }
73
74
                    break;
74
75
                case RecurrenceRule.Monthly:
75
 
                    index = 6
 
76
                    index = Recurrence.Monthly
76
77
                    break;
77
78
                case RecurrenceRule.Yearly:
78
 
                    index = 7
 
79
                    index = Recurrence.Yearly
79
80
                    break;
80
81
                }
81
82