Commit cff3da9a authored by Martin Straka's avatar Martin Straka

Updated recipient delegate layout in the send message page

parent 60b25057
......@@ -36,7 +36,7 @@ ListView {
property bool canSelectBoxes: false // enables selecting of entries
property bool canDeselectBoxes: false // enables deselecting of entries
property bool canRemoveBoxes: false // enables removing of entries
property bool isContact: false // true enables contact grid, false search grid
property bool isRecipientOrContact: false // true enables and shows recipient/contact grid
/* This signal should be captured to implement model interaction. */
signal boxDetail(string boxId)
......@@ -55,7 +55,7 @@ ListView {
anchors.margins: defaultMargin
GridLayout {
id: gridSearchDatabox
visible: !isContact
visible: !isRecipientOrContact
columns: 2
rows: 3
rowSpacing: defaultMargin * 0.6
......@@ -98,8 +98,8 @@ ListView {
}
} // GridLayout
GridLayout {
id: gridContaxtDatabox
visible: isContact
id: gridRecipientOrContaxtDatabox
visible: isRecipientOrContact
columns: 1
rows: 3
rowSpacing: defaultMargin * 0.6
......@@ -118,7 +118,15 @@ ListView {
Text {
id: r3c1c
font.pointSize: textFontSizeSmall
text: (rDbIc == "") ? "ID: " + rDbID : "ID: " + rDbID + " IČ: " + rDbIc
text: if (rDbIc != "" && rDbType != "") {
"ID: " + rDbID + " (" + rDbType + ") IČ: " + rDbIc
} else if (rDbIc == "" && rDbType != "") {
"ID: " + rDbID + " (" + rDbType + ")"
} else if (rDbIc != "" && rDbType == "") {
"ID: " + rDbID + " IČ: " + rDbIc
} else {
"ID: " + rDbID
}
}
} // GridLayout
} // Item
......
......@@ -127,7 +127,7 @@ Item {
canDetailBoxes: recipBoxModel == null
canSelectBoxes: recipBoxModel != null
canDeselectBoxes: recipBoxModel != null
isContact: true
isRecipientOrContact: true
onBoxSelect: {
var boxEntry = foundBoxModel.entry(boxId)
statusBar.visible = false
......
......@@ -321,6 +321,7 @@ Item {
interactive: true
model: recipBoxModel
canRemoveBoxes: true
isRecipientOrContact: true
onCountChanged: {
mainPanel.areReguiredFieldsFilled()
}
......
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