ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #02475
[Merge] lp:~gary-wzl77/ubuntu-calendar-app/fix-1460433 into lp:ubuntu-calendar-app
Gary.Wang has proposed merging lp:~gary-wzl77/ubuntu-calendar-app/fix-1460433 into lp:ubuntu-calendar-app.
Requested reviews:
Alan Pope (popey)
For more details, see:
https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix-1460433/+merge/260688
--
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.
=== modified file 'TimeLineBase.qml'
--- TimeLineBase.qml 2015-03-20 17:32:03 +0000
+++ TimeLineBase.qml 2015-06-01 09:05:25 +0000
@@ -219,13 +219,41 @@
}
function assignBubbleProperties(eventBubble, event, depth, sizeOfRow) {
- var hour = event.startDateTime.getHours();
- var yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
+ var yPos = 0;
+ var height = 0;
+ var hour = 0;
+ var durationMin = 0;
+
+ if (event.endDateTime.getDate() - day.getDate() == 0 &&
+ event.startDateTime.getDate() - day.getDate() == 0) {
+ hour = event.startDateTime.getHours();
+ yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
+ durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;
+ durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
+ }
+ if (event.endDateTime.getDate() - day.getDate() == 0 &&
+ event.startDateTime.getDate() - day.getDate() < 0) {
+ hour = 0;
+ yPos = 0;
+ durationMin = event.endDateTime.getHours() * 60;
+ durationMin += event.endDateTime.getMinutes();
+ }
+ if (event.endDateTime.getDate() - day.getDate() > 0 &&
+ event.startDateTime.getDate() - day.getDate() == 0) {
+ hour = event.startDateTime.getHours();
+ yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
+ durationMin = (24 - event.startDateTime.getHours()) * 60;
+ }
+
+ if (event.endDateTime.getDate() - day.getDate() > 0 &&
+ event.startDateTime.getDate() - day.getDate() < 0) {
+ hour = 0;
+ yPos = 0;
+ durationMin = 24 * 60;
+ }
+
eventBubble.y = yPos;
-
- var durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;
- durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
- var height = (durationMin * hourHeight )/ 60;
+ height = (durationMin * hourHeight )/ 60;
eventBubble.height = (height > eventBubble.minimumHeight) ? height:eventBubble.minimumHeight ;
eventBubble.model = bubbleOverLay.model
=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot 2015-04-17 05:05:13 +0000
+++ po/com.ubuntu.calendar.pot 2015-06-01 09:05:25 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-04-17 07:04+0200\n"
+"POT-Creation-Date: 2015-06-01 16:53+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -37,7 +37,7 @@
#. TRANSLATORS: the first argument (%1) refers to a start time for an event,
#. while the second one (%2) refers to the end time
-#: ../AgendaView.qml:168 ../EventBubble.qml:131
+#: ../AgendaView.qml:168 ../EventBubble.qml:133
#, qt-format
msgid "%1 - %2"
msgstr ""
@@ -59,7 +59,7 @@
msgstr[0] ""
msgstr[1] ""
-#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:59
+#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:60
msgid "Calendars"
msgstr ""
@@ -77,15 +77,15 @@
msgid "Syncing"
msgstr ""
-#: ../CalendarChoicePopup.qml:70
+#: ../CalendarChoicePopup.qml:71
msgid "Add new Calendar"
msgstr ""
-#: ../ColorPickerDialog.qml:24
+#: ../ColorPickerDialog.qml:25
msgid "Select Color"
msgstr ""
-#: ../ColorPickerDialog.qml:53 ../DeleteConfirmationDialog.qml:60
+#: ../ColorPickerDialog.qml:55 ../DeleteConfirmationDialog.qml:60
#: ../EditEventConfirmationDialog.qml:53
msgid "Cancel"
msgstr ""
@@ -101,7 +101,7 @@
#. TRANSLATORS: this is a time formatting string,
#. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
#. It's used in the header of the month and week views
-#: ../DayView.qml:59 ../MonthView.qml:57 ../WeekView.qml:61
+#: ../DayView.qml:59 ../MonthView.qml:58 ../WeekView.qml:61
msgid "MMMM yyyy"
msgstr ""
@@ -136,7 +136,7 @@
msgid "Delete"
msgstr ""
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:283
+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:296
msgid "Edit Event"
msgstr ""
@@ -154,18 +154,18 @@
msgid "Edit this"
msgstr ""
-#: ../EventActions.qml:50 ../NewEvent.qml:283
+#: ../EventActions.qml:50 ../NewEvent.qml:296
msgid "New Event"
msgstr ""
#. TRANSLATORS: the first argument (%1) refers to a time for an event,
#. while the second one (%2) refers to title of event
-#: ../EventBubble.qml:142 ../EventBubble.qml:147
+#: ../EventBubble.qml:144 ../EventBubble.qml:149
#, qt-format
msgid "%1 <b>%2</b>"
msgstr ""
-#: ../EventDetails.qml:42 ../NewEvent.qml:393
+#: ../EventDetails.qml:42 ../NewEvent.qml:407
msgid "Event Details"
msgstr ""
@@ -189,11 +189,11 @@
msgid "Edit"
msgstr ""
-#: ../EventDetails.qml:347 ../NewEvent.qml:479
+#: ../EventDetails.qml:347 ../NewEvent.qml:509
msgid "Guests"
msgstr ""
-#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:578
+#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:606
msgid "Reminder"
msgstr ""
@@ -201,26 +201,26 @@
#. and it is shown as the header of the page to choose repetition
#. and as the header of the list item that shows the repetition
#. summary in the page that displays the event details
-#: ../EventRepetition.qml:41 ../EventRepetition.qml:132
+#: ../EventRepetition.qml:41 ../EventRepetition.qml:150
msgid "Repeat"
msgstr ""
-#: ../EventRepetition.qml:151
+#: ../EventRepetition.qml:169
msgid "Repeats On:"
msgstr ""
-#: ../EventRepetition.qml:196
+#: ../EventRepetition.qml:214
msgid "Recurring event ends"
msgstr ""
#. TRANSLATORS: this refers to how often a recurrent event repeats
#. and it is shown as the header of the option selector to choose
#. its repetition
-#: ../EventRepetition.qml:219 ../NewEvent.qml:560
+#: ../EventRepetition.qml:237 ../NewEvent.qml:590
msgid "Repeats"
msgstr ""
-#: ../EventRepetition.qml:244
+#: ../EventRepetition.qml:262
msgid "Date"
msgstr ""
@@ -259,51 +259,51 @@
msgid "After Date"
msgstr ""
-#: ../NewEvent.qml:59
+#: ../NewEvent.qml:61
msgid "Save"
msgstr ""
-#: ../NewEvent.qml:165
+#: ../NewEvent.qml:170
msgid "End time can't be before start time"
msgstr ""
-#: ../NewEvent.qml:293
+#: ../NewEvent.qml:306
msgid "Error"
msgstr ""
-#: ../NewEvent.qml:295
+#: ../NewEvent.qml:308
msgid "OK"
msgstr ""
-#: ../NewEvent.qml:347
+#: ../NewEvent.qml:361
msgid "From"
msgstr ""
-#: ../NewEvent.qml:360
+#: ../NewEvent.qml:374
msgid "To"
msgstr ""
-#: ../NewEvent.qml:377
+#: ../NewEvent.qml:391
msgid "All day event"
msgstr ""
-#: ../NewEvent.qml:406
+#: ../NewEvent.qml:420
msgid "Event Name"
msgstr ""
-#: ../NewEvent.qml:419
+#: ../NewEvent.qml:438
msgid "Description"
msgstr ""
-#: ../NewEvent.qml:432
+#: ../NewEvent.qml:456
msgid "Location"
msgstr ""
-#: ../NewEvent.qml:441 com.ubuntu.calendar_calendar.desktop.in.in.h:1
+#: ../NewEvent.qml:471 com.ubuntu.calendar_calendar.desktop.in.in.h:1
msgid "Calendar"
msgstr ""
-#: ../NewEvent.qml:483
+#: ../NewEvent.qml:513
msgid "Add Guest"
msgstr ""
@@ -390,13 +390,17 @@
msgid "2 weeks"
msgstr ""
+#: ../TimeLineBase.qml:80
+msgid "Untitled"
+msgstr ""
+
#. TRANSLATORS: W refers to Week, followed by the actual week number (%1)
-#: ../TimeLineHeader.qml:49
+#: ../TimeLineHeader.qml:51
#, qt-format
msgid "W%1"
msgstr ""
-#: ../TimeLineHeader.qml:61
+#: ../TimeLineHeader.qml:63
msgid "All Day"
msgstr ""
Follow ups