connection page working now..
This commit is contained in:
1 parent
6b8c79a9a8
commit
d6cbbff9de
5 files changed
+137
-59
No files matched your search
@@ -3,32 +3,37 @@ var gmail = function(){
|
||||
url: "/desktop/forgmail",
|
||||
dataType : "xml",
|
||||
success:function(data){
|
||||
if($(data).find("HEAD").find("TITLE").text()=="Unauthorized"){
|
||||
$("#gmail #forerror").text($(data).find("HEAD").find("TITLE").text()).show();
|
||||
if($(data).find("HEAD").find("ERROR").text()=="true"){
|
||||
$("#gmail #content #msgbody").text($(data).find("HEAD").find("ERRORMSG").text());
|
||||
}else{
|
||||
if($(data).find("fullcount").text()=="0"){
|
||||
$("#gmail #forerror").hide();
|
||||
$("#gmail #content #msgbody").text("No new mails");
|
||||
if($(data).find("HEAD").find("TITLE").text()=="Unauthorized"){
|
||||
$("#gmail #forerror").text($(data).find("HEAD").find("TITLE").text()).show();
|
||||
}else{
|
||||
var msg;
|
||||
if($(data).find("fullcount").text()=="1")
|
||||
msg = $(data).find("fullcount").text()+" unread message in your inbox.";
|
||||
else
|
||||
msg = $(data).find("fullcount").text()+" unread messages in your inbox.";
|
||||
o.notify(msg,"alert",2);
|
||||
$(data).find("entry").each(function(i,val){
|
||||
if(i==0){
|
||||
$("#gmail #forerror").hide();
|
||||
var atag = $("<a href='"+$(this).find("link").attr("href")+"'>"+$(this).find("title").text()+"</a>");
|
||||
$("#gmail #content #subject").html($(this).find("title").text());
|
||||
$("#gmail #content #date").text($(this).find("issued").text());
|
||||
$("#gmail #content #msgbody").text($(this).find("summary").text());
|
||||
}
|
||||
})
|
||||
if($(data).find("fullcount").text()=="0"){
|
||||
$("#gmail #forerror").hide();
|
||||
$("#gmail #content #msgbody").text("No new mails");
|
||||
}else{
|
||||
var msg;
|
||||
if($(data).find("fullcount").text()=="1")
|
||||
msg = $(data).find("fullcount").text()+" unread message in your inbox.";
|
||||
else
|
||||
msg = $(data).find("fullcount").text()+" unread messages in your inbox.";
|
||||
o.notify(msg,"alert",2);
|
||||
$(data).find("entry").each(function(i,val){
|
||||
if(i==0){
|
||||
$("#gmail #forerror").hide();
|
||||
var atag = $("<a href='"+$(this).find("link").attr("href")+"'>"+$(this).find("title").text()+"</a>");
|
||||
$("#gmail #content #subject").html($(this).find("title").text());
|
||||
$("#gmail #content #date").text($(this).find("issued").text());
|
||||
$("#gmail #content #msgbody").text($(this).find("summary").text());
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
$("#gmail #loading").hide();
|
||||
$("#gmail #content").show();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user