1. Fixed a bug where in person level vis for people who do not have any image attached to it, there was a silent error message being provided to the front-end, which caused for extra css files to be loaded.

This commit is contained in:
cdtank 2010-09-30 20:42:12 +00:00
parent 8efaf54ee3
commit bc89ddbb91

View file

@ -2,6 +2,10 @@
function getWellFormedURLs(given_uri, type) { function getWellFormedURLs(given_uri, type) {
if (!given_uri || given_uri == "") {
return;
}
// general best practice is to put javascript code inside document.ready // general best practice is to put javascript code inside document.ready
// but in this case when i do that the function does not get called // but in this case when i do that the function does not get called
// properly. // properly.
@ -86,8 +90,9 @@ function setProfileImage(imageContainerID, mainImageURL, contextPath) {
return; return;
} }
if (!mainImageURL) { if (!mainImageURL || mainImageURL == "") {
$("#" + imageContainerID).empty(); $("#" + imageContainerID).empty();
return;
} }
var rawPath = getWellFormedURLs(mainImageURL, "image"); var rawPath = getWellFormedURLs(mainImageURL, "image");
@ -173,6 +178,10 @@ function processProfileInformation(nameContainerID,
var name, mainImageURL, imageContextPath, moniker; var name, mainImageURL, imageContextPath, moniker;
if (jQuery.isEmptyObject(profileInfoJSON)) {
return;
}
$.each(profileInfoJSON, function(key, set){ $.each(profileInfoJSON, function(key, set){
if (key.search(/mainImage/i) > -1) { if (key.search(/mainImage/i) > -1) {
@ -211,13 +220,8 @@ function visLoaded(nodes){
} }
function changeVisHeight(newHeight) {
$("#CoAuthorVis").css("height", newHeight);
$("#bodyPannel").css("height", newHeight);
}
function createTable(tableID, tableContainer, tableData) { function createTable(tableID, tableContainer, tableData) {
var table = $('<table>'); var table = $('<table>');
table.attr('id', tableID); table.attr('id', tableID);
@ -329,7 +333,7 @@ function renderCoAuthorshipVisualization() {
"width", "600", "width", "600",
"height", "840", "height", "840",
"align", "middle", "align", "middle",
"id", "CoAuthorVis", "id", "CoAuthor",
"quality", "high", "quality", "high",
"bgcolor", "#ffffff", "bgcolor", "#ffffff",
"name", "CoAuthor", "name", "CoAuthor",
@ -346,7 +350,7 @@ function renderCoAuthorshipVisualization() {
"width", "600", "width", "600",
"height", "850", "height", "850",
"align", "top", "align", "top",
"id", "CoAuthorVis", "id", "CoAuthor",
"quality", "high", "quality", "high",
"bgcolor", "#ffffff", "bgcolor", "#ffffff",
"name", "CoAuthor", "name", "CoAuthor",