← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~majster-pl/ubuntu-calendar-app/new-event-page into lp:ubuntu-calendar-app

 

Szymon Waliczek has proposed merging lp:~majster-pl/ubuntu-calendar-app/new-event-page into lp:ubuntu-calendar-app.

Requested reviews:
  Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration
  Ubuntu Calendar Developers (ubuntu-calendar-dev)
Related bugs:
  Bug #1383846 in Ubuntu Calendar App: "Header Fonts are different in New Event for Reminder & Repeats"
  https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1383846
  Bug #1554132 in Ubuntu Calendar App: "Redesign the new event page"
  https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1554132

For more details, see:
https://code.launchpad.net/~majster-pl/ubuntu-calendar-app/new-event-page/+merge/288637

This is very first implementation of new-event-page. 
There is still plenty of space of improvements but I want to get it reviewed before I continue my work.
-- 
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~majster-pl/ubuntu-calendar-app/new-event-page into lp:ubuntu-calendar-app.
=== modified file 'NewEvent.qml'
--- NewEvent.qml	2016-03-07 17:57:04 +0000
+++ NewEvent.qml	2016-03-10 13:19:38 +0000
@@ -64,8 +64,7 @@
         }
     }
 
-    function cancel()
-    {
+    function cancel() {
         if (pageStack)
             pageStack.pop();
         root.canceled()
@@ -254,6 +253,11 @@
         secondsBeforeStart: 900
     }
 
+    RemindersModel {
+        id: reminderModel
+    }
+
+
     function getDaysOfWeek(){
         var daysOfWeek = [];
         switch(recurrenceOption.selectedIndex){
@@ -333,43 +337,51 @@
 
     header: PageHeader {
         id: pageHeader
-
-        flickable: null
-        title: isEdit ? i18n.tr("Edit Event"):i18n.tr("New Event")
-        leadingActionBar.actions: Action {
-            id: backAction
-
-            name: "cancel"
-            text: i18n.tr("Cancel")
-            iconName: isEdit ? "back" : "down"
-            onTriggered: root.cancel()
-        }
-
-        trailingActionBar.actions: [
-            Action {
-                text: i18n.tr("Delete");
-                objectName: "delete"
-                iconName: "delete"
-                visible : isEdit
-                onTriggered: {
-                    var dialog = PopupUtils.open(Qt.resolvedUrl("DeleteConfirmationDialog.qml"),root,{"event": event});
-                    dialog.deleteEvent.connect( function(eventId){
-                        model.removeItem(eventId);
-                        if (pageStack)
-                            pageStack.pop();
-                        root.eventDeleted(eventId);
-                    });
-                }
-            },
-            Action {
-                iconName: "ok"
-                objectName: "save"
+        property Component delegate: Component {
+            AbstractButton {
+                id: button
+                action: modelData
+                width: label.width + units.gu(4)
+                height: parent.height
+                Rectangle {
+                    color: parent.pressed ? UbuntuColors.coolGrey : UbuntuColors.slate
+                    opacity: 0.1
+                    anchors.fill: parent
+                    visible: button.pressed
+                }
+                Label {
+                    anchors.centerIn: parent
+                    id: label
+                    text: action.text
+                    font.weight: text === i18n.tr("Save") ? Font.Normal : Font.Light
+                }
+            }
+        }
+        leadingActionBar {
+            anchors.leftMargin: 0
+            actions: Action {
+                text: i18n.tr("Cancel")
+                iconName: "close"
+                onTriggered: root.cancel()
+            }
+            delegate: pageHeader.delegate
+        }
+        trailingActionBar {
+            anchors.rightMargin: 0
+            actions: Action {
                 text: i18n.tr("Save")
-                enabled: !!titleEdit.text.trim()
+                iconName: "tick"
                 onTriggered: saveToQtPim();
             }
-        ]
-    }
+            delegate: pageHeader.delegate
+        }
+    }
+
+    Rectangle {
+        anchors.fill: parent
+        color: "#FFFFFF"
+    }
+
 
     Component{
         id: errorDlgComponent
@@ -387,6 +399,9 @@
         id:eventUtils
     }
 
+
+
+
     Flickable{
         id: flickable
         clip: true
@@ -422,14 +437,15 @@
         flickableDirection: Flickable.VerticalFlick
         anchors{
             left: parent.left
-            top: parent.top
-            topMargin: pageHeader.height
+            top: root.header.bottom
             right: parent.right
             bottom: keyboardRectangle.top
         }
         contentWidth: width
         contentHeight: column.height
 
+
+
         Column {
             id: column
 
@@ -437,7 +453,8 @@
 
             NewEventTimePicker{
                 id: startDateTimeInput
-                header: i18n.tr("From")
+                //TRANSLATORS: this referes to date. eg:  To: Wendsday, 9 March 2016
+                headerText: i18n.tr("From")
                 showTimePicker: !allDayEventCheckbox.checked
                 anchors {
                     left: parent.left
@@ -450,7 +467,8 @@
 
             NewEventTimePicker{
                 id: endDateTimeInput
-                header: i18n.tr("To")
+                //TRANSLATORS: this referes to date. eg:  To: Wendsday, 9 March 2016
+                headerText: i18n.tr("To")
                 showTimePicker: !allDayEventCheckbox.checked
                 anchors {
                     left: parent.left
@@ -461,232 +479,187 @@
                 }
             }
 
-            ListItems.Standard {
-                anchors {
-                    left: parent.left
-                    right: parent.right
-                }
-
-                text: i18n.tr("All day event")
-                showDivider: false
-                control: CheckBox {
-                    objectName: "allDayEventCheckbox"
-                    id: allDayEventCheckbox
-                    checked: false
-                }
-            }
-
-            ListItems.ThinDivider {}
-
-            Column {
-                width: parent.width
-                spacing: units.gu(1)
-
-                ListItems.Header{
-                    text: i18n.tr("Event Details")
-                }
-
-                TextField {
-                    id: titleEdit
-                    objectName: "newEventName"
-
-                    anchors {
-                        left: parent.left
-                        right: parent.right
-                        margins: units.gu(2)
-                    }
-
-                    inputMethodHints: Qt.ImhNoPredictiveText
-                    placeholderText: i18n.tr("Event Name")
-                    onFocusChanged: {
-                        if(titleEdit.focus) {
-                            flickable.makeMeVisible(titleEdit);
-                        }
-                    }
-                }
-
-                TextArea{
-                    id: messageEdit
-                    objectName: "eventDescriptionInput"
-
-                    anchors {
-                        left: parent.left
-                        right: parent.right
-                        margins: units.gu(2)
-                    }
-
-                    placeholderText: i18n.tr("Description")
-                    onFocusChanged: {
-                        if(messageEdit.focus) {
-                            flickable.makeMeVisible(messageEdit);
-                        }
-                    }
-                }
-
-                TextField {
-                    id: locationEdit
-                    objectName: "eventLocationInput"
-
-                    anchors {
-                        left: parent.left
-                        right: parent.right
-                        margins: units.gu(2)
-                    }
-
-                    inputMethodHints: Qt.ImhNoPredictiveText
-                    placeholderText: i18n.tr("Location")
-
-                    onFocusChanged: {
-                        if(locationEdit.focus) {
-                            flickable.makeMeVisible(locationEdit);
-                        }
-                    }
-                }
-            }
-
-            Column {
-                width: parent.width
-                spacing: units.gu(1)
-
-                ListItems.Header {
-                    text: i18n.tr("Calendar")
-                }
-
-                OptionSelector{
-                    id: calendarsOption
-                    objectName: "calendarsOption"
-
-                    anchors {
-                        left: parent.left
-                        right: parent.right
-                        margins: units.gu(2)
-                    }
-
-                    containerHeight: itemHeight * 4
-                    model: root.model.getWritableCollections();
-
-                    delegate: OptionSelectorDelegate{
-                        text: modelData.name
-
-                        UbuntuShape{
-                            id: calColor
-                            width: height
-                            height: parent.height - units.gu(2)
-                            color: modelData.color
-                            anchors {
-                                right: parent.right
-                                rightMargin: units.gu(4)
-                                verticalCenter: parent.verticalCenter
-                            }
-                        }
-                    }
-                    onExpandedChanged: Qt.inputMethod.hide();
-                }
-            }
-
-            Column {
-                width: parent.width
-                spacing: units.gu(1)
-
-                ListItems.Header {
-                    text: i18n.tr("Guests")
-                }
-
-                Button{
-                    id: addGuestButton
-                    objectName: "addGuestButton"
-
-                    property var contactsPopup: null
-
-                    text: i18n.tr("Add Guest")
-                    anchors {
-                        left: parent.left
-                        right: parent.right
-                        margins: units.gu(2)
-                    }
-
-                    onClicked: {
-                        if (contactsPopup)
-                            return
-
-                        flickable.makeMeVisible(addGuestButton)
-                        contactsPopup = PopupUtils.open(Qt.resolvedUrl("ContactChoicePopup.qml"), addGuestButton);
-                        contactsPopup.contactSelected.connect( function(contact, emailAddress) {
-                            if(!internal.isContactAlreadyAdded(contact, emailAddress) ) {
-                                var t = internal.contactToAttendee(contact, emailAddress);
-                                contactModel.append({"contact": t});
-                            }
-
-                        });
-                        contactsPopup.Component.onDestruction.connect( function() {
-                            addGuestButton.contactsPopup = null
-                        })
-                    }
-                }
-
-                UbuntuShape {
-                    anchors {
-                        left: parent.left
-                        right: parent.right
-                        margins: units.gu(2)
-                    }
-
-                    height: contactList.height
-
-                    Column{
-                        id: contactList
-                        objectName: "guestList"
-
-                        spacing: units.gu(1)
-                        width: parent.width
-                        clip: true
-
-                        ListModel{
-                            id: contactModel
-                        }
-
-                        Repeater{
-                            model: contactModel
-                            delegate: ListItem {
-                                objectName: "eventGuest%1".arg(index)
-
-                                ListItemLayout {
-                                    title.text: contact.name
-                                    subtitle.text: contact.emailAddress
-                                }
-
-                                leadingActions: ListItemActions {
-                                    actions: Action {
-                                        iconName: "delete"
-                                        onTriggered: {
-                                            contactModel.remove(index)
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-
-                ListItems.ThinDivider {
-                    visible: (event != undefined) && (event.itemType === Type.Event)
-                }
-
-            }
-
-            ListItems.Subtitled{
+            // All day event ListItem with Switch
+            ListItem {
+                width: parent.width
+
+                ListItemLayout {
+                    title.text: i18n.tr("All day event")
+                    Switch {
+                        id: allDayEventCheckbox
+                        checked: false
+                        SlotsLayout.position: SlotsLayout.Trailing;
+                    }
+                }
+                onClicked: {
+                    Haptics.play()
+                    allDayEventCheckbox.checked = !allDayEventCheckbox.checked
+                }
+
+            }
+
+            // ListItem which holds "Event details" label + TextField + TextArea + TextField
+            ListItem {
+                    width: parent.width
+                    height: eventDetailsColumn.height + (eventDetailsColumn.anchors.margins*2)
+
+                Column {
+                    id: eventDetailsColumn
+                    spacing: units.gu(2)
+                    anchors {
+                        left: parent.left
+                        right: parent.right
+                        top: parent.top
+                        margins: units.gu(2)
+                    }
+
+                    Label {
+                        width: parent.width
+                        text: i18n.tr("Event details")
+                        elide: Text.ElideRight
+                    }
+
+                    TextField {
+                        id: titleEdit
+                        objectName: "newEventName"
+
+                        width: parent.width
+                        inputMethodHints: Qt.ImhNoPredictiveText
+                        placeholderText: i18n.tr("Event Name")
+
+                        onFocusChanged: {
+                            if(titleEdit.focus) {
+                                flickable.makeMeVisible(titleEdit);
+                            }
+                        }
+                    }
+
+                    TextArea{
+                        id: messageEdit
+                        objectName: "eventDescriptionInput"
+
+                        width: parent.width
+                        placeholderText: i18n.tr("Description")
+
+                        onFocusChanged: {
+                            if(messageEdit.focus) {
+                                flickable.makeMeVisible(messageEdit);
+                            }
+                        }
+                    }
+
+                    TextField {
+                        id: locationEdit
+                        objectName: "eventLocationInput"
+
+                        width: parent.width
+                        inputMethodHints: Qt.ImhNoPredictiveText
+                        placeholderText: i18n.tr("Location")
+
+                        onFocusChanged: {
+                            if(locationEdit.focus) {
+                                flickable.makeMeVisible(locationEdit);
+                            }
+                        }
+                    }
+                }
+            }
+
+            // ListItem to hold calendars selector
+            ListItem {
+                width: parent.width
+                height: chooseCalendarColumn.height + (eventDetailsColumn.anchors.topMargin*2)
+
+                Column {
+                    id: chooseCalendarColumn
+                    spacing: units.gu(2)
+                    anchors {
+                        left: parent.left
+                        right: parent.right
+                        top: parent.top
+                        topMargin: units.gu(2)
+                    }
+
+                    Label {
+                        width: parent.width
+                        anchors {
+                            left: parent.left
+                            leftMargin: units.gu(2)
+                            right: parent.right
+                            rightMargin: units.gu(2)
+                        }
+                        text: i18n.tr("Choose calendar")
+                        elide: Text.ElideRight
+                    }
+
+                    ListItems.ItemSelector {
+                        id: calendarsOption
+                        model: root.model.getWritableCollections();
+                        delegate: OptionSelectorDelegate { text: modelData.name }
+                    }
+
+                }
+            }
+
+
+            ListItem {
+                width: parent.width
+                height: guestsColumn.height + (guestsColumn.anchors.margins*2)
+
+                Column {
+                    id: guestsColumn
+                    spacing: units.gu(2)
+                    anchors {
+                        left: parent.left
+                        right: parent.right
+                        top: parent.top
+                        margins: units.gu(2)
+                    }
+
+                    Label {
+                        width: parent.width
+                        text: i18n.tr("Guests")
+                        elide: Text.ElideRight
+                    }
+
+                    TextField {
+                        id: guestsEdit
+                        objectName: "eventLocationInput"
+
+                        width: parent.width
+                        inputMethodHints: Qt.ImhNoPredictiveText
+                        placeholderText: i18n.tr("Add guests")
+
+                        onFocusChanged: {
+                            if(guestsEdit.focus) {
+                                flickable.makeMeVisible(guestsEdit);
+                            }
+                        }
+                    }
+
+
+
+                }
+            }
+
+
+            ListItem {
                 id:thisHappens
                 objectName :"thisHappens"
 
-                anchors {
-                    left: parent.left
+                width: parent.width
+                height: thisHappensLayout.height
+
+                ListItemLayout {
+                    id: thisHappensLayout
+                    title.text: i18n.tr("Repeats")
+                    summary.text: (event != undefined) && (event.itemType === Type.Event) ? rule === null ? i18n.tr(Defines.recurrenceLabel[0]) : eventUtils.getRecurrenceString(rule) : ""
+                    Icon {
+                        name: "go-next"
+                        SlotsLayout.position: SlotsLayout.Trailing;
+                        width: units.gu(2.5)
+                    }
                 }
-
-                showDivider: false
-                progression: true
-                visible: (event != undefined) && (event.itemType === Type.Event)
-                text: i18n.tr("Repeats")
-                subText: (event != undefined) && (event.itemType === Type.Event) ? rule === null ? Defines.recurrenceLabel[0] : eventUtils.getRecurrenceString(rule) : ""
                 onClicked: {
                     var stack = pageStack
                     if (!stack)
@@ -696,41 +669,28 @@
                 }
             }
 
-            ListItems.ThinDivider {
-                visible: (event != undefined) && (event.itemType === Type.Event)
-            }
 
-            ListItems.Subtitled{
+            ListItem {
                 id:eventReminder
                 objectName  : "eventReminder"
 
-                anchors.left:parent.left
-                showDivider: false
-                progression: true
-                text: i18n.tr("Reminder")
-
-                RemindersModel {
-                    id: reminderModel
-                }
-
-                subText:{
-                    if(visualReminder.secondsBeforeStart !== -1) {
-                        for( var i=0; i<reminderModel.count; i++ ) {
-                            if(visualReminder.secondsBeforeStart === reminderModel.get(i).value) {
-                                return reminderModel.get(i).label
-                            }
-                        }
-                    } else {
-                        return reminderModel.get(0).label
+                width: parent.width
+                height: eventReminderLayout.height
+
+                ListItemLayout {
+                    id: eventReminderLayout
+                    title.text: i18n.tr("Reminder")
+                    subtitle.text: i18n.tr("%1").arg(reminderModel.getSelectedReminder())
+                    Icon {
+                        name: "go-next"
+                        SlotsLayout.position: SlotsLayout.Trailing;
+                        width: units.gu(2.5)
                     }
-
                 }
 
-                onClicked:{
+                onClicked: {
                     var stack = pageStack
-                    if (!stack)
-                        stack = bottomEdgePageStack
-
+                    if (!stack) stack = bottomEdgePageStack
                     stack.push(Qt.resolvedUrl("EventReminder.qml"),
                                               {"visualReminder": visualReminder,
                                                "audibleReminder": audibleReminder,
@@ -739,8 +699,15 @@
                 }
             }
 
-            ListItems.ThinDivider {}
         }
+
+
+    }
+
+    // Scrollbar
+    Scrollbar{
+        flickableItem: flickable
+        align: Qt.AlignTrailing
     }
 
     // used to keep the field visible when the keyboard appear or dismiss

=== removed file 'NewEventEntryField.qml'
--- NewEventEntryField.qml	2016-01-29 14:47:31 +0000
+++ NewEventEntryField.qml	1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2013-2014 Canonical Ltd
- *
- * This file is part of Ubuntu Calendar App
- *
- * Ubuntu Calendar App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Calendar App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-import QtQuick 2.4
-import Ubuntu.Components 1.3
-
-Label {
-    id: root
-
-    property bool highlighted: false
-
-    height: units.gu(6)
-
-    verticalAlignment: Text.AlignVCenter
-    color: highlighted ? "#2C001E" : Theme.palette.normal.baseText
-
-    Rectangle {
-        z: -1
-        anchors.fill: parent
-        color: root.highlighted ? Theme.palette.selected.background
-                                : "Transparent"
-    }
-}

=== modified file 'NewEventTimePicker.qml'
--- NewEventTimePicker.qml	2016-01-25 17:52:33 +0000
+++ NewEventTimePicker.qml	2016-03-10 13:19:38 +0000
@@ -1,75 +1,113 @@
 import QtQuick 2.4
-import Ubuntu.Components.ListItems 1.0 as ListItem
+import Ubuntu.Components 1.3
 import Ubuntu.Components.Themes.Ambiance 1.0
-import Ubuntu.Components.Pickers 1.0
+import Ubuntu.Components.Pickers 1.3
+//import QtQuick.Layouts 1.1
 
-Column {
+ListItem {
     id: dateTimeInput
-    property alias header: listHeader.text
+    property string headerText //header label ("From" or "To")
+    property date dateTime //keep date from DatePicker
+    property bool showTimePicker //if true then user is able to set time on event
 
-    property date dateTime;
-    property bool showTimePicker;
+    // when new date set in DatePicker then this will be run.
+    onDateTimeChanged: {
+        layout.summary.text = dateTime.toLocaleDateString() // set date
+        secondLabel.text = Qt.formatTime(dateTime, "hh:mm AP").replace(/\./g, "") // set time
+    }
 
     function clearFocus() {
-        dateInput.focus = false;
-        timeInput.focus = false;
+        dateBG.focus = false;
+        timeBG.focus = false;
     }
 
+    // function to open date/time picker
     function openDatePicker (element, caller, callerProperty, mode) {
         element.highlighted = true;
         var picker = PickerPanel.openDatePicker(caller, callerProperty, mode);
         if (!picker) return;
-        picker.closed.connect(function () {
-            element.highlighted = false;
-        });
-    }
-
-    onDateTimeChanged: {
-        dateInput.text = dateTime.toLocaleDateString();
-        timeInput.text = Qt.formatTime(dateTime);
-    }
-
-    ListItem.Header {
-        id: listHeader
-    }
-
-    Item {
-        anchors {
-            left: parent.left
-            right: parent.right
-            margins: units.gu(2)
-        }
-
-        height: dateInput.height
-
-        NewEventEntryField{
-            id: dateInput
-            objectName: "dateInput"
-
-            text: ""
-            anchors.left: parent.left
-            width: !showTimePicker ? parent.width : 4 * parent.width / 5
-
-            MouseArea{
-                anchors.fill: parent
-                onClicked: openDatePicker(dateInput, dateTimeInput, "dateTime", "Years|Months|Days")
-            }
-        }
-
-        NewEventEntryField{
-            id: timeInput
-            objectName: "timeInput"
-
-            text: ""
-            anchors.right: parent.right
-            width: parent.width / 5
+        picker.closed.connect(function () { element.highlighted = false; });
+    }
+
+    height: layout.height + divider.height
+//    divider.height: units.gu(0.1)
+
+
+    // backgroud color of full date fabel, to be shown when user click on date and DatePicker is visable
+    Rectangle {
+        id: dateBG
+
+        property bool highlighted: false
+
+        height: layout.summary.height + units.gu(3.5)
+        width: showTimePicker ? layout.title.width + units.gu(3) : layout.width
+        anchors.bottom: parent.bottom
+        color: highlighted ? UbuntuColors.coolGrey : "transparent"
+
+        Behavior on color { ColorAnimation {} }
+    }
+
+    // backgroud color of time label, to be shown when user click on date and DatePicker is visable
+    Rectangle {
+        id: timeBG
+
+        property bool highlighted: false
+
+        height: dateBG.height
+        width: slot.width + units.gu(4)
+        anchors.bottom: parent.bottom
+        anchors.right: parent.right
+        color: highlighted ? UbuntuColors.coolGrey : "transparent"
+
+        Behavior on color { ColorAnimation {} }
+    }
+
+    // ListItemLayout to keep full date label and time label
+    ListItemLayout {
+        id: layout
+
+        title.text: headerText
+        title.color: UbuntuColors.Orange
+        title.font.pixelSize: FontUtils.sizeToPixels("small")
+        subtitle.text: " "
+        summary.color: dateBG.highlighted ? UbuntuColors.orange : Theme.palette.selected.fieldText
+        summary.font.pixelSize: FontUtils.sizeToPixels("medium")
+
+        Behavior on summary.color { ColorAnimation {} }
+
+
+        // Item to hold Trailing tile label item
+        Item {
+            id: slot
+
+            width: secondLabel.width
+            height: parent.height
             visible: showTimePicker
-            horizontalAlignment: Text.AlignRight
-
-            MouseArea{
-                anchors.fill: parent
-                onClicked: openDatePicker(timeInput, dateTimeInput, "dateTime", "Hours|Minutes")
+            SlotsLayout.overrideVerticalPositioning: true
+
+            // label to keep time [ 10:20 AM ]
+            Label {
+                id: secondLabel
+
+                fontSize: "medium"
+                color: timeBG.highlighted ? UbuntuColors.orange : Theme.palette.selected.fieldText
+                y: layout.mainSlot.y + layout.summary.y + layout.summary.baselineOffset - baselineOffset
+                Behavior on color { ColorAnimation {} }
             }
         }
     }
+
+    // MouseArea to be triggered when user click on full date
+    MouseArea {
+        anchors.fill: dateBG
+        onClicked: { openDatePicker(dateBG, dateTimeInput, "dateTime", "Years|Months|Days"); Haptics.play()}
+    }
+
+    // MouseArea to be triggered when user click on time
+    MouseArea {
+        anchors.fill: timeBG
+        visible: showTimePicker
+        onClicked: { openDatePicker(timeBG, dateTimeInput, "dateTime", "Hours|Minutes"); Haptics.play()}
+    }
+
 }

=== modified file 'PageWithBottomEdge.qml'
--- PageWithBottomEdge.qml	2016-03-07 17:57:04 +0000
+++ PageWithBottomEdge.qml	2016-03-10 13:19:38 +0000
@@ -28,6 +28,7 @@
     signal bottomEdgeCommitStarted()
     signal eventCreated(var event)
 
+
     function bottomEdgeCommit(date, allDay)
     {
         bottomEdge.commit()

=== modified file 'RemindersModel.qml'
--- RemindersModel.qml	2016-01-25 13:20:32 +0000
+++ RemindersModel.qml	2016-03-10 13:19:38 +0000
@@ -38,5 +38,17 @@
         reminderModel.append({ "label": i18n.tr("1 week"), "value": 604800 })
         reminderModel.append({ "label": i18n.tr("2 weeks"), "value": 1209600 })
     }
+
+    function getSelectedReminder() {
+        if(visualReminder.secondsBeforeStart !== -1) {
+            for( var i=0; i<reminderModel.count; i++ ) {
+                if(visualReminder.secondsBeforeStart === reminderModel.get(i).value) {
+                    return reminderModel.get(i).label
+                }
+            }
+        } else {
+            return reminderModel.get(0).label
+        }
+    }
 }
 

=== modified file 'calendar.qml'
--- calendar.qml	2016-03-07 15:58:43 +0000
+++ calendar.qml	2016-03-10 13:19:38 +0000
@@ -89,7 +89,7 @@
     objectName: "calendar"
     applicationName: "com.ubuntu.calendar"
 
-    width: units.gu(100)
+    width: units.gu(50)
     height: units.gu(80)
     focus: true
     Keys.forwardTo: [pageStack.currentPage]

=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot	2016-03-03 22:32:56 +0000
+++ po/com.ubuntu.calendar.pot	2016-03-10 13:19:38 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-04 04:02+0530\n"
+"POT-Creation-Date: 2016-03-09 11:08+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -18,7 +18,7 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
-#: ../AgendaView.qml:50 ../calendar.qml:292 ../calendar.qml:518
+#: ../AgendaView.qml:50 ../calendar.qml:321 ../calendar.qml:547
 msgid "Agenda"
 msgstr ""
 
@@ -57,8 +57,10 @@
 #. where it's shown has limited space
 #: ../AllDayEventComponent.qml:150
 #, qt-format
-msgid "%1 ev."
-msgstr ""
+msgid "%1 event"
+msgid_plural "%1 events"
+msgstr[0] ""
+msgstr[1] ""
 
 #. TRANSLATORS: the argument refers to the number of all day events
 #: ../AllDayEventComponent.qml:154
@@ -68,7 +70,7 @@
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../CalendarChoicePopup.qml:34 ../EventActions.qml:51
+#: ../CalendarChoicePopup.qml:34 ../EventActions.qml:52
 msgid "Calendars"
 msgstr ""
 
@@ -78,11 +80,11 @@
 
 #. TRANSLATORS: Please translate this string  to 15 characters only.
 #. Currently ,there is no way we can increase width of action menu currently.
-#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:36
+#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:37
 msgid "Sync"
 msgstr ""
 
-#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:36
+#: ../CalendarChoicePopup.qml:48 ../EventActions.qml:37
 msgid "Syncing"
 msgstr ""
 
@@ -95,7 +97,7 @@
 msgstr ""
 
 #: ../ColorPickerDialog.qml:55 ../DeleteConfirmationDialog.qml:60
-#: ../EditEventConfirmationDialog.qml:53 ../NewEvent.qml:340
+#: ../EditEventConfirmationDialog.qml:53 ../NewEvent.qml:363
 msgid "Cancel"
 msgstr ""
 
@@ -107,23 +109,17 @@
 msgid "Search contact"
 msgstr ""
 
-#: ../DayView.qml:71 ../MonthView.qml:50 ../WeekView.qml:54 ../YearView.qml:57
+#: ../DayView.qml:72 ../MonthView.qml:50 ../WeekView.qml:55 ../YearView.qml:57
 msgid "Today"
 msgstr ""
 
 #. 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:115 ../DayView.qml:203 ../MonthView.qml:78
-#: ../WeekView.qml:137 ../WeekView.qml:256
+#: ../DayView.qml:122 ../MonthView.qml:78 ../WeekView.qml:144
 msgid "MMMM yyyy"
 msgstr ""
 
-#: ../DayView.qml:201 ../MonthView.qml:73 ../WeekView.qml:254
-#, qt-format
-msgid "%1 %2"
-msgstr ""
-
 #: ../DeleteConfirmationDialog.qml:31
 msgid "Delete Recurring Event"
 msgstr ""
@@ -151,11 +147,11 @@
 msgid "Delete this"
 msgstr ""
 
-#: ../DeleteConfirmationDialog.qml:51 ../NewEvent.qml:347
+#: ../DeleteConfirmationDialog.qml:51
 msgid "Delete"
 msgstr ""
 
-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:335
+#: ../EditEventConfirmationDialog.qml:29
 msgid "Edit Event"
 msgstr ""
 
@@ -173,25 +169,25 @@
 msgid "Edit this"
 msgstr ""
 
-#: ../EventActions.qml:63 ../Settings.qml:29
+#: ../EventActions.qml:64 ../Settings.qml:29
 msgid "Settings"
 msgstr ""
 
 #. TRANSLATORS: the first argument (%1) refers to a start time for an event,
 #. while the second one (%2) refers to the end time
-#: ../EventBubble.qml:97
+#: ../EventBubble.qml:104
 #, qt-format
 msgid "%1 - %2"
 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:108 ../EventBubble.qml:113
+#: ../EventBubble.qml:115 ../EventBubble.qml:120
 #, qt-format
 msgid "%1 <b>%2</b>"
 msgstr ""
 
-#: ../EventDetails.qml:44 ../NewEvent.qml:483
+#: ../EventDetails.qml:44
 msgid "Event Details"
 msgstr ""
 
@@ -235,11 +231,11 @@
 msgid "Edit"
 msgstr ""
 
-#: ../EventDetails.qml:389 ../NewEvent.qml:589
+#: ../EventDetails.qml:389 ../NewEvent.qml:661
 msgid "Guests"
 msgstr ""
 
-#: ../EventDetails.qml:432 ../EventReminder.qml:35 ../NewEvent.qml:701
+#: ../EventDetails.qml:432 ../EventReminder.qml:35 ../NewEvent.qml:811
 msgid "Reminder"
 msgstr ""
 
@@ -262,7 +258,7 @@
 #. 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:242 ../NewEvent.qml:685
+#: ../EventRepetition.qml:242 ../NewEvent.qml:784
 msgid "Repeats"
 msgstr ""
 
@@ -314,56 +310,72 @@
 msgid "Wk"
 msgstr ""
 
-#: ../NewEvent.qml:171
+#: ../MonthView.qml:73 ../WeekView.qml:131
+#, qt-format
+msgid "%1 %2"
+msgstr ""
+
+#: ../NewEvent.qml:173
 msgid "End time can't be before start time"
 msgstr ""
 
-#: ../NewEvent.qml:335 ../NewEventBottomEdge.qml:52
-msgid "New Event"
-msgstr ""
-
-#: ../NewEvent.qml:364
+#: ../NewEvent.qml:356 ../NewEvent.qml:372
 msgid "Save"
 msgstr ""
 
-#: ../NewEvent.qml:375
+#: ../NewEvent.qml:390
 msgid "Error"
 msgstr ""
 
-#: ../NewEvent.qml:377
+#: ../NewEvent.qml:392
 msgid "OK"
 msgstr ""
 
-#: ../NewEvent.qml:437
+#. TRANSLATORS: this referes to date. eg:  To: Wendsday, 9 March 2016
+#: ../NewEvent.qml:457
 msgid "From"
 msgstr ""
 
-#: ../NewEvent.qml:450
+#. TRANSLATORS: this referes to date. eg:  To: Wendsday, 9 March 2016
+#: ../NewEvent.qml:471
 msgid "To"
 msgstr ""
 
-#: ../NewEvent.qml:467
+#: ../NewEvent.qml:487
 msgid "All day event"
 msgstr ""
 
-#: ../NewEvent.qml:497
+#: ../NewEvent.qml:518
+msgid "Event details"
+msgstr ""
+
+#: ../NewEvent.qml:528
 msgid "Event Name"
 msgstr ""
 
-#: ../NewEvent.qml:515
+#: ../NewEvent.qml:542
 msgid "Description"
 msgstr ""
 
-#: ../NewEvent.qml:534
+#: ../NewEvent.qml:557
 msgid "Location"
 msgstr ""
 
-#: ../NewEvent.qml:549 com.ubuntu.calendar_calendar.desktop.in.in.h:1
-msgid "Calendar"
-msgstr ""
-
-#: ../NewEvent.qml:598
-msgid "Add Guest"
+#: ../NewEvent.qml:591
+msgid "Choose calendar"
+msgstr ""
+
+#: ../NewEvent.qml:671
+msgid "Add guests"
+msgstr ""
+
+#: ../NewEvent.qml:812
+#, qt-format
+msgid "%1"
+msgstr ""
+
+#: ../NewEventBottomEdge.qml:52
+msgid "New Event"
 msgstr ""
 
 #: ../RecurrenceLabelDefines.qml:23
@@ -467,7 +479,7 @@
 msgid "All Day"
 msgstr ""
 
-#: ../WeekView.qml:131 ../WeekView.qml:132
+#: ../WeekView.qml:138 ../WeekView.qml:139
 msgid "MMM"
 msgstr ""
 
@@ -476,29 +488,33 @@
 msgid "Year %1"
 msgstr ""
 
-#: ../calendar.qml:46
+#: ../calendar.qml:48
 msgid ""
 "Calendar app accept four arguments: --starttime, --endtime, --newevent and --"
 "eventid. They will be managed by system. See the source for a full comment "
 "about them"
 msgstr ""
 
-#: ../calendar.qml:260 ../calendar.qml:434
+#: ../calendar.qml:289 ../calendar.qml:463
 msgid "Year"
 msgstr ""
 
-#: ../calendar.qml:268 ../calendar.qml:455
+#: ../calendar.qml:297 ../calendar.qml:484
 msgid "Month"
 msgstr ""
 
-#: ../calendar.qml:276 ../calendar.qml:476
+#: ../calendar.qml:305 ../calendar.qml:505
 msgid "Week"
 msgstr ""
 
-#: ../calendar.qml:284 ../calendar.qml:497
+#: ../calendar.qml:313 ../calendar.qml:526
 msgid "Day"
 msgstr ""
 
+#: com.ubuntu.calendar_calendar.desktop.in.in.h:1
+msgid "Calendar"
+msgstr ""
+
 #: com.ubuntu.calendar_calendar.desktop.in.in.h:2
 msgid "A calendar for Ubuntu which syncs with online accounts."
 msgstr ""