forked from lubuwest/Friendiqa
Version 0.002 code cleanup and event attending
This commit is contained in:
parent
dc7e6cdee5
commit
d8186978e7
42 changed files with 925 additions and 968 deletions
|
@ -1,7 +1,7 @@
|
|||
// message.qml
|
||||
// message with buttons
|
||||
import QtQuick 2.0
|
||||
import QtQml 2.2
|
||||
//import QtQml 2.2
|
||||
import QtQuick.Controls 1.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
@ -13,7 +13,6 @@ Flickable{
|
|||
contentHeight: messageColumn.height
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
id:messageSend
|
||||
//property var login
|
||||
property string parentId: ""
|
||||
property string reply_to_user:""
|
||||
property string attachImageURL: "";
|
||||
|
@ -135,7 +134,6 @@ Flickable{
|
|||
if (attachImageURL!=""){
|
||||
Helperjs.showMessage( qsTr("Error"),qsTr("Only one attachment. Remove other attachment first!"), messageColumn)}
|
||||
else{
|
||||
try{imageAttachmentObject.destroy()}catch(e){print(e)}
|
||||
imageAttachmentDialog.open()}
|
||||
}
|
||||
}
|
||||
|
@ -156,28 +154,25 @@ Flickable{
|
|||
id: cancelButton
|
||||
text: qsTr("Cancel")
|
||||
onClicked: {newstab.newstabstatus=login.newsViewType;
|
||||
|
||||
newsStack.pop()}
|
||||
newsStack.pop()}
|
||||
}
|
||||
BlueButton {
|
||||
id: sendButton
|
||||
text: qsTr("Send")
|
||||
onClicked: {
|
||||
//print("login: "+login.server+login.username);
|
||||
var title=titleField.text.replace("\"","\'");
|
||||
var body=bodyField.getText(0,bodyField.length);
|
||||
if (directmessage==0){
|
||||
statusUpdate(title,body,messageSend.parentId,attachImageURL.toString())}
|
||||
else {dmUpdate(title,body,"",messageSend.reply_to_user) }
|
||||
newsStack.pop()
|
||||
newstab.newstabstatus=login.newsViewType; newsStack.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FileDialog {
|
||||
FileDialog {
|
||||
id: imageAttachmentDialog
|
||||
title: "Please choose a picture"
|
||||
folder: shortcuts.pictures
|
||||
|
@ -192,8 +187,5 @@ newsStack.pop()}
|
|||
else{attachImageURL=imageAttachmentDialog.fileUrl;}
|
||||
|
||||
}
|
||||
onRejected: {
|
||||
//console.log("Canceled")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue