Merge lp:~renatofilho/address-book-app/update-bottom-edge into lp:address-book-app
- update-bottom-edge
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Bill Filler |
Approved revision: | 627 |
Merged at revision: | 622 |
Proposed branch: | lp:~renatofilho/address-book-app/update-bottom-edge |
Merge into: | lp:address-book-app |
Diff against target: |
804 lines (+200/-171) 13 files modified
src/imports/ABContactEditorPage.qml (+1/-1) src/imports/ABContactListPage.qml (+71/-84) src/imports/ABContactViewPage.qml (+5/-5) src/imports/ABMultiColumnEmptyState.qml (+14/-6) src/imports/ABNewContactBottomEdge.qml (+37/-32) src/imports/MainWindow.qml (+15/-8) src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml (+0/-1) src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml (+5/-17) src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml (+7/-3) src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml (+22/-14) src/imports/Ubuntu/Contacts/ContactListView.qml (+4/-0) src/imports/Ubuntu/Contacts/ContactSimpleListView.qml (+18/-0) tests/qml/tst_ContactEditor.qml (+1/-0) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-app/update-bottom-edge |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
system-apps-ci-bot | continuous-integration | Approve | |
Ubuntu Phablet Team | Pending | ||
Review via email:
|
Commit message
Keep bottom edge page live while changing app: munticolumn <-> single column
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
- 622. By Renato Araujo Oliveira Filho
-
Fix input hint for name field.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:622
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 623. By Renato Araujo Oliveira Filho
-
Make sure that the recent created contact is visible after close edit page.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:623
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 624. By Renato Araujo Oliveira Filho
-
Make sure that the Firs name get focus.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:624
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 625. By Renato Araujo Oliveira Filho
-
Fixed contact editor enable state.
- 626. By Renato Araujo Oliveira Filho
-
Make sure that the edit page is enabled during the unit test.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:625
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:626
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 627. By Renato Araujo Oliveira Filho
-
Make sure that bootom edge works if settings page is opened.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:627
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'src/imports/ABContactEditorPage.qml' | |||
2 | --- src/imports/ABContactEditorPage.qml 2016-01-04 20:03:58 +0000 | |||
3 | +++ src/imports/ABContactEditorPage.qml 2016-08-19 12:45:42 +0000 | |||
4 | @@ -63,7 +63,7 @@ | |||
5 | 63 | 63 | ||
6 | 64 | onContactSaved: { | 64 | onContactSaved: { |
7 | 65 | if (pageStack.contactListPage) { | 65 | if (pageStack.contactListPage) { |
9 | 66 | pageStack.contactListPage.moveListToContact(contact) | 66 | pageStack.contactListPage.onNewContactSaved(contact) |
10 | 67 | pageStack.contactListPage.forceActiveFocus() | 67 | pageStack.contactListPage.forceActiveFocus() |
11 | 68 | } | 68 | } |
12 | 69 | } | 69 | } |
13 | 70 | 70 | ||
14 | === modified file 'src/imports/ABContactListPage.qml' | |||
15 | --- src/imports/ABContactListPage.qml 2016-07-13 18:40:39 +0000 | |||
16 | +++ src/imports/ABContactListPage.qml 2016-08-19 12:45:42 +0000 | |||
17 | @@ -37,12 +37,12 @@ | |||
18 | 37 | property bool pickMode: false | 37 | property bool pickMode: false |
19 | 38 | property alias contentHubTransfer: contactExporter.activeTransfer | 38 | property alias contentHubTransfer: contactExporter.activeTransfer |
20 | 39 | property bool pickMultipleContacts: false | 39 | property bool pickMultipleContacts: false |
21 | 40 | property QtObject contactIndex: null | ||
22 | 41 | property alias contactManager: contactList.manager | 40 | property alias contactManager: contactList.manager |
23 | 42 | 41 | ||
24 | 43 | property var _busyDialog: null | 42 | property var _busyDialog: null |
25 | 44 | property bool _importingTestData: false | 43 | property bool _importingTestData: false |
26 | 45 | property bool _creatingContact: false | 44 | property bool _creatingContact: false |
27 | 45 | property string _newContactId: "" | ||
28 | 46 | 46 | ||
29 | 47 | readonly property string currentViewContactId: viewPage && viewPage.contact ? viewPage.contact.contactId : "" | 47 | readonly property string currentViewContactId: viewPage && viewPage.contact ? viewPage.contact.contactId : "" |
30 | 48 | readonly property bool isEmpty: (contactList.count === 0) | 48 | readonly property bool isEmpty: (contactList.count === 0) |
31 | @@ -110,7 +110,7 @@ | |||
32 | 110 | 110 | ||
33 | 111 | function showContact(contact) | 111 | function showContact(contact) |
34 | 112 | { | 112 | { |
36 | 113 | var currentContact = contactList.listModel.contacts[contactList.currentIndex] | 113 | var currentContact = contactList.currentIndex != -1 ? contactList.listModel.contacts[contactList.currentIndex] : null |
37 | 114 | if (currentContact && (mainPage.currentViewContactId === currentContact.contactId)) { | 114 | if (currentContact && (mainPage.currentViewContactId === currentContact.contactId)) { |
38 | 115 | // contact view already opened with this contact | 115 | // contact view already opened with this contact |
39 | 116 | return | 116 | return |
40 | @@ -130,39 +130,45 @@ | |||
41 | 130 | if (pageStack.columns === 1) | 130 | if (pageStack.columns === 1) |
42 | 131 | return | 131 | return |
43 | 132 | 132 | ||
45 | 133 | if (!emptyPage) { | 133 | var newEmptyPage = null |
46 | 134 | if (!mainPage.emptyPage) { | ||
47 | 134 | contactList.currentIndex = -1 | 135 | contactList.currentIndex = -1 |
48 | 135 | pageStack.removePages(mainPage) | 136 | pageStack.removePages(mainPage) |
49 | 136 | 137 | ||
57 | 137 | if ((pageStack.columns > 1) && !hasChildPage()) { | 138 | if (pageStack.columns) { |
58 | 138 | emptyPage = pageStack.addFileToNextColumnSync(pageStack.primaryPage, | 139 | newEmptyPage = pageStack.addFileToNextColumnSync(pageStack.primaryPage, |
59 | 139 | Qt.resolvedUrl("ABMultiColumnEmptyState.qml"), | 140 | Qt.resolvedUrl("ABMultiColumnEmptyState.qml"), |
60 | 140 | { 'headerTitle': "", | 141 | { 'headerTitle': "", |
61 | 141 | 'pageStack': mainPage.pageStack, | 142 | 'pageStack': mainPage.pageStack, |
62 | 142 | 'model': mainPage.contactModel }) | 143 | 'model': mainPage.contactModel }) |
63 | 143 | emptyPage.Component.onDestruction.connect(function() { | 144 | newEmptyPage.Component.onDestruction.connect(function() { |
64 | 144 | mainPage.emptyPage = null | 145 | mainPage.emptyPage = null |
65 | 145 | }) | 146 | }) |
66 | 146 | 147 | ||
67 | 147 | } | 148 | } |
68 | 149 | } else { | ||
69 | 150 | newEmptyPage = mainPage.emptyPage | ||
70 | 148 | } | 151 | } |
71 | 152 | |||
72 | 149 | if (openBottomEdge) { | 153 | if (openBottomEdge) { |
74 | 150 | mainPage.emptyPage.commitBottomEdge() | 154 | newEmptyPage.commitBottomEdge() |
75 | 151 | } | 155 | } |
76 | 152 | 156 | ||
77 | 157 | mainPage.emptyPage = newEmptyPage | ||
78 | 158 | |||
79 | 153 | } | 159 | } |
80 | 154 | 160 | ||
81 | 155 | function showSettingsPage() | 161 | function showSettingsPage() |
82 | 156 | { | 162 | { |
83 | 157 | pageStack.removePages(mainPage) | ||
84 | 158 | |||
85 | 159 | |||
86 | 160 | if (settingsPage) { | 163 | if (settingsPage) { |
87 | 161 | settingsPage.Component.onDestruction.disconnect(clearSettingsPage) | 164 | settingsPage.Component.onDestruction.disconnect(clearSettingsPage) |
88 | 162 | } | 165 | } |
89 | 163 | 166 | ||
90 | 164 | pageStack.removePages(mainPage) | 167 | pageStack.removePages(mainPage) |
91 | 165 | viewPage = null | 168 | viewPage = null |
92 | 169 | settingsPage = null | ||
93 | 170 | emptyPage = null | ||
94 | 171 | |||
95 | 166 | 172 | ||
96 | 167 | settingsPage = pageStack.addFileToNextColumnSync(mainPage, | 173 | settingsPage = pageStack.addFileToNextColumnSync(mainPage, |
97 | 168 | Qt.resolvedUrl("./Settings/SettingsPage.qml"), | 174 | Qt.resolvedUrl("./Settings/SettingsPage.qml"), |
98 | @@ -203,27 +209,8 @@ | |||
99 | 203 | contactList.startSelection() | 209 | contactList.startSelection() |
100 | 204 | } | 210 | } |
101 | 205 | 211 | ||
102 | 206 | function moveListToContact(contact) | ||
103 | 207 | { | ||
104 | 208 | if ((state !== "searching") && | ||
105 | 209 | (state !== "vcardImported")) { | ||
106 | 210 | mainPage.state = "default" | ||
107 | 211 | } | ||
108 | 212 | |||
109 | 213 | contactIndex = contact | ||
110 | 214 | // this means a new contact was created | ||
111 | 215 | if (mainPage.allowToQuit) { | ||
112 | 216 | application.goBackToSourceApp() | ||
113 | 217 | } | ||
114 | 218 | } | ||
115 | 219 | |||
116 | 220 | |||
117 | 221 | function onNewContactSaved(contact) { | 212 | function onNewContactSaved(contact) { |
123 | 222 | _creatingContact = true | 213 | _newContactId = contact.contactId |
119 | 223 | moveListToContact(contact) | ||
120 | 224 | if (pageStack.columns > 1) { | ||
121 | 225 | showContact(contact); | ||
122 | 226 | } | ||
124 | 227 | } | 214 | } |
125 | 228 | 215 | ||
126 | 229 | // Delay contact fetch for some msecs (check 'fetchNewContactTimer') | 216 | // Delay contact fetch for some msecs (check 'fetchNewContactTimer') |
127 | @@ -234,7 +221,7 @@ | |||
128 | 234 | 221 | ||
129 | 235 | function fetchContact() | 222 | function fetchContact() |
130 | 236 | { | 223 | { |
132 | 237 | if (pageStack.columns > 1 && !contactList.showNewContact) { | 224 | if (pageStack.columns > 1 && !contactList.showNewContact && !pageStack.bottomEdgeOpened) { |
133 | 238 | var currentContact = null | 225 | var currentContact = null |
134 | 239 | if (contactList.currentIndex >= 0) | 226 | if (contactList.currentIndex >= 0) |
135 | 240 | currentContact = contactList.listModel.contacts[contactList.currentIndex] | 227 | currentContact = contactList.listModel.contacts[contactList.currentIndex] |
136 | @@ -306,8 +293,7 @@ | |||
137 | 306 | 293 | ||
138 | 307 | focus: true | 294 | focus: true |
139 | 308 | showImportOptions: !mainPage.pickMode && | 295 | showImportOptions: !mainPage.pickMode && |
142 | 309 | pageStack.bottomEdge && | 296 | !pageStack.bottomEdgeOpened |
141 | 310 | (pageStack.bottomEdge.status !== BottomEdge.Committed) | ||
143 | 311 | anchors { | 297 | anchors { |
144 | 312 | top: parent.top | 298 | top: parent.top |
145 | 313 | topMargin: pageHeader.height | 299 | topMargin: pageHeader.height |
146 | @@ -319,8 +305,8 @@ | |||
147 | 319 | filterTerm: searchField.text | 305 | filterTerm: searchField.text |
148 | 320 | multiSelectionEnabled: true | 306 | multiSelectionEnabled: true |
149 | 321 | multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode | 307 | multipleSelection: (mainPage.pickMode && mainPage.pickMultipleContacts) || !mainPage.pickMode |
152 | 322 | showNewContact: (pageStack.columns > 1) && pageStack.bottomEdge && (pageStack.bottomEdge.status === BottomEdge.Committed) | 308 | showNewContact: (pageStack.columns > 1) && pageStack.bottomEdgeOpened |
153 | 323 | highlightSelected: !showNewContact && pageStack.hasKeyboard && !mainPage._creatingContact | 309 | highlightSelected: !showNewContact && pageStack.hasKeyboard && (mainPage._newContactId === "") |
154 | 324 | onAddContactClicked: mainPage.createContactWithPhoneNumber(label) | 310 | onAddContactClicked: mainPage.createContactWithPhoneNumber(label) |
155 | 325 | onContactClicked: mainPage.showContact(contact) | 311 | onContactClicked: mainPage.showContact(contact) |
156 | 326 | onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default" | 312 | onIsInSelectionModeChanged: mainPage.state = isInSelectionMode ? "selection" : "default" |
157 | @@ -345,8 +331,7 @@ | |||
158 | 345 | } | 331 | } |
159 | 346 | 332 | ||
160 | 347 | onCurrentIndexChanged: { | 333 | onCurrentIndexChanged: { |
163 | 348 | if (!mainPage.contactIndex) | 334 | mainPage.delayFetchContact() |
162 | 349 | mainPage.delayFetchContact() | ||
164 | 350 | } | 335 | } |
165 | 351 | 336 | ||
166 | 352 | onOnlineAccountFinished: { | 337 | onOnlineAccountFinished: { |
167 | @@ -367,7 +352,7 @@ | |||
168 | 367 | //because of that we need this | 352 | //because of that we need this |
169 | 368 | Keys.onRightPressed: { | 353 | Keys.onRightPressed: { |
170 | 369 | // only move focus away when in edit mode | 354 | // only move focus away when in edit mode |
172 | 370 | if (pageStack.bottomEdge.status === BottomEdge.Committed) { | 355 | if (pageStack.bottomEdgeOpened) { |
173 | 371 | var next = pageStack._nextItemInFocusChain(view, true) | 356 | var next = pageStack._nextItemInFocusChain(view, true) |
174 | 372 | if (next === searchField) { | 357 | if (next === searchField) { |
175 | 373 | pageStack._nextItemInFocusChain(next, true) | 358 | pageStack._nextItemInFocusChain(next, true) |
176 | @@ -444,24 +429,25 @@ | |||
177 | 444 | viewPage.cancelEdit() | 429 | viewPage.cancelEdit() |
178 | 445 | } | 430 | } |
179 | 446 | 431 | ||
180 | 432 | |||
181 | 433 | if (pageStack.bottomEdgeOpened) { | ||
182 | 434 | pageStack.closeBottomEdge() | ||
183 | 435 | } else { | ||
184 | 436 | showEmptyPage(false) | ||
185 | 437 | } | ||
186 | 447 | mainPage.state = "searching" | 438 | mainPage.state = "searching" |
187 | 448 | contactList.showAllContacts() | 439 | contactList.showAllContacts() |
188 | 449 | if (pageStack.bottomEdge) { | ||
189 | 450 | pageStack.bottomEdge.collapse() | ||
190 | 451 | } else { | ||
191 | 452 | showEmptyPage(false) | ||
192 | 453 | } | ||
193 | 454 | searchField.forceActiveFocus() | 440 | searchField.forceActiveFocus() |
194 | 455 | } | 441 | } |
195 | 456 | }, | 442 | }, |
196 | 457 | Action { | 443 | Action { |
197 | 458 | iconName: "contact-new" | 444 | iconName: "contact-new" |
199 | 459 | enabled: visible && (!pageStack.bottomEdge || (pageStack.bottomEdge.enabled && (pageStack.bottomEdge.status === BottomEdge.Hidden))) | 445 | enabled: visible && !pageStack.bottomEdgeOpened |
200 | 460 | visible: (pageStack.columns > 1) | 446 | visible: (pageStack.columns > 1) |
201 | 461 | shortcut: "Ctrl+N" | 447 | shortcut: "Ctrl+N" |
202 | 462 | onTriggered: { | 448 | onTriggered: { |
205 | 463 | if (pageStack.bottomEdge) { | 449 | if (!pageStack.bottomEdgeOpened && (viewPage || emptyPage)) { |
206 | 464 | pageStack.bottomEdge.commit() | 450 | pageStack._bottomEdge.commit() |
207 | 465 | } else { | 451 | } else { |
208 | 466 | showEmptyPage(true) | 452 | showEmptyPage(true) |
209 | 467 | } | 453 | } |
210 | @@ -689,7 +675,7 @@ | |||
211 | 689 | KeyboardRectangle { | 675 | KeyboardRectangle { |
212 | 690 | id: keyboard | 676 | id: keyboard |
213 | 691 | active: mainPage.active && | 677 | active: mainPage.active && |
215 | 692 | (pageStack.bottomEdge && (pageStack.bottomEdge.status === BottomEdge.Hidden)) | 678 | !pageStack.bottomEdgeOpened |
216 | 693 | } | 679 | } |
217 | 694 | 680 | ||
218 | 695 | ABEmptyState { | 681 | ABEmptyState { |
219 | @@ -809,7 +795,7 @@ | |||
220 | 809 | id: bottomEdgeLoader | 795 | id: bottomEdgeLoader |
221 | 810 | 796 | ||
222 | 811 | enabled: false | 797 | enabled: false |
224 | 812 | active: (pageStack.columns === 1) && bottomEdgeLoader.enabled | 798 | active: true |
225 | 813 | asynchronous: true | 799 | asynchronous: true |
226 | 814 | sourceComponent: ABNewContactBottomEdge { | 800 | sourceComponent: ABNewContactBottomEdge { |
227 | 815 | id: bottomEdge | 801 | id: bottomEdge |
228 | @@ -818,40 +804,40 @@ | |||
229 | 818 | hint.flickable: contactList.view | 804 | hint.flickable: contactList.view |
230 | 819 | pageStack: mainPage.pageStack | 805 | pageStack: mainPage.pageStack |
231 | 820 | enabled: mainPage.active | 806 | enabled: mainPage.active |
232 | 807 | hintVisible: (pageStack.columns === 1) && bottomEdgeLoader.enabled | ||
233 | 808 | visible: hintVisible | ||
234 | 821 | } | 809 | } |
235 | 822 | } | 810 | } |
236 | 823 | 811 | ||
237 | 812 | Binding { | ||
238 | 813 | target: pageStack | ||
239 | 814 | property: '_bottomEdge' | ||
240 | 815 | value: bottomEdgeLoader.item | ||
241 | 816 | when: (bottomEdgeLoader.status === Loader.Ready) && | ||
242 | 817 | (pageStack.columns === 1) && | ||
243 | 818 | bottomEdgeLoader.enabled | ||
244 | 819 | } | ||
245 | 820 | |||
246 | 824 | Action { | 821 | Action { |
247 | 825 | iconName: "contact-new" | 822 | iconName: "contact-new" |
251 | 826 | enabled: mainPage.active && | 823 | enabled: mainPage.active && !mainPage.bottomEdgeOpened |
249 | 827 | (bottomEdgeLoader.status === Loader.Ready) && | ||
250 | 828 | (bottomEdgeLoader.item.status === BottomEdge.Hidden) | ||
252 | 829 | shortcut: "Ctrl+N" | 824 | shortcut: "Ctrl+N" |
253 | 830 | onTriggered: { | 825 | onTriggered: { |
254 | 831 | bottomEdgeLoader.item.commit() | 826 | bottomEdgeLoader.item.commit() |
255 | 832 | } | 827 | } |
256 | 833 | } | 828 | } |
257 | 834 | 829 | ||
258 | 835 | |||
259 | 836 | Binding { | ||
260 | 837 | target: pageStack | ||
261 | 838 | property: 'bottomEdge' | ||
262 | 839 | value: bottomEdgeLoader.item | ||
263 | 840 | when: bottomEdgeLoader.status == Loader.Ready | ||
264 | 841 | } | ||
265 | 842 | |||
266 | 843 | Connections { | 830 | Connections { |
267 | 844 | target: mainPage.contactModel | 831 | target: mainPage.contactModel |
268 | 845 | 832 | ||
269 | 846 | onContactsChanged: { | 833 | onContactsChanged: { |
276 | 847 | if (contactIndex) { | 834 | // if is a new contact show it |
277 | 848 | contactList.positionViewAtContact(mainPage.contactIndex) | 835 | if (mainPage._newContactId != "") { |
278 | 849 | mainPage.contactIndex = null | 836 | contactList.positionViewAtContactId(mainPage._newContactId) |
279 | 850 | // at this point the operation has finished already | 837 | mainPage._newContactId = "" |
274 | 851 | mainPage._creatingContact = false | ||
275 | 852 | mainPage.delayFetchContact() | ||
280 | 853 | } | 838 | } |
281 | 854 | } | 839 | } |
282 | 840 | |||
283 | 855 | onImportCompleted: { | 841 | onImportCompleted: { |
284 | 856 | if (mainPage._importingTestData) { | 842 | if (mainPage._importingTestData) { |
285 | 857 | mainPage._importingTestData = false | 843 | mainPage._importingTestData = false |
286 | @@ -879,22 +865,23 @@ | |||
287 | 879 | } | 865 | } |
288 | 880 | 866 | ||
289 | 881 | Connections { | 867 | Connections { |
303 | 882 | target: pageStack.bottomEdge | 868 | target: pageStack |
304 | 883 | onCommitCompleted: { | 869 | onBottomEdgeOpenedChanged: { |
305 | 884 | if (mainPage.state !== "default") { | 870 | if (pageStack.bottomEdgeOpened) { |
306 | 885 | mainPage.head.sections.selectedIndex = 0 | 871 | if (mainPage.state !== "default") { |
307 | 886 | mainPage.state = "default" | 872 | mainPage.head.sections.selectedIndex = 0 |
308 | 887 | } | 873 | mainPage.state = "default" |
309 | 888 | } | 874 | } |
310 | 889 | onCollapseCompleted: { | 875 | } else { |
311 | 890 | if (!mainPage._creatingContact) { | 876 | if (mainPage._creatingContact === "") { |
312 | 891 | if (contactList.currentIndex === -1) | 877 | if (contactList.currentIndex === -1) |
313 | 892 | contactList.currentIndex = 0 | 878 | contactList.currentIndex = 0 |
314 | 893 | mainPage.delayFetchContact() | 879 | mainPage.delayFetchContact() |
315 | 894 | } | 880 | } |
316 | 895 | 881 | ||
319 | 896 | if (mainPage.status === "default") { | 882 | if (mainPage.status === "default") { |
320 | 897 | contactList.forceActiveFocus() | 883 | contactList.forceActiveFocus() |
321 | 884 | } | ||
322 | 898 | } | 885 | } |
323 | 899 | } | 886 | } |
324 | 900 | } | 887 | } |
325 | 901 | 888 | ||
326 | === modified file 'src/imports/ABContactViewPage.qml' | |||
327 | --- src/imports/ABContactViewPage.qml 2016-02-13 02:35:02 +0000 | |||
328 | +++ src/imports/ABContactViewPage.qml 2016-08-19 12:45:42 +0000 | |||
329 | @@ -41,7 +41,7 @@ | |||
330 | 41 | _editPage = null | 41 | _editPage = null |
331 | 42 | } | 42 | } |
332 | 43 | if (pageStack.bottomEdge) { | 43 | if (pageStack.bottomEdge) { |
334 | 44 | pageStack.bottomEdge.collapse() | 44 | pageStack.bottomEdge.close() |
335 | 45 | } | 45 | } |
336 | 46 | } | 46 | } |
337 | 47 | 47 | ||
338 | @@ -55,7 +55,7 @@ | |||
339 | 55 | } | 55 | } |
340 | 56 | 56 | ||
341 | 57 | // Shortcut in case of single column | 57 | // Shortcut in case of single column |
343 | 58 | Action { | 58 | Action { |
344 | 59 | id: backAction | 59 | id: backAction |
345 | 60 | 60 | ||
346 | 61 | name: "cancel" | 61 | name: "cancel" |
347 | @@ -123,7 +123,6 @@ | |||
348 | 123 | Loader { | 123 | Loader { |
349 | 124 | id: bottomEdgeLoader | 124 | id: bottomEdgeLoader |
350 | 125 | 125 | ||
351 | 126 | active: (pageStack.columns > 1) | ||
352 | 127 | asynchronous: true | 126 | asynchronous: true |
353 | 128 | sourceComponent: ABNewContactBottomEdge { | 127 | sourceComponent: ABNewContactBottomEdge { |
354 | 129 | id: bottomEdge | 128 | id: bottomEdge |
355 | @@ -135,13 +134,14 @@ | |||
356 | 135 | pageStack: root.pageStack | 134 | pageStack: root.pageStack |
357 | 136 | hintVisible: false | 135 | hintVisible: false |
358 | 137 | enabled: !root.editing | 136 | enabled: !root.editing |
359 | 137 | visible: (pageStack.columns > 1) | ||
360 | 138 | } | 138 | } |
361 | 139 | } | 139 | } |
362 | 140 | 140 | ||
363 | 141 | Binding { | 141 | Binding { |
364 | 142 | target: pageStack | 142 | target: pageStack |
366 | 143 | property: 'bottomEdge' | 143 | property: '_bottomEdge' |
367 | 144 | value: bottomEdgeLoader.item | 144 | value: bottomEdgeLoader.item |
369 | 145 | when: bottomEdgeLoader.status === Loader.Ready | 145 | when: (bottomEdgeLoader.status === Loader.Ready) && (pageStack.columns > 1) |
370 | 146 | } | 146 | } |
371 | 147 | } | 147 | } |
372 | 148 | 148 | ||
373 | === modified file 'src/imports/ABMultiColumnEmptyState.qml' | |||
374 | --- src/imports/ABMultiColumnEmptyState.qml 2016-05-10 15:51:21 +0000 | |||
375 | +++ src/imports/ABMultiColumnEmptyState.qml 2016-08-19 12:45:42 +0000 | |||
376 | @@ -42,7 +42,7 @@ | |||
377 | 42 | function close() | 42 | function close() |
378 | 43 | { | 43 | { |
379 | 44 | if (bottomEdge.item) { | 44 | if (bottomEdge.item) { |
381 | 45 | bottomEdge.item.collapse() | 45 | bottomEdge.item.close() |
382 | 46 | } | 46 | } |
383 | 47 | } | 47 | } |
384 | 48 | 48 | ||
385 | @@ -64,12 +64,12 @@ | |||
386 | 64 | Loader { | 64 | Loader { |
387 | 65 | id: bottomEdgeLoader | 65 | id: bottomEdgeLoader |
388 | 66 | 66 | ||
389 | 67 | active: (pageStack.columns > 1) | ||
390 | 68 | asynchronous: true | 67 | asynchronous: true |
391 | 69 | sourceComponent: ABNewContactBottomEdge { | 68 | sourceComponent: ABNewContactBottomEdge { |
392 | 70 | id: bottomEdge | 69 | id: bottomEdge |
393 | 71 | 70 | ||
394 | 72 | hintVisible: false | 71 | hintVisible: false |
395 | 72 | visible: (pageStack.columns > 1) | ||
396 | 73 | parent: root | 73 | parent: root |
397 | 74 | height: root.height | 74 | height: root.height |
398 | 75 | modelToEdit: root.model | 75 | modelToEdit: root.model |
399 | @@ -88,17 +88,25 @@ | |||
400 | 88 | 88 | ||
401 | 89 | Binding { | 89 | Binding { |
402 | 90 | target: pageStack | 90 | target: pageStack |
404 | 91 | property: 'bottomEdge' | 91 | property: '_bottomEdge' |
405 | 92 | value: bottomEdgeLoader.item | 92 | value: bottomEdgeLoader.item |
407 | 93 | when: bottomEdgeLoader.status === Loader.Ready | 93 | when: (bottomEdgeLoader.status === Loader.Ready) && (pageStack.columns > 1) |
408 | 94 | } | 94 | } |
409 | 95 | 95 | ||
410 | 96 | |||
411 | 97 | // Remove empty page when app changes to 1 column mode | ||
412 | 96 | Connections { | 98 | Connections { |
413 | 97 | target: pageStack | 99 | target: pageStack |
416 | 98 | onColumnsChanged: { | 100 | onBottomEdgeOpenedChanged: { |
417 | 99 | if (pageStack.columns === 1) { | 101 | if (!pageStack.bottomEdgeOpened && (pageStack.columns === 1)) { |
418 | 100 | pageStack.removePages(root) | 102 | pageStack.removePages(root) |
419 | 101 | } | 103 | } |
420 | 102 | } | 104 | } |
421 | 103 | } | 105 | } |
422 | 106 | onActiveChanged: { | ||
423 | 107 | if (active && (pageStack.columns === 1)) { | ||
424 | 108 | pageStack.removePages(root) | ||
425 | 109 | } | ||
426 | 110 | |||
427 | 111 | } | ||
428 | 104 | } | 112 | } |
429 | 105 | 113 | ||
430 | === modified file 'src/imports/ABNewContactBottomEdge.qml' | |||
431 | --- src/imports/ABNewContactBottomEdge.qml 2016-02-12 23:03:19 +0000 | |||
432 | +++ src/imports/ABNewContactBottomEdge.qml 2016-08-19 12:45:42 +0000 | |||
433 | @@ -26,11 +26,6 @@ | |||
434 | 26 | property var pageStack: null | 26 | property var pageStack: null |
435 | 27 | property alias hintVisible: bottomEdgeHint.visible | 27 | property alias hintVisible: bottomEdgeHint.visible |
436 | 28 | property var _contactToEdit: null | 28 | property var _contactToEdit: null |
437 | 29 | // WORKAROUND: BottomEdge component loads the page async while draging it | ||
438 | 30 | // this cause a very bad visual. | ||
439 | 31 | // To avoid that we create it as soon as the component is ready and keep | ||
440 | 32 | // it invisible until the user start to drag it. | ||
441 | 33 | property var _realPage: null | ||
442 | 34 | 29 | ||
443 | 35 | function editContact(contact) | 30 | function editContact(contact) |
444 | 36 | { | 31 | { |
445 | @@ -38,6 +33,31 @@ | |||
446 | 38 | commit() | 33 | commit() |
447 | 39 | } | 34 | } |
448 | 40 | 35 | ||
449 | 36 | function close() | ||
450 | 37 | { | ||
451 | 38 | if (pageStack.bottomEdgeFloatingPage) { | ||
452 | 39 | pageStack.removePages(pageStack.bottomEdgeFloatingPage) | ||
453 | 40 | } | ||
454 | 41 | } | ||
455 | 42 | |||
456 | 43 | function pushPage() | ||
457 | 44 | { | ||
458 | 45 | var properties = {enabled: true, | ||
459 | 46 | visible: true, | ||
460 | 47 | parent: bottomEdge.parent} | ||
461 | 48 | if (bottomEdge._contactToEdit) | ||
462 | 49 | properties[contact] = bottomEdge._contactToEdit | ||
463 | 50 | |||
464 | 51 | |||
465 | 52 | var incubator = pageStack.addPageToNextColumn(bottomEdge.parent, editorPageBottomEdge, properties) | ||
466 | 53 | incubator.forceCompletion() | ||
467 | 54 | pageStack.bottomEdgeFloatingPage = incubator.object | ||
468 | 55 | incubator.object.Component.onDestruction.connect(function() { | ||
469 | 56 | pageStack.bottomEdgeFloatingPage = null | ||
470 | 57 | }) | ||
471 | 58 | bottomEdge._contactToEdit = null | ||
472 | 59 | } | ||
473 | 60 | |||
474 | 41 | hint { | 61 | hint { |
475 | 42 | id: bottomEdgeHint | 62 | id: bottomEdgeHint |
476 | 43 | action: Action { | 63 | action: Action { |
477 | @@ -48,42 +68,27 @@ | |||
478 | 48 | } | 68 | } |
479 | 49 | } | 69 | } |
480 | 50 | 70 | ||
489 | 51 | contentComponent: Item { | 71 | contentComponent: editorPageBottomEdge |
490 | 52 | id: pageContent | 72 | preloadContent: visible |
483 | 53 | |||
484 | 54 | implicitWidth: bottomEdge.width | ||
485 | 55 | implicitHeight: bottomEdge.height | ||
486 | 56 | children: bottomEdge._realPage | ||
487 | 57 | } | ||
488 | 58 | |||
491 | 59 | 73 | ||
492 | 60 | onCommitCompleted: { | 74 | onCommitCompleted: { |
504 | 61 | if (bottomEdge._contactToEdit) | 75 | pushPage() |
505 | 62 | editorPage.contact = bottomEdge._contactToEdit | 76 | collapse() |
495 | 63 | bottomEdge._contactToEdit = null | ||
496 | 64 | } | ||
497 | 65 | |||
498 | 66 | onCollapseCompleted: { | ||
499 | 67 | _realPage = editorPageBottomEdge.createObject(null) | ||
500 | 68 | } | ||
501 | 69 | |||
502 | 70 | Component.onCompleted: { | ||
503 | 71 | _realPage = editorPageBottomEdge.createObject(null) | ||
506 | 72 | } | 77 | } |
507 | 73 | 78 | ||
508 | 74 | Component { | 79 | Component { |
509 | 75 | id: editorPageBottomEdge | 80 | id: editorPageBottomEdge |
510 | 76 | 81 | ||
511 | 77 | ABContactEditorPage { | 82 | ABContactEditorPage { |
515 | 78 | implicitWidth: bottomEdge.width | 83 | id: editorPageItem |
516 | 79 | implicitHeight: bottomEdge.height | 84 | |
517 | 80 | contact: ContactsUI.ContactsJS.createEmptyContact("", bottomEdge) | 85 | implicitHeight: mainWindow.height |
518 | 86 | implicitWidth: parent ? parent.width : bottomEdge.width | ||
519 | 87 | enabled: false | ||
520 | 81 | model: bottomEdge.modelToEdit | 88 | model: bottomEdge.modelToEdit |
526 | 82 | enabled: bottomEdge.status === BottomEdge.Committed | 89 | contact: ContactsUI.ContactsJS.createEmptyContact("", editorPageItem) |
527 | 83 | active: bottomEdge.status === BottomEdge.Committed | 90 | onCanceled: pageStack.removePages(editorPageItem) |
528 | 84 | visible: bottomEdge.status !== BottomEdge.Hidden | 91 | onContactSaved: pageStack.removePages(editorPageItem) |
524 | 85 | onCanceled: bottomEdge.collapse() | ||
525 | 86 | onContactSaved: bottomEdge.collapse() | ||
529 | 87 | pageStack: bottomEdge.pageStack | 92 | pageStack: bottomEdge.pageStack |
530 | 88 | } | 93 | } |
531 | 89 | } | 94 | } |
532 | 90 | 95 | ||
533 | === modified file 'src/imports/MainWindow.qml' | |||
534 | --- src/imports/MainWindow.qml 2016-07-14 18:22:28 +0000 | |||
535 | +++ src/imports/MainWindow.qml 2016-08-19 12:45:42 +0000 | |||
536 | @@ -114,17 +114,21 @@ | |||
537 | 114 | objectName: "mainStack" | 114 | objectName: "mainStack" |
538 | 115 | 115 | ||
539 | 116 | property var contactListPage: null | 116 | property var contactListPage: null |
542 | 117 | property var bottomEdge: null | 117 | property var bottomEdgeFloatingPage: null |
543 | 118 | readonly property bool bottomEdgeOpened: (bottomEdge && bottomEdge.status === BottomEdge.Committed) | 118 | readonly property bool bottomEdgeOpened: bottomEdgeFloatingPage != null |
544 | 119 | readonly property bool hasMouse: ((miceModel.count > 0) || (touchPadModel.count > 0)) | 119 | readonly property bool hasMouse: ((miceModel.count > 0) || (touchPadModel.count > 0)) |
545 | 120 | readonly property bool hasKeyboard: (keyboardsModel.count > 0) | 120 | readonly property bool hasKeyboard: (keyboardsModel.count > 0) |
546 | 121 | property var _bottomEdge: null | ||
547 | 122 | |||
548 | 123 | function closeBottomEdge() | ||
549 | 124 | { | ||
550 | 125 | if (bottomEdgeFloatingPage) | ||
551 | 126 | mainStack.removePages(bottomEdgeFloatingPage); | ||
552 | 127 | } | ||
553 | 121 | 128 | ||
554 | 122 | function resetStack() | 129 | function resetStack() |
555 | 123 | { | 130 | { |
556 | 124 | if (bottomEdge) | ||
557 | 125 | bottomEdge.collapse() | ||
558 | 126 | mainStack.removePages(primaryPage); | 131 | mainStack.removePages(primaryPage); |
559 | 127 | |||
560 | 128 | } | 132 | } |
561 | 129 | 133 | ||
562 | 130 | function _nextItemInFocusChain(item, foward) | 134 | function _nextItemInFocusChain(item, foward) |
563 | @@ -182,13 +186,16 @@ | |||
564 | 182 | if (mainStack.columns > 1) { | 186 | if (mainStack.columns > 1) { |
565 | 183 | if (mainStack.contactListPage) | 187 | if (mainStack.contactListPage) |
566 | 184 | { | 188 | { |
568 | 185 | if (!mainStack.contactListPage.hasChildPage()) | 189 | if (!mainStack.contactListPage.hasChildPage() && !mainStack.bottomEdgeOpened) |
569 | 190 | console.debug("Fech contact:" + mainStack.bottomEdgeOpened) | ||
570 | 186 | mainStack.contactListPage.delayFetchContact() | 191 | mainStack.contactListPage.delayFetchContact() |
571 | 187 | } | 192 | } |
572 | 188 | else | 193 | else |
573 | 189 | { | 194 | { |
575 | 190 | if (!contactPage.hasChildPage()) | 195 | if (!contactPage.hasChildPage() && !mainStack.bottomEdgeOpened) { |
576 | 196 | console.debug("Push empty page:" + mainStack.bottomEdgeOpened) | ||
577 | 191 | mainStack.addPageToNextColumn(contactPage, Qt.resolvedUrl("./ABMultiColumnEmptyState.qml")) | 197 | mainStack.addPageToNextColumn(contactPage, Qt.resolvedUrl("./ABMultiColumnEmptyState.qml")) |
578 | 198 | } | ||
579 | 192 | } | 199 | } |
580 | 193 | } | 200 | } |
581 | 194 | } | 201 | } |
582 | @@ -208,7 +215,7 @@ | |||
583 | 208 | 215 | ||
584 | 209 | // WORKAROUND: Due the missing feature on SDK, they can not detect if | 216 | // WORKAROUND: Due the missing feature on SDK, they can not detect if |
585 | 210 | // there is a mouse attached to device or not. And this will cause the | 217 | // there is a mouse attached to device or not. And this will cause the |
587 | 211 | // bootom edge component to not work correct on desktop. | 218 | // bottom edge component to not work correct on desktop. |
588 | 212 | // We will consider that a mouse is always attached until it get implement on SDK. | 219 | // We will consider that a mouse is always attached until it get implement on SDK. |
589 | 213 | Binding { | 220 | Binding { |
590 | 214 | target: QuickUtils | 221 | target: QuickUtils |
591 | 215 | 222 | ||
592 | === modified file 'src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml' | |||
593 | --- src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml 2015-12-10 19:15:15 +0000 | |||
594 | +++ src/imports/Ubuntu/AddressBook/Base/ContactDetailBase.qml 2016-08-19 12:45:42 +0000 | |||
595 | @@ -97,7 +97,6 @@ | |||
596 | 97 | } else if ((detail in detailNameMap) && (field == -1)){ | 97 | } else if ((detail in detailNameMap) && (field == -1)){ |
597 | 98 | return detailNameMap[detail] | 98 | return detailNameMap[detail] |
598 | 99 | } else { | 99 | } else { |
599 | 100 | console.debug("Unknown : [" + detail + "] [" + field + "]") | ||
600 | 101 | return "unknown" | 100 | return "unknown" |
601 | 102 | } | 101 | } |
602 | 103 | } | 102 | } |
603 | 104 | 103 | ||
604 | === modified file 'src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml' | |||
605 | --- src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml 2015-10-26 13:18:11 +0000 | |||
606 | +++ src/imports/Ubuntu/AddressBook/Base/ContactDetailItem.qml 2016-08-19 12:45:42 +0000 | |||
607 | @@ -23,7 +23,7 @@ | |||
608 | 23 | id: root | 23 | id: root |
609 | 24 | 24 | ||
610 | 25 | readonly property alias fieldDelegates: fieldsColumn.children | 25 | readonly property alias fieldDelegates: fieldsColumn.children |
612 | 26 | property Component fieldDelegate: null | 26 | property alias fieldDelegate: fieldRepeater.delegate |
613 | 27 | property alias spacing: fieldsColumn.spacing | 27 | property alias spacing: fieldsColumn.spacing |
614 | 28 | 28 | ||
615 | 29 | implicitHeight: fieldsColumn.height | 29 | implicitHeight: fieldsColumn.height |
616 | @@ -36,26 +36,14 @@ | |||
617 | 36 | } | 36 | } |
618 | 37 | spacing: units.gu(2) | 37 | spacing: units.gu(2) |
619 | 38 | 38 | ||
621 | 39 | height: childrenRect.height | 39 | //height: childrenRect.height |
622 | 40 | Repeater { | 40 | Repeater { |
623 | 41 | id: fieldRepeater | 41 | id: fieldRepeater |
624 | 42 | 42 | ||
625 | 43 | model: root.fields | 43 | model: root.fields |
641 | 44 | Loader { | 44 | onItemAdded: { |
642 | 45 | id: field | 45 | item.field = Qt.binding(function() { return model[index] }) |
643 | 46 | 46 | item.detail = Qt.binding(function() { return root.detail }) | |
629 | 47 | sourceComponent: fieldDelegate | ||
630 | 48 | Binding { | ||
631 | 49 | target: item | ||
632 | 50 | property: "field" | ||
633 | 51 | value: modelData | ||
634 | 52 | } | ||
635 | 53 | |||
636 | 54 | Binding { | ||
637 | 55 | target: item | ||
638 | 56 | property: "detail" | ||
639 | 57 | value: root.detail | ||
640 | 58 | } | ||
644 | 59 | } | 47 | } |
645 | 60 | } | 48 | } |
646 | 61 | } | 49 | } |
647 | 62 | 50 | ||
648 | === modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml' | |||
649 | --- src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml 2016-05-06 17:03:26 +0000 | |||
650 | +++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactDetailNameEditor.qml 2016-08-19 12:45:42 +0000 | |||
651 | @@ -96,11 +96,15 @@ | |||
652 | 96 | } | 96 | } |
653 | 97 | 97 | ||
654 | 98 | focus: true | 98 | focus: true |
657 | 99 | width: root.width - units.gu(4) | 99 | anchors { |
658 | 100 | x: units.gu(2) | 100 | left: parent.left |
659 | 101 | right: parent.right | ||
660 | 102 | margins: units.gu(2) | ||
661 | 103 | } | ||
662 | 104 | height: units.gu(4) | ||
663 | 101 | detail: root.detail | 105 | detail: root.detail |
664 | 102 | visible: field === Name.MiddleName ? root.showMiddleName : true | 106 | visible: field === Name.MiddleName ? root.showMiddleName : true |
666 | 103 | height: visible ? units.gu(4) : 0 | 107 | |
667 | 104 | placeholderText: placeholderTextFromField(field) | 108 | placeholderText: placeholderTextFromField(field) |
668 | 105 | inputMethodHints: Qt.ImhNoPredictiveText | 109 | inputMethodHints: Qt.ImhNoPredictiveText |
669 | 106 | onTextChanged: checkIsEmpty() | 110 | onTextChanged: checkIsEmpty() |
670 | 107 | 111 | ||
671 | === modified file 'src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml' | |||
672 | --- src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-05-04 19:42:04 +0000 | |||
673 | +++ src/imports/Ubuntu/AddressBook/ContactEditor/ContactEditorPage.qml 2016-08-19 12:45:42 +0000 | |||
674 | @@ -43,6 +43,15 @@ | |||
675 | 43 | signal contactSaved(var contact); | 43 | signal contactSaved(var contact); |
676 | 44 | signal canceled() | 44 | signal canceled() |
677 | 45 | 45 | ||
678 | 46 | function close() { | ||
679 | 47 | if (pageStack.removePages) { | ||
680 | 48 | pageStack.removePages(contactEditor) | ||
681 | 49 | } else { | ||
682 | 50 | pageStack.pop() | ||
683 | 51 | } | ||
684 | 52 | } | ||
685 | 53 | |||
686 | 54 | |||
687 | 46 | function cancel() { | 55 | function cancel() { |
688 | 47 | for (var i = 0; i < contactEditor.newDetails.length; ++i) { | 56 | for (var i = 0; i < contactEditor.newDetails.length; ++i) { |
689 | 48 | contactEditor.contact.removeDetail(contactEditor.newDetails[i]) | 57 | contactEditor.contact.removeDetail(contactEditor.newDetails[i]) |
690 | @@ -93,15 +102,11 @@ | |||
691 | 93 | if (changed) { | 102 | if (changed) { |
692 | 94 | // backend error will be handled by the root page (contact list) | 103 | // backend error will be handled by the root page (contact list) |
693 | 95 | var newContact = (contact.model == null) | 104 | var newContact = (contact.model == null) |
694 | 105 | contactEditor.enabled = false | ||
695 | 106 | contact.onContactChanged.connect(contactEditor._onContactSaved) | ||
696 | 96 | contactEditor.model.saveContact(contact) | 107 | contactEditor.model.saveContact(contact) |
697 | 97 | if (newContact) { | ||
698 | 98 | contactEditor.contactSaved(contact) | ||
699 | 99 | } | ||
700 | 100 | } | ||
701 | 101 | if (pageStack.removePages) { | ||
702 | 102 | pageStack.removePages(contactEditor) | ||
703 | 103 | } else { | 108 | } else { |
705 | 104 | pageStack.pop() | 109 | close() |
706 | 105 | } | 110 | } |
707 | 106 | } | 111 | } |
708 | 107 | 112 | ||
709 | @@ -174,6 +179,13 @@ | |||
710 | 174 | } | 179 | } |
711 | 175 | } | 180 | } |
712 | 176 | 181 | ||
713 | 182 | function _onContactSaved() | ||
714 | 183 | { | ||
715 | 184 | contact.onContactChanged.disconnect(contactEditor._onContactSaved) | ||
716 | 185 | contactEditor.contactSaved(contact) | ||
717 | 186 | close() | ||
718 | 187 | } | ||
719 | 188 | |||
720 | 177 | Timer { | 189 | Timer { |
721 | 178 | id: timerMakemakeMeVisible | 190 | id: timerMakemakeMeVisible |
722 | 179 | 191 | ||
723 | @@ -196,7 +208,7 @@ | |||
724 | 196 | } | 208 | } |
725 | 197 | } | 209 | } |
726 | 198 | 210 | ||
728 | 199 | enabled: false | 211 | enabled: active |
729 | 200 | flickable: null | 212 | flickable: null |
730 | 201 | Timer { | 213 | Timer { |
731 | 202 | id: focusTimer | 214 | id: focusTimer |
732 | @@ -482,15 +494,11 @@ | |||
733 | 482 | } | 494 | } |
734 | 483 | 495 | ||
735 | 484 | onActiveChanged: { | 496 | onActiveChanged: { |
737 | 485 | if (!active) { | 497 | if (!active || !enabled) { |
738 | 486 | return | 498 | return |
739 | 487 | } | 499 | } |
740 | 488 | 500 | ||
746 | 489 | if (contactEditor.initialFocusSection != "") { | 501 | focusTimer.restart() |
742 | 490 | focusTimer.restart() | ||
743 | 491 | } else { | ||
744 | 492 | contactEditor.ready() | ||
745 | 493 | } | ||
747 | 494 | } | 502 | } |
748 | 495 | 503 | ||
749 | 496 | Component { | 504 | Component { |
750 | 497 | 505 | ||
751 | === modified file 'src/imports/Ubuntu/Contacts/ContactListView.qml' | |||
752 | --- src/imports/Ubuntu/Contacts/ContactListView.qml 2016-06-21 00:57:29 +0000 | |||
753 | +++ src/imports/Ubuntu/Contacts/ContactListView.qml 2016-08-19 12:45:42 +0000 | |||
754 | @@ -332,6 +332,10 @@ | |||
755 | 332 | { | 332 | { |
756 | 333 | view.positionViewAtContact(contact) | 333 | view.positionViewAtContact(contact) |
757 | 334 | } | 334 | } |
758 | 335 | function positionViewAtContactId(contactId) | ||
759 | 336 | { | ||
760 | 337 | view.positionViewAtContactId(contactId) | ||
761 | 338 | } | ||
762 | 335 | function positionViewAtBeginning() | 339 | function positionViewAtBeginning() |
763 | 336 | { | 340 | { |
764 | 337 | moveToBegining.restart() | 341 | moveToBegining.restart() |
765 | 338 | 342 | ||
766 | === modified file 'src/imports/Ubuntu/Contacts/ContactSimpleListView.qml' | |||
767 | --- src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2016-02-05 16:07:45 +0000 | |||
768 | +++ src/imports/Ubuntu/Contacts/ContactSimpleListView.qml 2016-08-19 12:45:42 +0000 | |||
769 | @@ -208,6 +208,24 @@ | |||
770 | 208 | positionViewAtIndex(currentIndex, ListView.Center) | 208 | positionViewAtIndex(currentIndex, ListView.Center) |
771 | 209 | } | 209 | } |
772 | 210 | 210 | ||
773 | 211 | |||
774 | 212 | /*! | ||
775 | 213 | Scroll the list to requested contact if the contact exists in the list | ||
776 | 214 | */ | ||
777 | 215 | function positionViewAtContactId(contactId) | ||
778 | 216 | { | ||
779 | 217 | var contacts = listModel.contacts | ||
780 | 218 | |||
781 | 219 | for (var i = 0, count = contacts.length; i < count; i++) { | ||
782 | 220 | var c = contacts[i] | ||
783 | 221 | if (c.contactId === contactId) { | ||
784 | 222 | currentIndex = i | ||
785 | 223 | positionViewAtIndex(i, ListView.Center) | ||
786 | 224 | return | ||
787 | 225 | } | ||
788 | 226 | } | ||
789 | 227 | } | ||
790 | 228 | |||
791 | 211 | /*! | 229 | /*! |
792 | 212 | private | 230 | private |
793 | 213 | Fetch contact and emit contact clicked signal | 231 | Fetch contact and emit contact clicked signal |
794 | 214 | 232 | ||
795 | === modified file 'tests/qml/tst_ContactEditor.qml' | |||
796 | --- tests/qml/tst_ContactEditor.qml 2015-12-16 18:35:33 +0000 | |||
797 | +++ tests/qml/tst_ContactEditor.qml 2016-08-19 12:45:42 +0000 | |||
798 | @@ -46,6 +46,7 @@ | |||
799 | 46 | anchors.fill: parent | 46 | anchors.fill: parent |
800 | 47 | model: dummyDataModel | 47 | model: dummyDataModel |
801 | 48 | contact: createEmptyContact('') | 48 | contact: createEmptyContact('') |
802 | 49 | enabled: true | ||
803 | 49 | } | 50 | } |
804 | 50 | } | 51 | } |
805 | 51 | 52 |
FAILED: Continuous integration, rev:621 /jenkins. canonical. com/system- apps/job/ lp-address- book-app- ci/13/ /jenkins. canonical. com/system- apps/job/ build/1229/ console /jenkins. canonical. com/system- apps/job/ build-0- fetch/1229 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= vivid+overlay/ 1103 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1103 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= yakkety/ 1103 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1090/console /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1090/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1090 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1090/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-address- book-app- ci/13/rebuild
https:/