Merge lp:~pkunal-parmar/ubuntu-calendar-app/Monthly-YearlyEvent into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 627
Merged at revision: 626
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/Monthly-YearlyEvent
Merge into: lp:ubuntu-calendar-app
Diff against target: 63 lines (+32/-14)
1 file modified
EventRepetition.qml (+32/-14)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/Monthly-YearlyEvent
Reviewer Review Type Date Requested Status
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+255919@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Tested on Krillin. Nice one Kunal, thanks for the fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventRepetition.qml'
2--- EventRepetition.qml 2014-10-22 14:03:01 +0000
3+++ EventRepetition.qml 2015-04-12 05:02:40 +0000
4@@ -90,7 +90,7 @@
5
6 }
7 }
8- recurrenceOption.selectedIndex = index;
9+ recurrenceOption.selectedIndex = index;
10 }
11
12 head.backAction: Action{
13@@ -100,19 +100,37 @@
14 var recurrenceRule = Defines.recurrenceValue[ recurrenceOption.selectedIndex ];
15 if (recurrenceRule !== RecurrenceRule.Invalid) {
16 rule.frequency = recurrenceRule;
17- if (recurrenceOption.selectedIndex > 0) {
18- rule.daysOfWeek = eventUtils.getDaysOfWeek(recurrenceOption.selectedIndex,weekDays );
19- if (limitOptions.selectedIndex === 1
20- && recurrenceOption.selectedIndex > 0
21- && limitCount.text != "") {
22- rule.limit = parseInt(limitCount.text);
23- }
24- else if (limitOptions.selectedIndex === 2 && recurrenceOption.selectedIndex > 0) {
25- rule.limit = datePick.date;
26- }
27- else {
28- rule.limit = undefined;
29- }
30+ switch(recurrenceOption.selectedIndex){
31+ case 1: //daily
32+ case 2: //weekly
33+ case 3: //weekly
34+ case 4: //weekly
35+ case 5: //weekly
36+ rule.daysOfWeek = eventUtils.getDaysOfWeek(recurrenceOption.selectedIndex, weekDays );
37+ break;
38+ case 6: //monthly
39+ rule.daysOfMonth = [date.getDate()];
40+ break;
41+ case 7: //yearly
42+ rule.monthsOfYear = [date.getMonth()];
43+ rule.daysOfMonth = [date.getDate()];
44+ break;
45+ case 0: //once
46+ default:
47+ //it should not come here
48+ break;
49+ }
50+
51+ if (limitOptions.selectedIndex === 1
52+ && recurrenceOption.selectedIndex > 0
53+ && limitCount.text != "") {
54+ rule.limit = parseInt(limitCount.text);
55+ }
56+ else if (limitOptions.selectedIndex === 2 && recurrenceOption.selectedIndex > 0) {
57+ rule.limit = datePick.date;
58+ }
59+ else {
60+ rule.limit = undefined;
61 }
62 }
63 else {

Subscribers

People subscribed via source and target branches

to status/vote changes: