Merge lp:~ubuntu-calendar-dev/ubuntu-calendar-app/5-Improved-EventDetails into lp:ubuntu-calendar-app
- 5-Improved-EventDetails
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Nekhelesh Ramananthan |
Approved revision: | 471 |
Merged at revision: | 474 |
Proposed branch: | lp:~ubuntu-calendar-dev/ubuntu-calendar-app/5-Improved-EventDetails |
Merge into: | lp:ubuntu-calendar-app |
Diff against target: |
652 lines (+195/-273) 4 files modified
EventDetails.qml (+175/-217) EventDetailsInfo.qml (+0/-44) NewEvent.qml (+15/-7) tests/autopilot/calendar_app/__init__.py (+5/-5) |
To merge this branch: | bzr merge lp:~ubuntu-calendar-dev/ubuntu-calendar-app/5-Improved-EventDetails |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nekhelesh Ramananthan | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+235333@code.launchpad.net |
Commit message
Redesigned Event Details page.
Description of the change
Redesigned Event Details page.
Initial design idea , ahoneybun
1. Removed EventDetailsInf
2. Removed Google maps, as discussed on IRC (http://
- 463. By Mihir Soni
-
uncommented po direcotry in CMake
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Nekhelesh Ramananthan (nik90) wrote : | # |
At the moment we have a regression,
Edit an event which is part of a series like "Calendar App Meeting". Pressing "Edit Series" works as expected. However when you click "Edit this", the new event page does not hold the details of the event.
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:468
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 464. By Mihir Soni
-
Resolved editing current occurence event issue
- 465. By Mihir Soni
-
merged
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:468
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 466. By Mihir Soni
-
Merge from trunk
- 467. By Mihir Soni
-
Fixed margin issues
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:468
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:467
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 468. By Mihir Soni
-
Fixed AP
- 469. By Mihir Soni
-
Merge from trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:469
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 470. By Mihir Soni
-
pep8 errors
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:470
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:470
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nekhelesh Ramananthan (nik90) wrote : | # |
Tested and works as expected. Nice work Mihir!
Just one minor quirk,
606 - text: i18n.tr("Repeats")
607 - subText: eventUtils.
608 + text: i18n.tr("This Happens")
Why this change? I thought we (popey) agreed to using "Repeats" rather than "This Happens".
Also why did you remove,
613 - ListItem.
- 471. By Nekhelesh Ramananthan
-
Fixed minor issue
Nekhelesh Ramananthan (nik90) wrote : | # |
I fixed the issues above. It looks good now.
Preview Diff
1 | === modified file 'EventDetails.qml' | |||
2 | --- EventDetails.qml 2014-09-21 09:39:21 +0000 | |||
3 | +++ EventDetails.qml 2014-09-24 11:32:08 +0000 | |||
4 | @@ -17,7 +17,7 @@ | |||
5 | 17 | */ | 17 | */ |
6 | 18 | import QtQuick 2.3 | 18 | import QtQuick 2.3 |
7 | 19 | import Ubuntu.Components 1.1 | 19 | import Ubuntu.Components 1.1 |
9 | 20 | import Ubuntu.Components.ListItems 1.0 | 20 | import Ubuntu.Components.ListItems 1.0 as ListItem |
10 | 21 | import Ubuntu.Components.Themes.Ambiance 1.0 | 21 | import Ubuntu.Components.Themes.Ambiance 1.0 |
11 | 22 | import Ubuntu.Components.Popups 1.0 | 22 | import Ubuntu.Components.Popups 1.0 |
12 | 23 | import QtOrganizer 5.0 | 23 | import QtOrganizer 5.0 |
13 | @@ -28,10 +28,8 @@ | |||
14 | 28 | id: root | 28 | id: root |
15 | 29 | objectName: "eventDetails" | 29 | objectName: "eventDetails" |
16 | 30 | 30 | ||
21 | 31 | property var event; | 31 | property var event |
22 | 32 | property string headerColor :"black" | 32 | property var model |
19 | 33 | property string detailColor :"grey" | ||
20 | 34 | property var model; | ||
23 | 35 | 33 | ||
24 | 36 | anchors{ | 34 | anchors{ |
25 | 37 | left: parent.left | 35 | left: parent.left |
26 | @@ -44,15 +42,14 @@ | |||
27 | 44 | title: i18n.tr("Event Details") | 42 | title: i18n.tr("Event Details") |
28 | 45 | 43 | ||
29 | 46 | Component.onCompleted: { | 44 | Component.onCompleted: { |
32 | 47 | 45 | showEvent(event) | |
31 | 48 | showEvent(event); | ||
33 | 49 | } | 46 | } |
34 | 50 | 47 | ||
35 | 51 | Connections{ | 48 | Connections{ |
36 | 52 | target: pageStack | 49 | target: pageStack |
37 | 53 | onCurrentPageChanged:{ | 50 | onCurrentPageChanged:{ |
38 | 54 | if( pageStack.currentPage === root) { | 51 | if( pageStack.currentPage === root) { |
40 | 55 | showEvent(event); | 52 | showEvent(event) |
41 | 56 | } | 53 | } |
42 | 57 | } | 54 | } |
43 | 58 | } | 55 | } |
44 | @@ -64,15 +61,16 @@ | |||
45 | 64 | function updateCollection(event) { | 61 | function updateCollection(event) { |
46 | 65 | var collection = model.collection( event.collectionId ); | 62 | var collection = model.collection( event.collectionId ); |
47 | 66 | calendarIndicator.color = collection.color | 63 | calendarIndicator.color = collection.color |
49 | 67 | calendarName.text = collection.name | 64 | eventInfo.color=collection.color |
50 | 65 | calendarName.text = i18n.tr("%1 Calendar").arg( collection.name) | ||
51 | 68 | } | 66 | } |
52 | 69 | 67 | ||
53 | 70 | function updateRecurrence( event ) { | 68 | function updateRecurrence( event ) { |
54 | 71 | var index = 0; | 69 | var index = 0; |
56 | 72 | if(event.recurrence) { | 70 | if (event.recurrence) { |
57 | 73 | if(event.recurrence.recurrenceRules[0] !== undefined){ | 71 | if(event.recurrence.recurrenceRules[0] !== undefined){ |
58 | 74 | var rule = event.recurrence.recurrenceRules[0]; | 72 | var rule = event.recurrence.recurrenceRules[0]; |
60 | 75 | recurrentHeader.value = eventUtils.getRecurrenceString(rule) | 73 | repeatLabel.text = eventUtils.getRecurrenceString(rule) |
61 | 76 | } | 74 | } |
62 | 77 | } | 75 | } |
63 | 78 | } | 76 | } |
64 | @@ -81,7 +79,7 @@ | |||
65 | 81 | var attendees = event.attendees; | 79 | var attendees = event.attendees; |
66 | 82 | contactModel.clear(); | 80 | contactModel.clear(); |
67 | 83 | if( attendees !== undefined ) { | 81 | if( attendees !== undefined ) { |
69 | 84 | for( var j = 0 ; j < attendees.length ; ++j ) { | 82 | for (var j = 0 ; j < attendees.length ; ++j) { |
70 | 85 | contactModel.append( {"name": attendees[j].name,"participationStatus": attendees[j].participationStatus } ); | 83 | contactModel.append( {"name": attendees[j].name,"participationStatus": attendees[j].participationStatus } ); |
71 | 86 | } | 84 | } |
72 | 87 | } | 85 | } |
73 | @@ -92,43 +90,25 @@ | |||
74 | 92 | if( reminder ) { | 90 | if( reminder ) { |
75 | 93 | for(var i=0; i<reminderModel.count; i++) { | 91 | for(var i=0; i<reminderModel.count; i++) { |
76 | 94 | if(reminder.secondsBeforeStart === reminderModel.get(i).value) | 92 | if(reminder.secondsBeforeStart === reminderModel.get(i).value) |
78 | 95 | reminderHeader.value = reminderModel.get(i).label | 93 | reminderHeader.subText = reminderModel.get(i).label |
79 | 96 | } | 94 | } |
80 | 97 | } else { | 95 | } else { |
82 | 98 | reminderHeader.value = reminderModel.get(0).label | 96 | reminderHeader.subText = reminderModel.get(0).label |
83 | 99 | } | 97 | } |
84 | 100 | } | 98 | } |
85 | 101 | 99 | ||
86 | 102 | function updateLocation(event) { | 100 | function updateLocation(event) { |
87 | 103 | if( event.location ) { | 101 | if( event.location ) { |
100 | 104 | locationLabel.text = event.location; | 102 | locationLabel.text = i18n.tr("%1").arg(event.location) |
89 | 105 | |||
90 | 106 | // FIXME: need to cache map image to avoid duplicate download every time | ||
91 | 107 | var imageSrc = "http://maps.googleapis.com/maps/api/staticmap?center="+event.location+ | ||
92 | 108 | "&markers=color:red|"+event.location+"&zoom=15&size="+mapContainer.width+ | ||
93 | 109 | "x"+mapContainer.height+"&sensor=false"; | ||
94 | 110 | mapImage.source = imageSrc; | ||
95 | 111 | } | ||
96 | 112 | else { | ||
97 | 113 | // TODO: use different color for empty text | ||
98 | 114 | locationLabel.text = i18n.tr("Not specified") | ||
99 | 115 | mapImage.source = ""; | ||
101 | 116 | } | 103 | } |
102 | 117 | } | 104 | } |
103 | 118 | 105 | ||
104 | 119 | function showEvent(e) { | 106 | function showEvent(e) { |
117 | 120 | // TRANSLATORS: this is a time formatting string, | 107 | var startTime = e.startDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) |
118 | 121 | // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions | 108 | var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat) |
119 | 122 | // It's used to display the start and end times of an event in the event details | 109 | |
120 | 123 | // and new event views | 110 | dateLabel.text = e.allDay === true ? i18n.tr("%1 (All Day)").arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat)) |
121 | 124 | var timeFormat = Qt.locale().timeFormat(Locale.ShortFormat); | 111 | : e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat) + ", " +startTime + " - " + endTime; |
110 | 125 | // TRANSLATORS: this is a date formatting string, | ||
111 | 126 | // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions | ||
112 | 127 | // It's used to display the date in the event details view | ||
113 | 128 | var dateFormat = i18n.tr("MMMM dd, yyyy") | ||
114 | 129 | eventDate.value = e.startDateTime.toLocaleString(Qt.locale(),dateFormat); | ||
115 | 130 | var startTime = e.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat); | ||
116 | 131 | var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), timeFormat); | ||
122 | 132 | 112 | ||
123 | 133 | if( e.itemType === Type.EventOccurrence ){ | 113 | if( e.itemType === Type.EventOccurrence ){ |
124 | 134 | var requestId = -1; | 114 | var requestId = -1; |
125 | @@ -141,15 +121,6 @@ | |||
126 | 141 | }); | 121 | }); |
127 | 142 | requestId = model.fetchItems([e.parentId]); | 122 | requestId = model.fetchItems([e.parentId]); |
128 | 143 | } | 123 | } |
129 | 144 | |||
130 | 145 | allDayEventCheckbox.checked = e.allDay; | ||
131 | 146 | |||
132 | 147 | startHeader.visible = !e.allDay; | ||
133 | 148 | endHeader.visible = !e.allDay; | ||
134 | 149 | |||
135 | 150 | startHeader.value = startTime; | ||
136 | 151 | endHeader.value = endTime; | ||
137 | 152 | |||
138 | 153 | // This is the event title | 124 | // This is the event title |
139 | 154 | if( e.displayLabel) { | 125 | if( e.displayLabel) { |
140 | 155 | titleLabel.text = e.displayLabel; | 126 | titleLabel.text = e.displayLabel; |
141 | @@ -170,7 +141,6 @@ | |||
142 | 170 | updateLocation(e); | 141 | updateLocation(e); |
143 | 171 | } | 142 | } |
144 | 172 | 143 | ||
145 | 173 | |||
146 | 174 | Keys.onEscapePressed: { | 144 | Keys.onEscapePressed: { |
147 | 175 | pageStack.pop(); | 145 | pageStack.pop(); |
148 | 176 | } | 146 | } |
149 | @@ -181,44 +151,41 @@ | |||
150 | 181 | } | 151 | } |
151 | 182 | } | 152 | } |
152 | 183 | 153 | ||
164 | 184 | tools: ToolbarItems { | 154 | head.actions: [ |
165 | 185 | ToolbarButton { | 155 | Action { |
166 | 186 | action:Action { | 156 | text: i18n.tr("Delete"); |
167 | 187 | text: i18n.tr("Delete"); | 157 | objectName: "delete" |
168 | 188 | objectName: "delete" | 158 | iconName: "delete" |
169 | 189 | iconName: "delete" | 159 | onTriggered: { |
170 | 190 | onTriggered: { | 160 | var dialog = PopupUtils.open(Qt.resolvedUrl("DeleteConfirmationDialog.qml"),root,{"event": event}); |
171 | 191 | var dialog = PopupUtils.open(Qt.resolvedUrl("DeleteConfirmationDialog.qml"),root,{"event": event}); | 161 | dialog.deleteEvent.connect( function(eventId){ |
172 | 192 | dialog.deleteEvent.connect( function(eventId){ | 162 | model.removeItem(eventId); |
173 | 193 | model.removeItem(eventId); | 163 | pageStack.pop(); |
174 | 194 | pageStack.pop(); | 164 | }); |
175 | 165 | } | ||
176 | 166 | }, | ||
177 | 167 | |||
178 | 168 | Action { | ||
179 | 169 | text: i18n.tr("Edit"); | ||
180 | 170 | objectName: "edit" | ||
181 | 171 | iconName: "edit"; | ||
182 | 172 | onTriggered: { | ||
183 | 173 | if( event.itemType === Type.EventOccurrence ) { | ||
184 | 174 | var dialog = PopupUtils.open(Qt.resolvedUrl("EditEventConfirmationDialog.qml"),root,{"event": event}); | ||
185 | 175 | dialog.editEvent.connect( function(eventId){ | ||
186 | 176 | if( eventId === event.parentId ) { | ||
187 | 177 | pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"event":internal.parentEvent,"model":model}); | ||
188 | 178 | } else { | ||
189 | 179 | pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"event":event,"model":model}); | ||
190 | 180 | } | ||
191 | 195 | }); | 181 | }); |
192 | 182 | } else { | ||
193 | 183 | pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"event":event,"model":model}); | ||
194 | 196 | } | 184 | } |
195 | 197 | } | 185 | } |
196 | 198 | } | 186 | } |
197 | 187 | ] | ||
198 | 199 | 188 | ||
199 | 200 | ToolbarButton { | ||
200 | 201 | action:Action { | ||
201 | 202 | text: i18n.tr("Edit"); | ||
202 | 203 | objectName: "edit" | ||
203 | 204 | iconName: "edit"; | ||
204 | 205 | onTriggered: { | ||
205 | 206 | if( event.itemType === Type.EventOccurrence ) { | ||
206 | 207 | var dialog = PopupUtils.open(Qt.resolvedUrl("EditEventConfirmationDialog.qml"),root,{"event": event}); | ||
207 | 208 | dialog.editEvent.connect( function(eventId){ | ||
208 | 209 | if( eventId === event.parentId ) { | ||
209 | 210 | pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"event":internal.parentEvent,"model":model}); | ||
210 | 211 | } else { | ||
211 | 212 | pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"event":event,"model":model}); | ||
212 | 213 | } | ||
213 | 214 | }); | ||
214 | 215 | } else { | ||
215 | 216 | pageStack.push(Qt.resolvedUrl("NewEvent.qml"),{"event":event,"model":model}); | ||
216 | 217 | } | ||
217 | 218 | } | ||
218 | 219 | } | ||
219 | 220 | } | ||
220 | 221 | } | ||
221 | 222 | EventUtils{ | 189 | EventUtils{ |
222 | 223 | id:eventUtils | 190 | id:eventUtils |
223 | 224 | } | 191 | } |
224 | @@ -241,59 +208,81 @@ | |||
225 | 241 | 208 | ||
226 | 242 | Flickable{ | 209 | Flickable{ |
227 | 243 | id: flicable | 210 | id: flicable |
233 | 244 | width: parent.width | 211 | |
234 | 245 | height: parent.height | 212 | clip: interactive |
235 | 246 | clip: true | 213 | anchors.fill: parent |
236 | 247 | 214 | interactive: contentHeight > height | |
237 | 248 | contentHeight: column.height + units.gu(3) /*top margin + spacing */ | 215 | |
238 | 249 | contentWidth: parent.width | 216 | contentWidth: parent.width |
241 | 250 | 217 | contentHeight: column.height + eventInfo.height + units.gu(3) /*top margin + spacing */ | |
242 | 251 | interactive: contentHeight > height | 218 | |
243 | 219 | Rectangle{ | ||
244 | 220 | id: eventInfo | ||
245 | 221 | |||
246 | 222 | width: parent.width | ||
247 | 223 | height: eventInfoList.height + units.gu(5) | ||
248 | 224 | |||
249 | 225 | Column{ | ||
250 | 226 | id:eventInfoList | ||
251 | 227 | |||
252 | 228 | anchors { | ||
253 | 229 | left: parent.left | ||
254 | 230 | right: parent.right | ||
255 | 231 | top: parent.top | ||
256 | 232 | margins: units.gu(2) | ||
257 | 233 | } | ||
258 | 234 | |||
259 | 235 | spacing: units.gu(0.5) | ||
260 | 236 | |||
261 | 237 | Label{ | ||
262 | 238 | id: titleLabel | ||
263 | 239 | objectName: "titleLabel" | ||
264 | 240 | fontSize: "x-large" | ||
265 | 241 | width: parent.width | ||
266 | 242 | wrapMode: Text.WordWrap | ||
267 | 243 | color: "white" | ||
268 | 244 | } | ||
269 | 245 | |||
270 | 246 | Label{ | ||
271 | 247 | id: dateLabel | ||
272 | 248 | objectName: "dateLabel" | ||
273 | 249 | color: "white" | ||
274 | 250 | fontSize: "medium" | ||
275 | 251 | width: parent.width | ||
276 | 252 | wrapMode: Text.WordWrap | ||
277 | 253 | } | ||
278 | 254 | |||
279 | 255 | Label{ | ||
280 | 256 | id: repeatLabel | ||
281 | 257 | objectName: "repeatLabel" | ||
282 | 258 | color: "white" | ||
283 | 259 | fontSize: "small" | ||
284 | 260 | width: parent.width | ||
285 | 261 | wrapMode: Text.WordWrap | ||
286 | 262 | visible: repeatLabel.text !== "" | ||
287 | 263 | } | ||
288 | 264 | |||
289 | 265 | Label{ | ||
290 | 266 | id: locationLabel | ||
291 | 267 | objectName: "locationLabel" | ||
292 | 268 | color: "white" | ||
293 | 269 | fontSize: "small" | ||
294 | 270 | width: parent.width | ||
295 | 271 | wrapMode: Text.WordWrap | ||
296 | 272 | visible: locationLabel.text !== "" | ||
297 | 273 | } | ||
298 | 274 | } | ||
299 | 275 | } | ||
300 | 252 | 276 | ||
301 | 253 | Column{ | 277 | Column{ |
302 | 254 | id: column | 278 | id: column |
303 | 279 | |||
304 | 255 | spacing: units.gu(1) | 280 | spacing: units.gu(1) |
305 | 256 | anchors{ | 281 | anchors{ |
308 | 257 | top:parent.top | 282 | top: eventInfo.bottom |
307 | 258 | topMargin: units.gu(2) | ||
309 | 259 | right: parent.right | 283 | right: parent.right |
310 | 260 | rightMargin: units.gu(2) | ||
311 | 261 | left:parent.left | 284 | left:parent.left |
347 | 262 | leftMargin: units.gu(2) | 285 | margins: units.gu(2) |
313 | 263 | } | ||
314 | 264 | property int timeLabelMaxLen: Math.max( startHeader.headerWidth, endHeader.headerWidth,eventDate.headerWidth)// Dynamic Width | ||
315 | 265 | EventDetailsInfo{ | ||
316 | 266 | id: eventDate | ||
317 | 267 | xMargin:column.timeLabelMaxLen | ||
318 | 268 | header: i18n.tr("Date") | ||
319 | 269 | } | ||
320 | 270 | EventDetailsInfo{ | ||
321 | 271 | id: startHeader | ||
322 | 272 | xMargin:column.timeLabelMaxLen | ||
323 | 273 | header: i18n.tr("Start") | ||
324 | 274 | } | ||
325 | 275 | EventDetailsInfo{ | ||
326 | 276 | id: endHeader | ||
327 | 277 | xMargin: column.timeLabelMaxLen | ||
328 | 278 | header: i18n.tr("End") | ||
329 | 279 | } | ||
330 | 280 | Row { | ||
331 | 281 | width: parent.width | ||
332 | 282 | spacing: units.gu(1) | ||
333 | 283 | anchors.margins: units.gu(0.5) | ||
334 | 284 | visible: allDayEventCheckbox.checked | ||
335 | 285 | |||
336 | 286 | Label { | ||
337 | 287 | text: i18n.tr("All day event") | ||
338 | 288 | anchors.verticalCenter: allDayEventCheckbox.verticalCenter | ||
339 | 289 | color: headerColor | ||
340 | 290 | } | ||
341 | 291 | |||
342 | 292 | CheckBox { | ||
343 | 293 | id: allDayEventCheckbox | ||
344 | 294 | checked: false | ||
345 | 295 | enabled: false | ||
346 | 296 | } | ||
348 | 297 | } | 286 | } |
349 | 298 | 287 | ||
350 | 299 | Row{ | 288 | Row{ |
351 | @@ -302,109 +291,78 @@ | |||
352 | 302 | UbuntuShape{ | 291 | UbuntuShape{ |
353 | 303 | id: calendarIndicator | 292 | id: calendarIndicator |
354 | 304 | width: parent.height | 293 | width: parent.height |
356 | 305 | height: parent.height | 294 | height: width |
357 | 306 | anchors.verticalCenter: parent.verticalCenter | 295 | anchors.verticalCenter: parent.verticalCenter |
358 | 307 | } | 296 | } |
359 | 308 | Label{ | 297 | Label{ |
360 | 309 | id:calendarName | 298 | id:calendarName |
361 | 310 | objectName: "calendarName" | 299 | objectName: "calendarName" |
362 | 311 | anchors.verticalCenter: parent.verticalCenter | 300 | anchors.verticalCenter: parent.verticalCenter |
363 | 312 | color: headerColor | ||
364 | 313 | } | 301 | } |
365 | 314 | } | 302 | } |
366 | 315 | 303 | ||
367 | 316 | ThinDivider{} | ||
368 | 317 | Label{ | ||
369 | 318 | id: titleLabel | ||
370 | 319 | objectName: "titleLabel" | ||
371 | 320 | fontSize: "large" | ||
372 | 321 | width: parent.width | ||
373 | 322 | wrapMode: Text.WordWrap | ||
374 | 323 | color: headerColor | ||
375 | 324 | } | ||
376 | 325 | Label{ | 304 | Label{ |
377 | 326 | id: descLabel | 305 | id: descLabel |
378 | 327 | objectName: "descriptionLabel" | 306 | objectName: "descriptionLabel" |
459 | 328 | wrapMode: Text.WordWrap | 307 | visible: text != "" |
460 | 329 | fontSize: "small" | 308 | width: parent.width |
461 | 330 | width: parent.width | 309 | wrapMode: Text.WordWrap |
462 | 331 | color: detailColor | 310 | } |
463 | 332 | } | 311 | |
464 | 333 | ThinDivider{} | 312 | Column { |
465 | 334 | EventDetailsInfo{ | 313 | anchors{ |
466 | 335 | id: mapHeader | 314 | right: parent.right |
467 | 336 | header: i18n.tr("Location") | 315 | left:parent.left |
468 | 337 | } | 316 | margins: units.gu(-2) |
469 | 338 | Label{ | 317 | } |
470 | 339 | id: locationLabel | 318 | |
471 | 340 | objectName: "locationLabel" | 319 | ListItem.Header { |
472 | 341 | fontSize: "medium" | 320 | text: i18n.tr("Guests") |
473 | 342 | width: parent.width | 321 | visible: contactModel.count !== 0 |
474 | 343 | wrapMode: Text.WordWrap | 322 | } |
475 | 344 | color: detailColor | 323 | |
476 | 345 | } | 324 | //Guest Entery Model starts |
477 | 346 | 325 | Column{ | |
478 | 347 | //map control with location | 326 | id: contactList |
479 | 348 | Rectangle{ | 327 | objectName: 'contactList' |
480 | 349 | id: mapContainer | 328 | |
481 | 350 | width:parent.width | 329 | anchors { |
482 | 351 | height: units.gu(10) | 330 | left: parent.left |
483 | 352 | visible: mapImage.status == Image.Ready | 331 | right: parent.right |
484 | 353 | 332 | } | |
485 | 354 | Image { | 333 | |
486 | 355 | id: mapImage | 334 | ListModel { |
487 | 356 | anchors.fill: parent | 335 | id: contactModel |
488 | 357 | opacity: 0.5 | 336 | } |
489 | 358 | } | 337 | |
490 | 359 | } | 338 | Repeater{ |
491 | 360 | ThinDivider{} | 339 | model: contactModel |
492 | 361 | Label{ | 340 | delegate: ListItem.Standard { |
493 | 362 | text: i18n.tr("Guests"); | 341 | Label { |
494 | 363 | fontSize: "medium" | 342 | text: name |
495 | 364 | color: headerColor | 343 | objectName: "eventGuest%1".arg(index) |
496 | 365 | font.bold: true | 344 | color: UbuntuColors.midAubergine |
497 | 366 | } | 345 | anchors { |
498 | 367 | //Guest Entery Model starts | 346 | left: parent.left |
499 | 368 | Column{ | 347 | leftMargin: units.gu(2) |
500 | 369 | id: contactList | 348 | verticalCenter: parent.verticalCenter |
501 | 370 | objectName: 'contactList' | 349 | } |
502 | 371 | spacing: units.gu(1) | 350 | } |
503 | 372 | width: parent.width | 351 | |
504 | 373 | clip: true | 352 | control: CheckBox { |
505 | 374 | ListModel { | 353 | enabled: false |
506 | 375 | id: contactModel | 354 | checked: participationStatus |
507 | 376 | } | 355 | } |
508 | 377 | Repeater{ | 356 | } |
509 | 378 | model: contactModel | 357 | } |
510 | 379 | delegate: Row{ | 358 | } |
511 | 380 | spacing: units.gu(1) | 359 | //Guest Entries ends |
512 | 381 | CheckBox{ | 360 | |
513 | 382 | checked: participationStatus | 361 | ListItem.Subtitled { |
514 | 383 | enabled: false | 362 | id: reminderHeader |
515 | 384 | } | 363 | text: i18n.tr("Reminder") |
516 | 385 | Label { | 364 | } |
517 | 386 | text:name | 365 | } |
438 | 387 | anchors.verticalCenter: parent.verticalCenter | ||
439 | 388 | color: detailColor | ||
440 | 389 | } | ||
441 | 390 | } | ||
442 | 391 | } | ||
443 | 392 | } | ||
444 | 393 | |||
445 | 394 | //Guest Entries ends | ||
446 | 395 | ThinDivider{} | ||
447 | 396 | property int recurranceAreaMaxWidth: Math.max( recurrentHeader.headerWidth, reminderHeader.headerWidth) //Dynamic Height | ||
448 | 397 | EventDetailsInfo{ | ||
449 | 398 | id: recurrentHeader | ||
450 | 399 | xMargin: column.recurranceAreaMaxWidth | ||
451 | 400 | header: i18n.tr("Repeats") | ||
452 | 401 | } | ||
453 | 402 | EventDetailsInfo{ | ||
454 | 403 | id: reminderHeader | ||
455 | 404 | xMargin: column.recurranceAreaMaxWidth | ||
456 | 405 | header: i18n.tr("Reminder") | ||
457 | 406 | } | ||
458 | 407 | |||
518 | 408 | } | 366 | } |
519 | 409 | } | 367 | } |
520 | 410 | } | 368 | } |
521 | 411 | 369 | ||
522 | === removed file 'EventDetailsInfo.qml' | |||
523 | --- EventDetailsInfo.qml 2014-09-20 10:45:35 +0000 | |||
524 | +++ EventDetailsInfo.qml 1970-01-01 00:00:00 +0000 | |||
525 | @@ -1,44 +0,0 @@ | |||
526 | 1 | /* | ||
527 | 2 | * Copyright (C) 2013-2014 Canonical Ltd | ||
528 | 3 | * | ||
529 | 4 | * This file is part of Ubuntu Calendar App | ||
530 | 5 | * | ||
531 | 6 | * Ubuntu Calendar App is free software: you can redistribute it and/or modify | ||
532 | 7 | * it under the terms of the GNU General Public License version 3 as | ||
533 | 8 | * published by the Free Software Foundation. | ||
534 | 9 | * | ||
535 | 10 | * Ubuntu Calendar App is distributed in the hope that it will be useful, | ||
536 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
537 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
538 | 13 | * GNU General Public License for more details. | ||
539 | 14 | * | ||
540 | 15 | * You should have received a copy of the GNU General Public License | ||
541 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
542 | 17 | */ | ||
543 | 18 | import QtQuick 2.3 | ||
544 | 19 | import Ubuntu.Components 1.1 | ||
545 | 20 | import Ubuntu.Components.Themes.Ambiance 1.0 | ||
546 | 21 | Item | ||
547 | 22 | { | ||
548 | 23 | property alias header: header.text | ||
549 | 24 | property alias value: value.text | ||
550 | 25 | property string headerColor :"black" | ||
551 | 26 | property string detailColor :"grey" | ||
552 | 27 | property int xMargin | ||
553 | 28 | property int headerWidth: header.width | ||
554 | 29 | width: parent.width | ||
555 | 30 | height: header.height | ||
556 | 31 | Label{ | ||
557 | 32 | id: header | ||
558 | 33 | color: headerColor | ||
559 | 34 | font.bold: true | ||
560 | 35 | fontSize: "medium" | ||
561 | 36 | anchors.left: parent.left | ||
562 | 37 | } | ||
563 | 38 | Label{ | ||
564 | 39 | id:value | ||
565 | 40 | x: xMargin + units.gu(1) | ||
566 | 41 | color: detailColor | ||
567 | 42 | fontSize: "medium" | ||
568 | 43 | } | ||
569 | 44 | } | ||
570 | 45 | 0 | ||
571 | === modified file 'NewEvent.qml' | |||
572 | --- NewEvent.qml 2014-09-22 06:51:06 +0000 | |||
573 | +++ NewEvent.qml 2014-09-24 11:32:08 +0000 | |||
574 | @@ -114,10 +114,11 @@ | |||
575 | 114 | //Editing Event | 114 | //Editing Event |
576 | 115 | function editEvent(e) { | 115 | function editEvent(e) { |
577 | 116 | //If there is a ReccruenceRule use that , else create fresh Recurrence Object. | 116 | //If there is a ReccruenceRule use that , else create fresh Recurrence Object. |
582 | 117 | rule = (e.recurrence.recurrenceRules[0] === undefined || e.recurrence.recurrenceRules[0] === null) ? | 117 | if(e.itemType === Type.Event){ |
583 | 118 | Qt.createQmlObject("import QtOrganizer 5.0; RecurrenceRule {}", event.recurrence,"EventRepetition.qml") | 118 | rule = (e.recurrence.recurrenceRules[0] === undefined || e.recurrence.recurrenceRules[0] === null) ? |
584 | 119 | : e.recurrence.recurrenceRules[0]; | 119 | Qt.createQmlObject("import QtOrganizer 5.0; RecurrenceRule {}", event.recurrence,"EventRepetition.qml") |
585 | 120 | 120 | : e.recurrence.recurrenceRules[0]; | |
586 | 121 | } | ||
587 | 121 | startDate =new Date(e.startDateTime); | 122 | startDate =new Date(e.startDateTime); |
588 | 122 | endDate = new Date(e.endDateTime); | 123 | endDate = new Date(e.endDateTime); |
589 | 123 | 124 | ||
590 | @@ -587,7 +588,10 @@ | |||
591 | 587 | } | 588 | } |
592 | 588 | } | 589 | } |
593 | 589 | 590 | ||
595 | 590 | ListItem.ThinDivider {} | 591 | ListItem.ThinDivider { |
596 | 592 | visible: event.itemType === Type.Event | ||
597 | 593 | } | ||
598 | 594 | |||
599 | 591 | } | 595 | } |
600 | 592 | 596 | ||
601 | 593 | ListItem.Subtitled{ | 597 | ListItem.Subtitled{ |
602 | @@ -603,11 +607,13 @@ | |||
603 | 603 | progression: true | 607 | progression: true |
604 | 604 | visible: event.itemType === Type.Event | 608 | visible: event.itemType === Type.Event |
605 | 605 | text: i18n.tr("Repeats") | 609 | text: i18n.tr("Repeats") |
607 | 606 | subText: eventUtils.getRecurrenceString(rule) | 610 | subText: event.itemType === Type.Event ? eventUtils.getRecurrenceString(rule) : "" |
608 | 607 | onClicked: pageStack.push(Qt.resolvedUrl("EventRepetition.qml"),{"rule": rule,"date":date,"isEdit":isEdit}); | 611 | onClicked: pageStack.push(Qt.resolvedUrl("EventRepetition.qml"),{"rule": rule,"date":date,"isEdit":isEdit}); |
609 | 608 | } | 612 | } |
610 | 609 | 613 | ||
612 | 610 | ListItem.ThinDivider {} | 614 | ListItem.ThinDivider { |
613 | 615 | visible: event.itemType === Type.Event | ||
614 | 616 | } | ||
615 | 611 | 617 | ||
616 | 612 | ListItem.Subtitled{ | 618 | ListItem.Subtitled{ |
617 | 613 | id:eventReminder | 619 | id:eventReminder |
618 | @@ -638,6 +644,8 @@ | |||
619 | 638 | "reminderModel": reminderModel, | 644 | "reminderModel": reminderModel, |
620 | 639 | "eventTitle": titleEdit.text}) | 645 | "eventTitle": titleEdit.text}) |
621 | 640 | } | 646 | } |
622 | 647 | |||
623 | 648 | ListItem.ThinDivider {} | ||
624 | 641 | } | 649 | } |
625 | 642 | } | 650 | } |
626 | 643 | // used to keep the field visible when the keyboard appear or dismiss | 651 | // used to keep the field visible when the keyboard appear or dismiss |
627 | 644 | 652 | ||
628 | === modified file 'tests/autopilot/calendar_app/__init__.py' | |||
629 | --- tests/autopilot/calendar_app/__init__.py 2014-09-19 12:26:42 +0000 | |||
630 | +++ tests/autopilot/calendar_app/__init__.py 2014-09-24 11:32:08 +0000 | |||
631 | @@ -682,7 +682,7 @@ | |||
632 | 682 | return data.Event(calendar, name, description, location, guests) | 682 | return data.Event(calendar, name, description, location, guests) |
633 | 683 | 683 | ||
634 | 684 | def _get_calendar(self): | 684 | def _get_calendar(self): |
636 | 685 | return self._get_label_text('calendarName') | 685 | return self._get_label_text('calendarName').split(" ")[0] |
637 | 686 | 686 | ||
638 | 687 | def _get_name(self): | 687 | def _get_name(self): |
639 | 688 | return self._get_label_text('titleLabel') | 688 | return self._get_label_text('titleLabel') |
640 | @@ -700,10 +700,10 @@ | |||
641 | 700 | guests = [] | 700 | guests = [] |
642 | 701 | contacts_list = self.select_single( | 701 | contacts_list = self.select_single( |
643 | 702 | 'QQuickColumn', objectName='contactList') | 702 | 'QQuickColumn', objectName='contactList') |
648 | 703 | guest_labels = contacts_list.select_many('Label') | 703 | guests.append( |
649 | 704 | for label in guest_labels: | 704 | contacts_list.select_single( |
650 | 705 | guests.append(label.text) | 705 | "Label", |
651 | 706 | 706 | objectName='eventGuest0').text) | |
652 | 707 | return guests | 707 | return guests |
653 | 708 | 708 | ||
654 | 709 | 709 |
PASSED: Continuous integration, rev:463 91.189. 93.70:8080/ job/ubuntu- calendar- app-ci/ 832/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 401 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 401/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/ubuntu- calendar- app-utopic- amd64-ci/ 390
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- calendar- app-ci/ 832/rebuild
http://