import QtQuick 2.0 import Sailfish.Silica 1.0 import "../../js/functions.js" as ManifoldJS Page { id: page // The effective value will be restricted by ApplicationWindow.allowedOrientations allowedOrientations: Orientation.All SilicaListView { id: taskList model: ListModel { id: model} anchors.fill: parent header: PageHeader { title: "Maniphest Tasks"} spacing: Theme.paddingSmall PullDownMenu { MenuItem { text: qsTr("Refresh") onClicked: ManifoldJS.refreshManiphestPage(settings.phab_url, settings.api_token); } } delegate: ListItem { id: myDelegate menu: contextMenu Label { id: label text: "T" + taskID + " | " + status + " | " + priorityName color: priorityColor } Label { anchors.top: label.bottom text: title font.pixelSize: Theme.fontSizeSmall wrapMode: Text.WordWrap } Component { id: contextMenu ContextMenu { MenuItem { text: "Open" onClicked: Qt.openUrlExternally(settings.phab_url + "/T" + taskID) } } } } Component.onCompleted: { ManifoldJS.refreshManiphestPage(settings.phab_url, settings.api_token); } VerticalScrollDecorator {} } }