v0.6.2 Bugfix: download and upload public images, comments in timeline
This commit is contained in:
parent
baccd64303
commit
d09a55bcd9
|
@ -2,7 +2,8 @@
|
||||||
## v0.6.2
|
## v0.6.2
|
||||||
* Follow and Unfollow contacts (Friendica 2021.07 required)
|
* Follow and Unfollow contacts (Friendica 2021.07 required)
|
||||||
* Linux: App stays in systemtray after close, syncs in background
|
* Linux: App stays in systemtray after close, syncs in background
|
||||||
|
* bugfix for bulk image upload and download of public images
|
||||||
|
* bugfix for conversations in timeline
|
||||||
|
|
||||||
## v0.6.1
|
## v0.6.1
|
||||||
* Add requestLegacyExternalStorage in AndroidManifest for attachment permissions
|
* Add requestLegacyExternalStorage in AndroidManifest for attachment permissions
|
||||||
|
|
|
@ -69,8 +69,8 @@ ToDo:
|
||||||
|
|
||||||
# Images #
|
# Images #
|
||||||
Currently supported:
|
Currently supported:
|
||||||
* Download public and private own images to local directory
|
* Download public own images to local directory
|
||||||
* Upload picture to album with descriptions(public), send from gallery
|
* Upload public picture to album with descriptions, send from gallery
|
||||||
* Delete own pictures and albums on client and server
|
* Delete own pictures and albums on client and server
|
||||||
* Change name or album of existing picture
|
* Change name or album of existing picture
|
||||||
* Show albums in grid, show images in album in grid and fullscreen
|
* Show albums in grid, show images in album in grid and fullscreen
|
||||||
|
|
|
@ -45,14 +45,14 @@ ALARM::ALARM(QObject *parent) : QObject(parent){}
|
||||||
|
|
||||||
void ALARM::setAlarm(int interval)
|
void ALARM::setAlarm(int interval)
|
||||||
{
|
{
|
||||||
qDebug() << interval;
|
//qDebug() << interval;
|
||||||
QVariantMap message;
|
QVariantMap message;
|
||||||
message["value"] = interval;
|
message["value"] = interval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALARM::notify(QString title, QString text, int id)
|
void ALARM::notify(QString title, QString text, int id)
|
||||||
{
|
{
|
||||||
qDebug() << title << text;
|
//qDebug() << title << text;
|
||||||
// QVariantMap message;
|
// QVariantMap message;
|
||||||
// message["title"] = title;
|
// message["title"] = title;
|
||||||
// message["message"] = text;
|
// message["message"] = text;
|
||||||
|
|
|
@ -83,7 +83,7 @@ void FILESYSTEM::makeDir(QString name)
|
||||||
{
|
{
|
||||||
QDir dir(m_Directory);
|
QDir dir(m_Directory);
|
||||||
if (dir.mkdir(name)){
|
if (dir.mkdir(name)){
|
||||||
qDebug() << "makedir success" <<name;
|
//qDebug() << "makedir success" <<name;
|
||||||
emit success(name);
|
emit success(name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -96,7 +96,7 @@ void FILESYSTEM::makePath(QString name)
|
||||||
{
|
{
|
||||||
QDir dir(m_Directory);
|
QDir dir(m_Directory);
|
||||||
if (dir.mkpath(name)){
|
if (dir.mkpath(name)){
|
||||||
qDebug() << "makepath success" <<name;
|
//qDebug() << "makepath success" <<name;
|
||||||
emit success(name);
|
emit success(name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -42,7 +42,7 @@ void UploadableImage::setAngle(const int &b) {
|
||||||
if (b != m_angle) {
|
if (b != m_angle) {
|
||||||
m_angle = b;
|
m_angle = b;
|
||||||
|
|
||||||
qDebug() << "UploadableImage::setAngle : " << m_angle;
|
//qDebug() << "UploadableImage::setAngle : " << m_angle;
|
||||||
if (m_angle==0) {
|
if (m_angle==0) {
|
||||||
emit angleChanged();
|
emit angleChanged();
|
||||||
return;
|
return;
|
||||||
|
@ -57,7 +57,7 @@ void UploadableImage::setSource(const QString &a) {
|
||||||
m_mimetype = "";
|
m_mimetype = "";
|
||||||
m_filename = "";
|
m_filename = "";
|
||||||
|
|
||||||
qDebug() << "UploadableImage::setSource : " << m_source;
|
//qDebug() << "UploadableImage::setSource : " << m_source;
|
||||||
|
|
||||||
if (m_source=="") {
|
if (m_source=="") {
|
||||||
emit sourceChanged();
|
emit sourceChanged();
|
||||||
|
@ -83,7 +83,7 @@ void UploadableImage::setSource(const QString &a) {
|
||||||
} else {
|
} else {
|
||||||
m_image = fullimage;
|
m_image = fullimage;
|
||||||
}
|
}
|
||||||
qDebug() << "UploadableImage::setSource : " << m_image.width() << "x" << m_image.height();
|
//qDebug() << "UploadableImage::setSource : " << m_image.width() << "x" << m_image.height();
|
||||||
emit sourceChanged();
|
emit sourceChanged();
|
||||||
|
|
||||||
QFileInfo fi(m_source);
|
QFileInfo fi(m_source);
|
||||||
|
@ -95,7 +95,7 @@ void UploadableImage::setSource(const QString &a) {
|
||||||
if (filetype!="PNG" && filetype!="JPG") {
|
if (filetype!="PNG" && filetype!="JPG") {
|
||||||
filetype = "JPG";
|
filetype = "JPG";
|
||||||
}
|
}
|
||||||
qDebug() << "UploadableImage::setSource : " << "Saving as " << filetype;
|
//qDebug() << "UploadableImage::setSource : " << "Saving as " << filetype;
|
||||||
|
|
||||||
m_mimetype = "image/"+filetype.toLower();
|
m_mimetype = "image/"+filetype.toLower();
|
||||||
emit mimetypeChanged();
|
emit mimetypeChanged();
|
||||||
|
|
|
@ -223,6 +223,7 @@ void XHR::getlist()
|
||||||
XHR::setUrl(m_filelist.at(dlindex));}
|
XHR::setUrl(m_filelist.at(dlindex));}
|
||||||
else {
|
else {
|
||||||
XHR::setUrl(m_filelist.at(dlindex));}
|
XHR::setUrl(m_filelist.at(dlindex));}
|
||||||
|
qDebug() << "start download" << m_url;
|
||||||
XHR::download();
|
XHR::download();
|
||||||
} else {dlindex=0;m_downloadtype="";m_contactlist.clear();m_filelist.clear();}
|
} else {dlindex=0;m_downloadtype="";m_contactlist.clear();m_filelist.clear();}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,8 @@ function friendicaRequest(login,api,rootwindow,callback) {
|
||||||
if (xhrequest.status==200){
|
if (xhrequest.status==200){
|
||||||
callback(xhrequest.responseText)
|
callback(xhrequest.responseText)
|
||||||
}else{
|
}else{
|
||||||
showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
|
callback(xhrequest.responseText)
|
||||||
|
//showMessage("Error","API:\n" +login.server+api+"\n NO RESPONSE"+xhrequest.statusText,rootwindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e){
|
catch (e){
|
||||||
|
@ -60,7 +61,7 @@ function friendicaPostRequest(login,api,data,method,rootwindow,callback) {
|
||||||
} else if(xhrequest.readyState === XMLHttpRequest.DONE) {
|
} else if(xhrequest.readyState === XMLHttpRequest.DONE) {
|
||||||
try{ if (xhrequest.responseText!=""){
|
try{ if (xhrequest.responseText!=""){
|
||||||
callback(xhrequest.responseText)
|
callback(xhrequest.responseText)
|
||||||
}else{print("API:\n" +api+" NO RESPONSE");
|
}else{//print("API:\n" +api+" NO RESPONSE");
|
||||||
showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow)
|
showMessage("Error","API:\n" +api+" NO RESPONSE",rootwindow)
|
||||||
callback(xhrequest.responseText)
|
callback(xhrequest.responseText)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,64 +36,95 @@
|
||||||
function requestList(login,database,onlynew,rootwindow,callback) {
|
function requestList(login,database,onlynew,rootwindow,callback) {
|
||||||
//get list of own images and call download function
|
//get list of own images and call download function
|
||||||
Helperjs.friendicaRequest(login,"/api/friendica/photos/list", rootwindow,function (helperobject){
|
Helperjs.friendicaRequest(login,"/api/friendica/photos/list", rootwindow,function (helperobject){
|
||||||
//print("return"+helperobject);
|
//print("return"+helperobject);
|
||||||
var obj=JSON.parse(helperobject);
|
var obj=JSON.parse(helperobject);
|
||||||
if (onlynew){Helperjs.readField("id",database,"imageData",login.username,function(AllStoredImages){
|
if (onlynew){Helperjs.readField("id",database,"imageData",login.username,function(AllStoredImages){
|
||||||
if (AllStoredImages.length>0){
|
if (AllStoredImages.length>0){
|
||||||
for(var i=0;i< AllStoredImages.length;i++){
|
for(var i=0;i< AllStoredImages.length;i++){
|
||||||
var position=Helperjs.inArray(obj,"id",AllStoredImages[i]);
|
var position=Helperjs.inArray(obj,"id",AllStoredImages[i]);
|
||||||
if (position>-1){obj.splice(position,1)}
|
if (position>-1){obj.splice(position,1)}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
callback(obj)
|
|
||||||
})}
|
|
||||||
else{callback(obj)}
|
|
||||||
})}
|
|
||||||
|
|
||||||
function dataRequest(login,photoID,database,xhr,rootwindow) {
|
|
||||||
// check if image exist and call download function
|
|
||||||
Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photoID, rootwindow, function (image){
|
|
||||||
try{ if(image==""){currentimageno=currentimageno+1}else{
|
|
||||||
var obj = JSON.parse(image);
|
|
||||||
var helpfilename=obj.filename.substring(0,obj.filename.lastIndexOf("."));
|
|
||||||
var filesuffix="";
|
|
||||||
if (obj.type=="image/jpeg"){filesuffix=".jpg"}
|
|
||||||
else if (obj.type=="image/png"){filesuffix=".png"}
|
|
||||||
else {filesuffix=""}
|
|
||||||
if (helpfilename==""){// check if file has any filename
|
|
||||||
obj.filename=obj["id"]+filesuffix;
|
|
||||||
}
|
}
|
||||||
else{obj.filename=helpfilename+filesuffix}
|
callback(obj)
|
||||||
var link="";
|
})}
|
||||||
if(obj["link"][0]){link=obj["link"][0]} else{link=obj["link"]["4"]}
|
else{callback(obj)}
|
||||||
xhr.setUrl(Qt.resolvedUrl(link));
|
})}
|
||||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
|
||||||
xhr.setFilename(login.imagestore+'albums/'+obj.album+"/"+obj["filename"]);
|
function dataRequest(login,photo,database,xhr,rootwindow) {
|
||||||
xhr.setDownloadtype("picture");
|
// check if image exist and call download function
|
||||||
xhr.download();
|
|
||||||
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
Helperjs.friendicaRequest(login,"/api/friendica/photo?photo_id="+photo.id, rootwindow, function (image){
|
||||||
db.transaction( function(tx) {
|
if(image==""){currentimageno=currentimageno+1}else{
|
||||||
var result = tx.executeSql('SELECT * from imageData where id = "'+obj["id"]+'"');
|
try{
|
||||||
if(result.rows.length === 1) {// use update
|
var obj = JSON.parse(image);
|
||||||
result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+obj.id+'", created="'+obj.created+'", edited="'+obj.edited+'", profile="'+obj.profile+'", link="'+obj["link"]["4"]+'", filename="'+obj.filename+'",title="'+obj.title+'", desc="'+obj.desc+'", type="'+obj.type+'", width="'+obj.width+'", height="'+obj.height+'", album="'+obj.album+'", location="file://'+login.imagestore+'albums/'+obj.album+'/" where id="'+obj["id"]+'"');
|
if (obj.hasOwnProperty('status')){
|
||||||
} else {// use insert print('... does not exists, create it')
|
var helpfilename=photo.filename.substring(0,photo.filename.lastIndexOf("."));
|
||||||
result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,obj.id,obj.created,obj.edited, obj.title, obj.desc, obj.album, obj.filename, obj.type, obj.height, obj.width,obj. profile,obj["link"]["4"],'file://'+login.imagestore+'albums/'+obj.album+"/"]);
|
var filesuffix="";
|
||||||
}
|
if (photo.type=="image/jpeg"){filesuffix=".jpg"}
|
||||||
})}}
|
else if (photo.type=="image/png"){filesuffix=".png"}
|
||||||
catch (e){print("Data retrieval failure! "+ e+obj);}
|
else {filesuffix=""}
|
||||||
})}
|
if (helpfilename==""){// check if file has any filename
|
||||||
|
photo.filename=photo["id"]+filesuffix;
|
||||||
|
}
|
||||||
|
else{photo.filename=helpfilename+filesuffix}
|
||||||
|
var link="";
|
||||||
|
xhr.setUrl(Qt.resolvedUrl(photo.thumb));
|
||||||
|
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||||
|
xhr.setFilename(login.imagestore+'albums/'+photo.album+"/"+photo["filename"]);
|
||||||
|
xhr.setDownloadtype("picture");
|
||||||
|
xhr.download();
|
||||||
|
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||||
|
db.transaction( function(tx) {
|
||||||
|
var result = tx.executeSql('SELECT * from imageData where id = "'+obj["id"]+'"');
|
||||||
|
if(result.rows.length === 1) {// use update
|
||||||
|
result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+photo.id+'", created="'+photo.created+'", edited="'+photo.edited+'", profile="0", link="'+photo["thumb"]+'", filename="'+photo.filename+'",title="", desc="'+photo.desc+'", type="'+photo.type+'", width="0", height="0", album="'+photo.album+'", location="file://'+login.imagestore+'albums/'+photo.album+'/" where id="'+photo["id"]+'"');
|
||||||
|
} else {// use insert print('... does not exists, create it')
|
||||||
|
result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,photo.id,photo.created,photo.edited,'', photo.desc, photo.album, photo.filename, photo.type, '', '',0,photo["thumb"],'file://'+login.imagestore+'albums/'+photo.album+"/"]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
var helpfilename=obj.filename.substring(0,obj.filename.lastIndexOf("."));
|
||||||
|
var filesuffix="";
|
||||||
|
if (obj.type=="image/jpeg"){filesuffix=".jpg"}
|
||||||
|
else if (obj.type=="image/png"){filesuffix=".png"}
|
||||||
|
else {filesuffix=""}
|
||||||
|
if (helpfilename==""){// check if file has any filename
|
||||||
|
obj.filename=obj["id"]+filesuffix;
|
||||||
|
}
|
||||||
|
else{obj.filename=helpfilename+filesuffix}
|
||||||
|
var link="";
|
||||||
|
if(obj["link"][0]){link=obj["link"][0]} else{link=obj["link"]["4"]}
|
||||||
|
xhr.setUrl(Qt.resolvedUrl(link));
|
||||||
|
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||||
|
xhr.setFilename(login.imagestore+'albums/'+obj.album+"/"+obj["filename"]);
|
||||||
|
xhr.setDownloadtype("picture");
|
||||||
|
xhr.download();
|
||||||
|
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||||
|
db.transaction( function(tx) {
|
||||||
|
var result = tx.executeSql('SELECT * from imageData where id = "'+obj["id"]+'"');
|
||||||
|
if(result.rows.length === 1) {// use update
|
||||||
|
result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+obj.id+'", created="'+obj.created+'", edited="'+obj.edited+'", profile="'+obj.profile+'", link="'+link+'", filename="'+obj.filename+'",title="'+obj.title+'", desc="'+obj.desc+'", type="'+obj.type+'", width="'+obj.width+'", height="'+obj.height+'", album="'+obj.album+'", location="file://'+login.imagestore+'albums/'+obj.album+'/" where id="'+obj["id"]+'"');
|
||||||
|
} else {// use insert print('... does not exists, create it')
|
||||||
|
result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,obj.id,obj.created,obj.edited, obj.title, obj.desc, obj.album, obj.filename, obj.type, obj.height, obj.width,obj. profile,link,'file://'+login.imagestore+'albums/'+obj.album+"/"]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}} catch (e){
|
||||||
|
print("Data retrieval failure! "+ e+obj);
|
||||||
|
}
|
||||||
|
}})
|
||||||
|
}
|
||||||
|
|
||||||
function storeImagedata(login,database,imagedata,rootwindow) {
|
function storeImagedata(login,database,imagedata,rootwindow) {
|
||||||
// check if image exist and call download function
|
// check if image exist and call download function
|
||||||
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||||
db.transaction( function(tx) {
|
db.transaction( function(tx) {
|
||||||
var result = tx.executeSql('SELECT * from imageData where id = "'+imagedata["id"]+'"');
|
var result = tx.executeSql('SELECT * from imageData where id = "'+imagedata["id"]+'"');
|
||||||
if(result.rows.length === 1) {// use update
|
if(result.rows.length === 1) {// use update
|
||||||
result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+imagedata.id+'", created="'+imagedata.created+'", edited="'+imagedata.edited+'", profile="'+imagedata.profile+'", link="'+imagedata.link[0]+'", filename="'+imagedata.filename+'",title="'+imagedata.title+'", desc="'+imagedata.desc+'", type="'+imagedata.type+'", width="'+imagedata.width+'", height="'+imagedata.height+'", album="'+imagedata.album+'", location="file://'+login.imagestore+'albums/'+imagedata.album+'/" where id="'+imagedata["id"]+'"');
|
result = tx.executeSql('UPDATE imageData SET username ="' +login.username+ '",id="'+imagedata.id+'", created="'+imagedata.created+'", edited="'+imagedata.edited+'", profile="'+imagedata.profile+'", link="'+imagedata.link[0]+'", filename="'+imagedata.filename+'",title="'+imagedata.title+'", desc="'+imagedata.desc+'", type="'+imagedata.type+'", width="'+imagedata.width+'", height="'+imagedata.height+'", album="'+imagedata.album+'", location="file://'+login.imagestore+'albums/'+imagedata.album+'/" where id="'+imagedata["id"]+'"');
|
||||||
} else {// use insert print('... does not exists, create it')
|
} else {// use insert print('... does not exists, create it')
|
||||||
result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,imagedata.id,imagedata.created,imagedata.edited, imagedata.title, imagedata.desc, imagedata.album, imagedata.filename, imagedata.type, imagedata.height, imagedata.width,imagedata. profile,imagedata.link[0],'file://'+login.imagestore+'albums/'+imagedata.album+"/"]);
|
result = tx.executeSql('INSERT INTO imageData VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)', [login.username,imagedata.id,imagedata.created,imagedata.edited, imagedata.title, imagedata.desc, imagedata.album, imagedata.filename, imagedata.type, imagedata.height, imagedata.width,imagedata. profile,imagedata.link[0],'file://'+login.imagestore+'albums/'+imagedata.album+"/"]);
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
|
|
||||||
function deleteImage(database,login,type,location,filesystem,rootwindow,callback) { // delete image locally and on server
|
function deleteImage(database,login,type,location,filesystem,rootwindow,callback) { // delete image locally and on server
|
||||||
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||||
|
@ -107,26 +138,26 @@ function deleteImage(database,login,type,location,filesystem,rootwindow,callback
|
||||||
Helperjs.friendicaPostRequest(login,"/api/friendica/photo/delete?photo_id="+imageId,"","DELETE",rootwindow, function (obj){
|
Helperjs.friendicaPostRequest(login,"/api/friendica/photo/delete?photo_id="+imageId,"","DELETE",rootwindow, function (obj){
|
||||||
//var deletereturn = JSON.parse(obj); print(obj);
|
//var deletereturn = JSON.parse(obj); print(obj);
|
||||||
//if (deletereturn.result=="deleted"){
|
//if (deletereturn.result=="deleted"){
|
||||||
db.transaction( function(tx) {
|
db.transaction( function(tx) {
|
||||||
var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+rslocation+'" AND filename="'+rsfilename+'"'); });
|
var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+rslocation+'" AND filename="'+rsfilename+'"'); });
|
||||||
filesystem.Directory=rslocation.substring(7,rslocation.length-1);
|
filesystem.Directory=rslocation.substring(7,rslocation.length-1);
|
||||||
filesystem.rmFile(rsfilename)
|
filesystem.rmFile(rsfilename)
|
||||||
//}
|
//}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Helperjs.friendicaPostRequest(login,"/api/friendica/photoalbum/delete?album="+rsfilename,"","DELETE",rootwindow, function (obj){
|
Helperjs.friendicaPostRequest(login,"/api/friendica/photoalbum/delete?album="+rsfilename,"","DELETE",rootwindow, function (obj){
|
||||||
//var deletereturn = JSON.parse(obj);
|
//var deletereturn = JSON.parse(obj);
|
||||||
//if (deletereturn.result=="deleted"){
|
//if (deletereturn.result=="deleted"){
|
||||||
db.transaction( function(tx) {
|
db.transaction( function(tx) {
|
||||||
var rs= tx.executeSql('SELECT DISTINCT location FROM imageData WHERE album="'+rsfilename+'" AND username="'+login.username+'"');
|
var rs= tx.executeSql('SELECT DISTINCT location FROM imageData WHERE album="'+rsfilename+'" AND username="'+login.username+'"');
|
||||||
var locationstring=rs.rows.item(0).location;
|
var locationstring=rs.rows.item(0).location;
|
||||||
filesystem.Directory=locationstring.substring(7,locationstring.length-1);
|
filesystem.Directory=locationstring.substring(7,locationstring.length-1);
|
||||||
filesystem.rmDir();
|
filesystem.rmDir();
|
||||||
var deleters=tx.executeSql('DELETE FROM imageData WHERE album="'+location+'"');
|
var deleters=tx.executeSql('DELETE FROM imageData WHERE album="'+location+'"');
|
||||||
})
|
})
|
||||||
//}
|
//}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
callback(location)
|
callback(location)
|
||||||
})
|
})
|
||||||
|
@ -136,13 +167,13 @@ function updateImage(database,login,type,filesystem,imageId,rootwindow,callback)
|
||||||
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
|
||||||
Helperjs.readData(database,"imageData",login.username,function(obj){
|
Helperjs.readData(database,"imageData",login.username,function(obj){
|
||||||
db.transaction( function(tx) {
|
db.transaction( function(tx) {
|
||||||
if (type=='image'){
|
if (type=='image'){
|
||||||
var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+obj[0].location+'" AND filename="'+obj[0].filename+'"');
|
var deleters=tx.executeSql('DELETE FROM imageData WHERE location="'+obj[0].location+'" AND filename="'+obj[0].filename+'"');
|
||||||
filesystem.Directory=obj[0].location
|
filesystem.Directory=obj[0].location
|
||||||
filesystem.rmFile(obj[0].filename)
|
filesystem.rmFile(obj[0].filename)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},"id",imageId);
|
},"id",imageId);
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +184,7 @@ function deleteContacts(database,user,callback) { // does nothing useful at the
|
||||||
db.transaction( function(tx) {
|
db.transaction( function(tx) {
|
||||||
result1= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
|
result1= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
|
||||||
result2= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
|
result2= tx.executeSql('SELECT * FROM contacts a LEFT OUTER JOIN news b ON a.url==b.uid');
|
||||||
callback(result)})
|
callback(result)})
|
||||||
}
|
}
|
||||||
|
|
||||||
//function requestFriendsAlbumPictures(login,friend,rootwindow,callback){
|
//function requestFriendsAlbumPictures(login,friend,rootwindow,callback){
|
||||||
|
@ -173,10 +204,10 @@ function deleteContacts(database,user,callback) { // does nothing useful at the
|
||||||
//}
|
//}
|
||||||
|
|
||||||
function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){//print("newRequestFriendsAlbumPictures");
|
function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){//print("newRequestFriendsAlbumPictures");
|
||||||
// screenscraping of albums page of contact with remoteAuth
|
// screenscraping of albums page of contact with remoteAuth
|
||||||
//commented out for broken remoteauth
|
//commented out for broken remoteauth
|
||||||
Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
|
Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
|
||||||
//Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
|
//Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
|
||||||
try {var obj=JSON.parse(photohtml);//print ("Photohtml: "+photohtml)
|
try {var obj=JSON.parse(photohtml);//print ("Photohtml: "+photohtml)
|
||||||
if (obj.hasOwnProperty('status')){
|
if (obj.hasOwnProperty('status')){
|
||||||
Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
|
Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
|
||||||
|
@ -197,14 +228,14 @@ function getAlbumFromHtml(photohtml,remoteAuthBool,rootwindow,callback){
|
||||||
var albumlink = arr[i].substring(arr[i].indexOf('http'),arr[i].indexOf('class')-2);
|
var albumlink = arr[i].substring(arr[i].indexOf('http'),arr[i].indexOf('class')-2);
|
||||||
var albumname=arr[i].substring(arr[i].indexOf('/span')+6,arr[i].indexOf('</a>')-1);
|
var albumname=arr[i].substring(arr[i].indexOf('/span')+6,arr[i].indexOf('</a>')-1);
|
||||||
var album={'link':albumlink,'name':albumname}//print(albumlink+" "+albumname);
|
var album={'link':albumlink,'name':albumname}//print(albumlink+" "+albumname);
|
||||||
photoarray.push(album);
|
photoarray.push(album);
|
||||||
}
|
}
|
||||||
callback(photoarray,remoteAuthBool)
|
callback(photoarray,remoteAuthBool)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function newRequestFriendsPictures(login,link,friend,remoteAuthBool,remoteauth,rootwindow,callback){
|
function newRequestFriendsPictures(login,link,friend,remoteAuthBool,remoteauth,rootwindow,callback){
|
||||||
// screenscraping of pictures page for given album
|
// screenscraping of pictures page for given album
|
||||||
if (remoteAuthBool){
|
if (remoteAuthBool){
|
||||||
remoteauth.setUrl(login.server);
|
remoteauth.setUrl(login.server);
|
||||||
remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
|
remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
|
||||||
|
@ -225,20 +256,20 @@ function newRequestFriendsPictures(login,link,friend,remoteAuthBool,remoteauth,r
|
||||||
|
|
||||||
function getPictureFromHtml(photohtml,remoteAuthBool,callback){
|
function getPictureFromHtml(photohtml,remoteAuthBool,callback){
|
||||||
var photoarray=[];
|
var photoarray=[];
|
||||||
var basehtml=photohtml.substring(photohtml.indexOf('<base')+12,photohtml.indexOf('/>',photohtml.indexOf('<base'))-2);
|
var basehtml=photohtml.substring(photohtml.indexOf('<base')+12,photohtml.indexOf('/>',photohtml.indexOf('<base'))-2);
|
||||||
|
|
||||||
// old theme
|
// old theme
|
||||||
if (photohtml.indexOf("photo-album-image-wrapper-end")>-1){ //theme 1
|
if (photohtml.indexOf("photo-album-image-wrapper-end")>-1){ //theme 1
|
||||||
var arr = photohtml.split("photo-album-image-wrapper-end");}
|
var arr = photohtml.split("photo-album-image-wrapper-end");}
|
||||||
|
|
||||||
// other themes
|
// other themes
|
||||||
if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
|
if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
|
||||||
var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
|
var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
|
||||||
var arr = photoarea.split("</a>");}
|
var arr = photoarea.split("</a>");}
|
||||||
//print("Url: "+login.server+ "Contacturl: "+friend.url)
|
//print("Url: "+login.server+ "Contacturl: "+friend.url)
|
||||||
// remoteauth.setUrl(login.server);
|
// remoteauth.setUrl(login.server);
|
||||||
// remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
|
// remoteauth.setLogin(login.username+":"+Qt.atob(login.password));
|
||||||
// remoteauth.setContacturl(friend.url);
|
// remoteauth.setContacturl(friend.url);
|
||||||
for (var i=0;i<arr.length-1;i++){
|
for (var i=0;i<arr.length-1;i++){
|
||||||
var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2);
|
var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2);
|
||||||
var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2);
|
var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2);
|
||||||
|
@ -253,38 +284,38 @@ function getPictureFromHtml(photohtml,remoteAuthBool,callback){
|
||||||
//Helperjs.friendicaRemoteAuthRequest(login,thumblink,friend.url,rootwindow,function(thumbimage){thumbbase64=QT.btoa(thumbimage)});
|
//Helperjs.friendicaRemoteAuthRequest(login,thumblink,friend.url,rootwindow,function(thumbimage){thumbbase64=QT.btoa(thumbimage)});
|
||||||
//thumblink="image://remoteauthimage/"+login.username+":"+Qt.atob(login.password)+"@"+login.server+"/api/friendica/remoteauth?c_url="+friend.url+"&url="+thumblink;
|
//thumblink="image://remoteauthimage/"+login.username+":"+Qt.atob(login.password)+"@"+login.server+"/api/friendica/remoteauth?c_url="+friend.url+"&url="+thumblink;
|
||||||
var photo={'link':photolink,'name':photoname,'thumb':thumblink}
|
var photo={'link':photolink,'name':photoname,'thumb':thumblink}
|
||||||
photoarray.push(photo);
|
photoarray.push(photo);
|
||||||
}
|
}
|
||||||
callback(photoarray)
|
callback(photoarray)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function requestFriendsPictures(link,rootwindow,callback){
|
function requestFriendsPictures(link,rootwindow,callback){
|
||||||
// screenscraping of pictures page for given album
|
// screenscraping of pictures page for given album
|
||||||
Helperjs.friendicaWebRequest(link,rootwindow,function(photohtml){
|
Helperjs.friendicaWebRequest(link,rootwindow,function(photohtml){
|
||||||
var photoarray=[];
|
var photoarray=[];
|
||||||
var basehtml=photohtml.substring(photohtml.indexOf('<base')+12,photohtml.indexOf('/>',photohtml.indexOf('<base'))-2);
|
var basehtml=photohtml.substring(photohtml.indexOf('<base')+12,photohtml.indexOf('/>',photohtml.indexOf('<base'))-2);
|
||||||
|
|
||||||
// old theme
|
// old theme
|
||||||
if (photohtml.indexOf("photo-album-image-wrapper-end")>-1){ //theme 1
|
if (photohtml.indexOf("photo-album-image-wrapper-end")>-1){ //theme 1
|
||||||
var arr = photohtml.split("photo-album-image-wrapper-end");}
|
var arr = photohtml.split("photo-album-image-wrapper-end");}
|
||||||
|
|
||||||
// other themes
|
// other themes
|
||||||
if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
|
if (photohtml.indexOf("photo-album-wrapper")>-1){ //theme 2
|
||||||
var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
|
var photoarea=photohtml.substring(photohtml.indexOf("photo-album-wrapper"),photohtml.indexOf("photo-album-end"))
|
||||||
var arr = photoarea.split("</a>");}
|
var arr = photoarea.split("</a>");}
|
||||||
|
|
||||||
for (var i=0;i<arr.length-1;i++){
|
for (var i=0;i<arr.length-1;i++){
|
||||||
var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2);
|
var photoname=arr[i].substring(arr[i].lastIndexOf('alt')+5,arr[i].lastIndexOf('title')-2);
|
||||||
var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2);
|
var thumblink=arr[i].substring(arr[i].lastIndexOf('<img')+10,arr[i].lastIndexOf('alt')-2);
|
||||||
var imagetype=thumblink.substring(thumblink.lastIndexOf("."));
|
var imagetype=thumblink.substring(thumblink.lastIndexOf("."));
|
||||||
var photolink=thumblink.substring(0,thumblink.length-imagetype.length-2)+"-0"+imagetype
|
var photolink=thumblink.substring(0,thumblink.length-imagetype.length-2)+"-0"+imagetype
|
||||||
if(thumblink.substring(0,4)!=="http"){thumblink=basehtml+thumblink}
|
if(thumblink.substring(0,4)!=="http"){thumblink=basehtml+thumblink}
|
||||||
if(photolink.substring(0,4)!=="http"){photolink=basehtml+photolink}
|
if(photolink.substring(0,4)!=="http"){photolink=basehtml+photolink}
|
||||||
var photo={'link':photolink,'name':photoname,'thumb':thumblink}
|
var photo={'link':photolink,'name':photoname,'thumb':thumblink}
|
||||||
photoarray.push(photo);
|
photoarray.push(photo);
|
||||||
}
|
}
|
||||||
callback(photoarray)
|
callback(photoarray)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ else{
|
||||||
var newsitemobject=msg.news[j];
|
var newsitemobject=msg.news[j];
|
||||||
newsitemobject=beautify(newsitemobject,msg);
|
newsitemobject=beautify(newsitemobject,msg);
|
||||||
|
|
||||||
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>1)){
|
if (newsitemobject.hasOwnProperty("currentconversation")&&(newsitemobject.currentconversation.length>0)){
|
||||||
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
|
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
|
||||||
newsitemobject.lastcomment.indent=1
|
newsitemobject.lastcomment.indent=1
|
||||||
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
|
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
|
||||||
|
|
|
@ -291,7 +291,7 @@ function readConfig(database,callback,filter,filtervalue) { // reads config
|
||||||
}
|
}
|
||||||
var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons};
|
var rsObject={server:rsArray[0].server,username:rsArray[0].username, password:rsArray[0].password,imagestore:rsArray[0].imagestore,isActive:rsArray[0].isActive, newsViewType:rsArray[0].newsViewType,permissions:JSON.parse(rsArray[0].permissions),maxContactAge:rsArray[0].maxContactAge,APIVersion:rsArray[0].APIVersion,addons:rsArray[0].addons};
|
||||||
if (rsObject.newsViewType!="" && rsObject.newsViewType!=null){updateNewsviewtype(database,rsObject.newsViewType)}
|
if (rsObject.newsViewType!="" && rsObject.newsViewType!=null){updateNewsviewtype(database,rsObject.newsViewType)}
|
||||||
} else {print("config empty");var rsObject=""}
|
} else {var rsObject=""}
|
||||||
callback(rsObject)}}
|
callback(rsObject)}}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,11 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import QtQuick 2.9
|
import QtQuick 2.15
|
||||||
AnimatedImage {id:gif;
|
AnimatedImage {id:gif;
|
||||||
width:toprow.width;
|
width:toprow.width;
|
||||||
|
cache:false
|
||||||
|
smooth: false
|
||||||
//property string mimetype:""
|
//property string mimetype:""
|
||||||
fillMode: Image.PreserveAspectFit;
|
fillMode: Image.PreserveAspectFit;
|
||||||
onStatusChanged: {playing = (status == AnimatedImage.Ready)}
|
onStatusChanged: {playing = (status == AnimatedImage.Ready)}
|
||||||
|
|
|
@ -173,7 +173,13 @@ Rectangle{
|
||||||
|
|
||||||
function getOldNews(){
|
function getOldNews(){
|
||||||
var currentTime= new Date();
|
var currentTime= new Date();
|
||||||
try{var lastnews_id=newsModel.get(newsModel.count-1).newsitemobject.created_at;} catch(e){var lastnews_id=99999999999999 }
|
var oldnewsitemobject=newsModel.get(newsModel.count-1).newsitemobject;
|
||||||
|
try{ if(oldnewsitemobject.hasOwnProperty("lastcomment")){
|
||||||
|
var lastnews_id=oldnewsitemobject.lastcomment.created_at;
|
||||||
|
}else{
|
||||||
|
var lastnews_id=oldnewsitemobject.created_at;
|
||||||
|
}
|
||||||
|
} catch(e){print(e);var lastnews_id=99999999999999 }
|
||||||
var messagetype=0;
|
var messagetype=0;
|
||||||
switch(newsSwipeview.stacktype){
|
switch(newsSwipeview.stacktype){
|
||||||
case "Home":messagetype=0;break;
|
case "Home":messagetype=0;break;
|
||||||
|
|
|
@ -53,7 +53,7 @@ Rectangle{
|
||||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||||
xhr.clearParams();
|
xhr.clearParams();
|
||||||
xhr.setParam("desc",imageUploadModel.get(inumber).description);
|
xhr.setParam("desc",imageUploadModel.get(inumber).description);
|
||||||
xhr.setParam("album", album.currentText);
|
if(album.editText!=""){xhr.setParam("album", album.editText)}else{xhr.setParam("album", album.currentText)};
|
||||||
//if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
|
//if (group_allow.length>0) {xhr.setParam("group_allow", Helperjs.cleanArray(group_allow))};
|
||||||
//if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
|
//if (group_deny.length>0) {xhr.setParam("group_deny", Helperjs.cleanArray(group_deny))};
|
||||||
//if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
|
//if (contact_allow.length>0) {xhr.setParam("contact_allow", Helperjs.cleanArray(contact_allow))};
|
||||||
|
@ -96,7 +96,7 @@ Rectangle{
|
||||||
}else{
|
}else{
|
||||||
Imagejs.requestList(login,db, true,root,function(obj){
|
Imagejs.requestList(login,db, true,root,function(obj){
|
||||||
fotorectangle.newimages=obj;
|
fotorectangle.newimages=obj;
|
||||||
imageDialog.destroy()
|
photoStack.pop()
|
||||||
})
|
})
|
||||||
|
|
||||||
}} else{
|
}} else{
|
||||||
|
@ -304,7 +304,7 @@ Rectangle{
|
||||||
text: imageId==""?qsTr("Upload"):qsTr("Change")
|
text: imageId==""?qsTr("Upload"):qsTr("Change")
|
||||||
font.pointSize: osSettings.bigFontSize
|
font.pointSize: osSettings.bigFontSize
|
||||||
onClicked:{
|
onClicked:{
|
||||||
if(album.currentText==""){Helperjs.showMessage(qsTr("Error"),qsTr(" No album name given"), imageDialog)}
|
if(album.currentText==""&&album.editText==""){Helperjs.showMessage(qsTr("Error"),qsTr(" No album name given"), imageDialog)}
|
||||||
else if (imageId!=""){uploadBusy.running=true; updateImage()}
|
else if (imageId!=""){uploadBusy.running=true; updateImage()}
|
||||||
else{newimageProgress.visible=true;
|
else{newimageProgress.visible=true;
|
||||||
if (imageUploadModel.count>0){
|
if (imageUploadModel.count>0){
|
||||||
|
|
|
@ -61,22 +61,28 @@ StackView{
|
||||||
if(albums.indexOf(fotorectangle.newimages[i].album)==-1){
|
if(albums.indexOf(fotorectangle.newimages[i].album)==-1){
|
||||||
filesystem.Directory=root.login.imagestore+"/albums";
|
filesystem.Directory=root.login.imagestore+"/albums";
|
||||||
filesystem.makeDir(fotorectangle.newimages[i].album)}
|
filesystem.makeDir(fotorectangle.newimages[i].album)}
|
||||||
ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id);
|
|
||||||
|
//ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id);
|
||||||
}
|
}
|
||||||
|
Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
|
||||||
})
|
})
|
||||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
// xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||||
xhr.setImagedir(login.imagestore);
|
// xhr.setImagedir(login.imagestore);
|
||||||
xhr.setFilelist(ownimagelist);
|
// xhr.setFilelist(ownimagelist);
|
||||||
xhr.setDownloadtype("picturelist");
|
// xhr.setDownloadtype("picturelist");
|
||||||
xhr.getlist();
|
// xhr.getlist();
|
||||||
newImagesProgress.visible=true
|
newImagesProgress.visible=true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onCurrentimagenoChanged:{
|
onCurrentimagenoChanged:{
|
||||||
if(fotorectangle.currentimageno==fotorectangle.newimages.length){newImagesProgress.visible=false;showFotos(root.login,"");
|
if(fotorectangle.currentimageno==fotorectangle.newimages.length){
|
||||||
fotorectangle.newimages=[];fotorectangle.currentimageno=0}
|
newImagesProgress.visible=false;showFotos(root.login,"");
|
||||||
// download next image
|
fotorectangle.newimages=[];fotorectangle.currentimageno=0
|
||||||
|
}else{
|
||||||
|
// download next image
|
||||||
|
Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections{
|
Connections{
|
||||||
|
@ -90,10 +96,17 @@ StackView{
|
||||||
function onDownloaded(type,url,filename,i){
|
function onDownloaded(type,url,filename,i){
|
||||||
if(type=="picture"){fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
if(type=="picture"){fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||||
}
|
}
|
||||||
function onError(data,url,api,code){if(data=="picturelist"){
|
function onError(data,url,api,code){//print("Url "+url+" api " +api + " data "+data)
|
||||||
|
if(data=="picturelist"){
|
||||||
var requestid=url.substring(url.lastIndexOf("=")+1);
|
var requestid=url.substring(url.lastIndexOf("=")+1);
|
||||||
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle)
|
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle);
|
||||||
} else {fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
fotorectangle.currentimageno=fotorectangle.currentimageno+1
|
||||||
|
} else if (data=="picture"){
|
||||||
|
Helperjs.deleteData(root.db,"imageData",root.login.username,function(){
|
||||||
|
fotorectangle.currentimageno=fotorectangle.currentimageno+1
|
||||||
|
},"link",url)
|
||||||
|
}else{
|
||||||
|
fotorectangle.currentimageno=fotorectangle.currentimageno+1}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Connections{
|
// Connections{
|
||||||
|
|
Loading…
Reference in a new issue