ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00167
[Merge] lp:~mzanetti/reminders-app/fix-search into lp:reminders-app
Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/fix-search into lp:reminders-app.
Commit message:
fix search
Requested reviews:
Ubuntu Reminders app developers (reminders-app-dev)
For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/fix-search/+merge/251348
--
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/fix-search into lp:reminders-app.
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml 2015-02-24 18:33:04 +0000
+++ src/app/qml/reminders.qml 2015-02-28 01:44:32 +0000
@@ -144,6 +144,13 @@
}
}
+ function openSearch() {
+ var component = Qt.createComponent(Qt.resolvedUrl("ui/SearchNotesPage.qml"))
+ var page = component.createObject();
+ pagestack.push(page)
+ page.noteSelected.connect(function(note) {root.displayNote(note)})
+ }
+
function doLogin() {
var accountName = preferences.accountName;
if (accountName == "@local") {
@@ -453,12 +460,7 @@
sideViewLoader.clear();
}
}
- onOpenSearch: {
- var component = Qt.createComponent(Qt.resolvedUrl("ui/SearchNotesPage.qml"))
- var page = component.createObject();
- pagestack.push(page)
- page.noteSelected.connect(function(note) {root.displayNote(note)})
- }
+ onOpenSearch: root.openSearch();
}
}
@@ -490,6 +492,8 @@
})
NotesStore.refreshNotes();
}
+
+ onOpenSearch: root.openSearch();
}
}
@@ -505,6 +509,8 @@
sideViewLoader.clear();
}
}
+
+ onOpenSearch: root.openSearch();
}
}
@@ -532,6 +538,8 @@
})
NotesStore.refreshNotes();
}
+
+ onOpenSearch: root.openSearch();
}
}
}
=== modified file 'src/app/qml/ui/NotebooksPage.qml'
--- src/app/qml/ui/NotebooksPage.qml 2014-12-14 22:31:00 +0000
+++ src/app/qml/ui/NotebooksPage.qml 2015-02-28 01:44:32 +0000
@@ -29,6 +29,7 @@
property bool narrowMode
signal openNotebook(string notebookGuid)
+ signal openSearch();
onActiveChanged: {
if (active) {
@@ -53,7 +54,7 @@
text: i18n.tr("Search")
iconName: "search"
onTriggered: {
- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
+ root.openSearch();
}
}
}
=== modified file 'src/app/qml/ui/RemindersPage.qml'
--- src/app/qml/ui/RemindersPage.qml 2015-02-13 00:10:26 +0000
+++ src/app/qml/ui/RemindersPage.qml 2015-02-28 01:44:32 +0000
@@ -28,13 +28,15 @@
property var selectedNote: null
+ signal openSearch();
+
tools: ToolbarItems {
ToolbarButton {
action: Action {
text: i18n.tr("Search")
iconName: "search"
onTriggered: {
- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
+ root.openSearch();
}
}
}
=== modified file 'src/app/qml/ui/SearchNotesPage.qml'
--- src/app/qml/ui/SearchNotesPage.qml 2014-09-23 12:39:27 +0000
+++ src/app/qml/ui/SearchNotesPage.qml 2015-02-28 01:44:32 +0000
@@ -73,14 +73,42 @@
delegate: NotesDelegate {
title: model.title
- creationDate: model.created
- content: model.plaintextContent
-
- onClicked: {
+ date: model.created
+ content: model.tagline
+ resource: model.resourceUrls.length > 0 ? model.resourceUrls[0] : ""
+ notebookColor: preferences.colorForNotebook(model.notebookGuid)
+ reminder: model.reminder
+ synced: model.synced
+ loading: model.loading
+ syncError: model.syncError
+ conflicting: model.conflicting
+
+ triggerActionOnMouseRelease: true
+ tags: {
+ var tags = new Array();
+ for (var i = 0; i < model.tagGuids.length; i++) {
+ tags.push(NotesStore.tag(model.tagGuids[i]).name)
+ }
+ return tags.join(" ");
+ }
+
+ onItemClicked: {
root.noteSelected(NotesStore.note(guid))
}
+ onDeleteNote: {
+ NotesStore.deleteNote(model.guid)
+ }
+ onEditNote: {
+ root.editNote(NotesStore.note(model.guid));
+ }
+ onEditReminder: {
+ pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: NotesStore.note(model.guid) });
+ }
+ onEditTags: {
+ PopupUtils.open(Qt.resolvedUrl("../components/EditTagsDialog.qml"), root,
+ { note: NotesStore.note(model.guid), pageHeight: root.height });
+ }
}
}
-
}
}
=== modified file 'src/app/qml/ui/TagsPage.qml'
--- src/app/qml/ui/TagsPage.qml 2014-12-14 22:31:00 +0000
+++ src/app/qml/ui/TagsPage.qml 2015-02-28 01:44:32 +0000
@@ -29,6 +29,7 @@
property bool narrowMode
signal openTaggedNotes(string tagGuid)
+ signal openSearch();
onActiveChanged: {
if (active) {
@@ -50,7 +51,7 @@
text: i18n.tr("Search")
iconName: "search"
onTriggered: {
- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
+ root.openSearch();
}
}
}
Follow ups