Friendiqa v0.3
This commit is contained in:
parent
585e329bcb
commit
bda2d9f7b5
63 changed files with 2746 additions and 1357 deletions
|
@ -37,7 +37,7 @@ function friendicaRequest(login,api,rootwindow,callback) {
|
|||
xhrequest.onreadystatechange = function() {
|
||||
if(xhrequest.readyState === XMLHttpRequest.DONE) {
|
||||
try{
|
||||
if (xhrequest.status=200){
|
||||
if (xhrequest.status==200){
|
||||
callback(xhrequest.responseText)
|
||||
}else{
|
||||
showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
|
||||
|
@ -65,7 +65,7 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
|
|||
callback(xhrequest.responseText)
|
||||
}
|
||||
}
|
||||
catch (e){showMessage("Error", "API:\n" + +api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
|
||||
catch (e){showMessage("Error", "API:\n" + api+" "+e+"\n Return:"+xhrequest.responseText,rootwindow)}
|
||||
}
|
||||
}
|
||||
xhrequest.open(method, login.server+api,true,login.username,Qt.atob(login.password));
|
||||
|
@ -151,7 +151,7 @@ var where = " AND "+ filter +" = '" + filtervalue+"'";
|
|||
});
|
||||
}
|
||||
|
||||
function showMessage(header,message,rootwindow){//print("message: "+message);
|
||||
function showMessage(header,message,rootwindow){print("message: "+message);
|
||||
var cleanmessage=message.replace(/"/g,"-"); //print(cleanmessage);
|
||||
if(cleanmessage.length>200){cleanmessage=cleanmessage.slice(0,200)+'...'}
|
||||
var messageString='import QtQuick 2.0; import QtQuick.Dialogs 1.2; MessageDialog{ visible: true; title:"'+header+'";standardButtons: StandardButton.Ok; text:" '+cleanmessage+'"}';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue