fixed 127

This commit is contained in:
Jeena Paradies 2013-02-04 01:53:44 +01:00
parent e2c26b4acc
commit 803c674c94
3 changed files with 22 additions and 1 deletions

View file

@ -53,6 +53,7 @@ function(HostApp, Core, Paths, URI) {
name: document.createElement("h1"),
entity: document.createElement("a"),
bio: document.createElement("p"),
following_you: document.createElement("td"),
posts: document.createElement("a"),
following: document.createElement("a"),
followed: document.createElement("a"),
@ -114,6 +115,8 @@ function(HostApp, Core, Paths, URI) {
td.appendChild(this.profile_template.url);
mkLi("Homepage", td);
mkLi("Following you", this.profile_template.following_you);
td = document.createElement("td");
td.appendChild(this.profile_template.posts);
this.profile_template.posts.href = "#";
@ -156,6 +159,7 @@ function(HostApp, Core, Paths, URI) {
this.profile_template.name.innerText = "";
this.profile_template.entity.innerText = "";
this.profile_template.bio.innerText = "";
this.profile_template.following_you.innerText = "";
this.profile_template.posts.innerText = "";
this.profile_template.following.innerText = "";
this.profile_template.followed.innerText = "";
@ -292,6 +296,14 @@ function(HostApp, Core, Paths, URI) {
_this.populate(_this.profile_template.followed, resp.responseText);
}, null, false);
Paths.getURL(URI(root_url + "/followers/" + encodeURIComponent(HostApp.stringForKey("entity"))).toString(), "GET", function(resp) {
if (resp.status == 200) {
_this.populate(_this.profile_template.following_you, "Yes");
} else {
_this.populate(_this.profile_template.following_you, "No");
}
}, null, false);
var url = URI(root_url + "/posts/count");
var post_types = [
"https://tent.io/types/post/repost/v0.1.0",