Merge lp://staging/~larochelle-brian/ubuntu-calendar-app/30MinIncrementsHackdays into lp://staging/ubuntu-calendar-app

Proposed by brian larochelle
Status: Superseded
Proposed branch: lp://staging/~larochelle-brian/ubuntu-calendar-app/30MinIncrementsHackdays
Merge into: lp://staging/ubuntu-calendar-app
Diff against target: 42 lines (+16/-2)
1 file modified
NewEvent.qml (+16/-2)
To merge this branch: bzr merge lp://staging/~larochelle-brian/ubuntu-calendar-app/30MinIncrementsHackdays
Reviewer Review Type Date Requested Status
Kunal Parmar Needs Fixing
Review via email: mp+213056@code.staging.launchpad.net

This proposal supersedes a proposal from 2014-03-26.

This proposal has been superseded by a proposal from 2014-03-27.

Description of the change

Added logic to NewEvent.qml to choose a default of either 0 or 30 for minutes for the TimePicker. If minutes are past 30, an hour is added.

To post a comment you must log in.
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote : Posted in a previous version of this proposal

8 + startTime.defaultHour = (startDate.getMinutes() < 30) ? startDate.getHours() : startDate.getHours() + 1
19 + startTime.defaultMinute = (startDate.getMinutes() < 30) ? 30 : 0
20 + var popupObj = PopupUtils.open(timePicker,root,{"hour": startTime.defaultHour,"minute":startTime.defaultMinute});

Can we move above code to separate function ?

Revision history for this message
brian larochelle (larochelle-brian) wrote : Posted in a previous version of this proposal

sure.

I moved the logic to functions off the root of NewEvent {} and changed the ternary statements to if statements to improve readability.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

Code looks great, Thanks.

I will test and approve it.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

8 - var popupObj = PopupUtils.open(timePicker,root,{"hour": endDate.getHours(),"minute":endDate.getMinutes()});
39 + var popupObj = PopupUtils.open(timePicker,root,{"hour": root.hourForPickerFromDate(startDate),"minute":root.minuteForPickerFromDate(startDate)});

looks copy/paste error.

You are using startDate, instead of endDate

review: Needs Fixing
224. By brian larochelle

Fix copy paste error with rev 223

Revision history for this message
brian larochelle (larochelle-brian) wrote :

Opps. I shouldn't have let that slip by. Thats what I get for trying to sneak this in at work... resubmitting.
thanks for the review.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

:),

One more thing, that I am not sure of but.

Currently you are setting incremental value to time picker.

But do we need to set incremental time to start and end time label as well on construction ?

225. By brian larochelle

Fix copy/paste error.
Increment the endDate by 30 instread of 10

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: