Commit db819c06 authored by Martin Straka's avatar Martin Straka

Updaded upload message page layout

parent 93a1eb21
......@@ -168,7 +168,7 @@ Component {
funcName: "useTemplate"
}
ListElement {
image: "qrc:/ui/briefcase.svg"
image: "qrc:/ui/folder-upload.svg"
showEntry: true
showNext: true
name: qsTr("Upload to records management")
......
......@@ -43,6 +43,7 @@ Component {
property var messageModel: null
Component.onCompleted: {
uploadButton.enabled = false
uploadHierarchyProxyModel.setSourceModel(uploadHierarchyListModel)
uploadHierarchyProxyModel.sort()
timer.start()
......@@ -72,7 +73,7 @@ Component {
id: uploadHierarchyListModel
onModelReset: {
uploadHierarchyProxyModel.sort()
locationLabel.text = uploadHierarchyListModel.navigatedRootName(true, "/")
locationLabel.text = uploadHierarchyListModel.navigatedRootName(true, " / ")
}
Component.onCompleted: {
}
......@@ -96,70 +97,44 @@ Component {
spacing: defaultMargin
anchors.right: parent.right
anchors.rightMargin: defaultMargin
AccessibleImageButton {
id: searchButton
AccessibleOverlaidImageButton {
id: uploadButton
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeightHeader
source: "qrc:/ui/magnify.svg"
accessibleName: qsTr("Filter upload hierarchy.")
anchors.right: parent.right
anchors.rightMargin: defaultMargin
image.sourceSize.height: imgHeightHeader
image.source: "qrc:/ui/folder-upload.svg"
accessibleName: qsTr("Send message to records management.")
onClicked: {
filterBar.visible = true
uploadHierarchyList.anchors.top = filterBar.bottom
filterBar.filterField.forceActiveFocus()
Qt.inputMethod.show()
uploadButton.enabled = false
if (recordsManagement.uploadMessage(userName, msgId, msgType, uploadHierarchyListModel)) {
messages.updateRmStatus(messageModel, userName, msgId, true)
pageView.pop(StackView.Immediate)
}
uploadButton.enabled = true
}
}
}
}
AccessibleText {
id: topText
anchors.top: headerBar.bottom
anchors.topMargin: defaultMargin
color: datovkaPalette.mid
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
width: parent.width
text: qsTr("The message can be uploaded into selected locations in the records management hierarchy.")
}
Row {
id: buttonRow
spacing: formItemVerticalSpacing * 5
anchors.top: topText.bottom
anchors.horizontalCenter: parent.horizontalCenter
AccessibleButton {
id: hierarchyButton
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: qsTr("Update upload hierarchy")
onClicked: {
downloadUploadHierarchy()
}
}
AccessibleButton {
id: uploadButton
visible: false
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: qsTr("Upload message")
onClicked: {
if (recordsManagement.uploadMessage(userName, msgId, msgType, uploadHierarchyListModel)) {
messages.updateRmStatus(messageModel, userName, msgId, true)
pageView.pop(StackView.Immediate)
}
}
}
}
Row {
id: navigateUpRow
spacing: formItemVerticalSpacing * 5
anchors.top: buttonRow.bottom
spacing: formItemVerticalSpacing * 3
anchors.top: topText.bottom
anchors.left: parent.left
anchors.right: parent.right
AccessibleButton {
id: upButton
anchors {
verticalCenter: parent.verticalCenter;
}
anchors.verticalCenter: parent.verticalCenter
text: "<"
accessibleName: qsTr("Up") /* Needs to be specified as "<" is not read. */
onClicked: {
......@@ -168,10 +143,37 @@ Component {
}
AccessibleText {
id: locationLabel
anchors {
verticalCenter: parent.verticalCenter;
anchors.verticalCenter: parent.verticalCenter
text: " / "
}
}
Row {
id: navigateToolBar
spacing: formItemVerticalSpacing * 3
anchors.top: topText.bottom
anchors.right: parent.right
AccessibleImageButton {
id: searchButton
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeightHeader
source: "qrc:/ui/magnify.svg"
accessibleName: qsTr("Filter upload hierarchy.")
onClicked: {
filterBar.visible = true
uploadHierarchyList.anchors.top = filterBar.bottom
filterBar.filterField.forceActiveFocus()
Qt.inputMethod.show()
}
}
AccessibleImageButton {
id: hierarchyButton
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeightHeader
source: "qrc:/ui/sync.svg"
accessibleName: qsTr("Update upload hierarchy.")
onClicked: {
downloadUploadHierarchy()
}
text: "/"
}
}
Rectangle {
......@@ -194,7 +196,7 @@ Component {
placeholderText: qsTr("Set filter")
fontPointSize: defaultTextFont.font.pointSize
buttonImageHeight: imgHeight
buttonAccessibleName: qsTr("Clear and hide filter field")
buttonAccessibleName: qsTr("Clear and hide filter field.")
onTextChanged: {
uploadHierarchyProxyModel.setFilterRegExpStr(text)
......@@ -282,8 +284,7 @@ Component {
} else if (rSelectable) {
uploadHierarchyListModel.toggleNodeSelection(
uploadHierarchyProxyModel.mapToSource(index))
uploadButton.visible = (uploadHierarchyListModel.selectedIds().length > 0)
hierarchyButton.visible = !uploadButton.visible
uploadButton.enabled = (uploadHierarchyListModel.selectedIds().length > 0)
}
}
......
......@@ -63,6 +63,7 @@
<file>ui/file-import.svg</file>
<file>ui/folder-account.svg</file>
<file>ui/folder-download.svg</file>
<file>ui/folder-upload.svg</file>
<file>ui/format-list-bulleted.svg</file>
<file>ui/forward.svg</file>
<file>ui/help-circle.svg</file>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by IcoMoon.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<path fill="#000000" d="M9 4l-2-2h-7v13h16v-11h-7zM8 7.5l3.5 3.5h-2.5v4h-2v-4h-2.5l3.5-3.5z"></path>
</svg>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment