BeWell.Web.Services.KickappsProxyService.GetOverheardOnTheBlogsContent(GetOverheardOnTheBlogsContent_Success, GetOverheardOnTheBlogsContent_Failure);
function GetOverheardOnTheBlogsContent_Success(result, userContext, methodName)
{
var avatar_content = "";
var title_content = "";
var name_content = "";
var link_content = "";;
var item = result.getElementsByTagName("item")[0];
var guid = uuid();
var uploadedByUrlElement = "ka:uploadedByUrl";
var uploadedByThumbnailElement = "ka:uploadedByThumbnail";
var creatorElement = "dc:creator";
var creatorIdElement = "ka:creatorId";
var contentElement = "content:encoded";
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('safari/') != -1)
{
uploadedByUrlElement = "uploadedByUrl";
uploadedByThumbnailElement = "uploadedByThumbnail";
creatorElement = "creator";
creatorIdElement = "creatorId";
contentElement = "encoded";
}
var uploadedByUrl = item.getElementsByTagName(uploadedByUrlElement)[0].childNodes[0].nodeValue;
var uploadedByThumbnail = item.getElementsByTagName(uploadedByThumbnailElement)[0].childNodes[0].nodeValue;
var creator = item.getElementsByTagName(creatorElement)[0].childNodes[0].nodeValue;
var creatorID = item.getElementsByTagName(creatorIdElement)[0].childNodes[0].nodeValue;
var link = item.getElementsByTagName("link")[0].childNodes[0].nodeValue;
var title = item.getElementsByTagName("title")[0].childNodes[0].nodeValue;
var content = item.getElementsByTagName(contentElement)[0].childNodes[0].nodeValue.substring(0, 185) + "…";
avatar_content = String.format("
", uploadedByThumbnail, title);
jQuery("#overheard_avatar").html(avatar_content);
title_content = String.format("{1}", link, title);
jQuery("#overheard_title").html(title_content);
name_content = String.format(" (bio »)", uploadedByUrl, creator, guid);
jQuery("#overheard_name").html(name_content);
link_content = String.format("{0} more »", content, link);
jQuery("#overheard_link").html(link_content);
BeWell.Web.Services.KickappsProxyService.GetUserDisplayName(creatorID, GetUserDisplayNameOverheard_Success, GetUserDisplayNameOverheard_Failure, "display_" + guid);
}
function GetOverheardOnTheBlogsContent_Failure(exception, userContext, methodName)
{
}
function GetUserDisplayNameOverheard_Success(result, userContext, methodName)
{
var displayName = result.getElementsByTagName("user")[0].childNodes[0].nodeValue;
jQuery("#" + userContext).html(displayName);
}
function GetUserDisplayNameOverheard_Failure(exception, userContext, methodName)
{
}
jQuery(document).ready(function()
{
// jQuery(".resultbar").css("background", "#f8b226");
jQuery(".refreshlink").hide();
});