Merge r1431,1436 from rel-1.1-maint branch (IE6 fix for coathorship visualization page) NIHVIVO-954

This commit is contained in:
nac26 2010-10-01 20:01:46 +00:00
parent eba31a884a
commit 96c91a9195
3 changed files with 224 additions and 252 deletions

View file

@ -9,8 +9,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page errorPage="/error.jsp"%> <%@ page errorPage="/error.jsp"%>
<% /*********************************************** <% /***********************************************
Displays the little group of things at the bottom of the page Displays the sparkline visualizations on individual profile pages
for administrators and editors.
request.attributes: request.attributes:
an Entity object with the name "entity" an Entity object with the name "entity"
@ -22,13 +21,10 @@
Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output
for debugging info. for debugging info.
bdc34 2006-01-22 created
**********************************************/ **********************************************/
Individual entity = (Individual)request.getAttribute("entity"); Individual entity = (Individual)request.getAttribute("entity");
boolean displayVisualization = false; boolean displayVisualization = false;
if (entity == null){ if (entity == null){
String e = "sparklineVisuzalition.jsp expects that request attribute 'entity' be set to the Entity object to display."; String e = "sparklineVisuzalition.jsp expects that request attribute 'entity' be set to the Entity object to display.";
displayVisualization = false; displayVisualization = false;
@ -39,7 +35,6 @@
displayVisualization = true; displayVisualization = true;
break; break;
} }
} }
} }
//System.out.println("visualization is supposed to be displayed? > " + displayVisualization); //System.out.println("visualization is supposed to be displayed? > " + displayVisualization);
@ -84,21 +79,16 @@
position:absolute;*/ position:absolute;*/
/*width:380px;*/ /*width:380px;*/
} }
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
$(document).ready(function() { $(document).ready(function() {
function renderVisualization(visualizationURL) { function renderVisualization(visualizationURL) {
<%-- <%--
$("#vis_container").empty().html('<img src="${loadingImageLink}" />'); $("#vis_container").empty().html('<img src="${loadingImageLink}" />');
--%> --%>
$.ajax({ $.ajax({
url: visualizationURL, url: visualizationURL,
@ -108,21 +98,18 @@
} }
}); });
} }
renderVisualization('${visualizationURL}'); renderVisualization('${visualizationURL}');
}); });
//--> //-->
</script> </script>
<div id="vis_container">&nbsp;</div> <div id="vis_container">&nbsp;</div>
<!--[if lte IE 7]>
<!--[if IE]>
<style type="text/css"> <style type="text/css">
#vis_container a{ #vis_container a{
@ -130,21 +117,10 @@
} }
.vis_link a{ .vis_link a{
padding: 5px; margin-top: 15px;
padding:10px;
display: block; display: block;
} }
</style>
<![endif]-->
<!--[if lt IE 8]>
<style type="text/css">
.vis_link {
padding-top:15px;
display: block;
}
</style> </style>
<![endif]--> <![endif]-->

View file

@ -34,91 +34,31 @@
<c:param name="uri" value="${requestScope.egoURIParam}" /> <c:param name="uri" value="${requestScope.egoURIParam}" />
</c:url> </c:url>
<script language="JavaScript" type="text/javascript">
$(document).ready(function(){
<c:if test='${numOfCoAuthorShips > 0}'>
$("#coauth_table_container").empty().html('<img id="loadingData" with="auto" src="${loadingImageLink}" />');
</c:if>
processProfileInformation("ego_label",
"ego_moniker",
"ego_profile_image",
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
<c:if test='${empty numOfCoAuthorShips || empty numOfAuthors}'>
if ($('#ego_label').text().length > 0) {
setProfileName('no_coauthorships_person', $('#ego_label').text());
}
</c:if>
});
</script>
<div id="body"> <div id="body">
<style type="text/css">
#profileImage img{
width: 90px;
height: auto;
}
#body h1 {
margin:0.0em;
}
.sparkline_wrapper_table {
display: inline;
vertical-align: bottom;
}
.author_name {
color: #13968c;
font-weight: bold;
}
.neutral_author_name {
color: black;
font-weight: bold;
}
.author_moniker {
color: #9C9C9C;
}
.sub_headings {
color: #121b3c;
padding-top: 10px;
margin-bottom: 0.3em;
}
.sub_headings a {
font-size:0.7em;
font-weight:normal;
}
table.sparkline_wrapper_table td, th {
vertical-align: bottom;
}
.inline_href {
}
#ego_profile {
padding-left:10px;
padding-top:10px;
min-height: 100px;
}
#ego_label {
font-size:1.1em;
}
#ego_profile_image {
float:left;
padding-right: 5px;
}
#ego_profile_image img{
width: 90px;
height: auto;
}
#ego_sparkline {
cursor:pointer;
height:36px;
width:471px;
}
#coauthorships_table th {
vertical-align: top;
}
</style>
<!--[if IE]> <!--[if IE]>
<style type="text/css"> <style type="text/css">
@ -140,7 +80,7 @@ table.sparkline_wrapper_table td, th {
<div id="ego_profile_image" class="thumbnail"></div> <div id="ego_profile_image" class="thumbnail"></div>
<%-- Label --%> <%-- Label --%>
<a href="${egoVivoProfileURL}"><h1><span id="ego_label" class="author_name"></span></h1></a> <h1><a href="${egoVivoProfileURL}"><span id="ego_label" class="author_name"></span></a></h1>
<%-- Moniker--%> <%-- Moniker--%>
<span id="ego_moniker" class="author_moniker"></span> <span id="ego_moniker" class="author_moniker"></span>
@ -154,8 +94,6 @@ table.sparkline_wrapper_table td, th {
<div id="incomplete-data">This information is based solely on publications which have been loaded into the VIVO system. <div id="incomplete-data">This information is based solely on publications which have been loaded into the VIVO system.
This may only be a small sample of the person's total work. </div> This may only be a small sample of the person's total work. </div>
<%-- Sparkline --%> <%-- Sparkline --%>
<h2 class="sub_headings">General Statistics</h2> <h2 class="sub_headings">General Statistics</h2>
<div id="${egoPubSparklineContainerID}"> <div id="${egoPubSparklineContainerID}">
@ -254,26 +192,3 @@ table.sparkline_wrapper_table td, th {
</c:if> </c:if>
</div> </div>
<script language="JavaScript" type="text/javascript">
$(document).ready(function(){
<c:if test='${numOfCoAuthorShips > 0}'>
$("#coauth_table_container").empty().html('<img id="loadingData" with="auto" src="${loadingImageLink}" />');
</c:if>
processProfileInformation("ego_label",
"ego_moniker",
"ego_profile_image",
jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info")));
<c:if test='${empty numOfCoAuthorShips || empty numOfAuthors}'>
if ($('#ego_label').text().length > 0) {
setProfileName('no_coauthorships_person', $('#ego_label').text());
}
</c:if>
});
</script>

View file

@ -13,6 +13,7 @@ a.no_href_styles {
margin: 0; margin: 0;
padding-left:10px; padding-left:10px;
padding-top:10px; padding-top:10px;
background: #fff;
} }
.vis-tables { .vis-tables {
@ -56,3 +57,83 @@ p.datatable {
} }
*/ */
#profileImage img{
width: 90px;
height: auto;
}
#body h1 {
margin:0.0em;
}
#ego_profile h1 a {
text-decoration: none;
}
.sparkline_wrapper_table {
display: inline;
vertical-align: bottom;
}
.author_name {
color: #13968c;
font-weight: bold;
}
.neutral_author_name {
color: black;
font-weight: bold;
}
.author_moniker {
color: #9C9C9C;
}
.sub_headings {
color: #121b3c;
padding-top: 10px;
margin-bottom: 0.3em;
}
.sub_headings a {
font-size:0.7em;
font-weight:normal;
}
table.sparkline_wrapper_table td, th {
vertical-align: bottom;
}
#ego_profile {
height: 1%; /* this was the key to killing the IE6 bug (no upper photo and sparklines jump on hover). Solution? Give the parent layout */
background: #fff;
padding-left:10px;
padding-top:10px;
min-height: 100px;
}
#ego_label {
font-size:1.1em;
}
#ego_profile_image {
float:left;
padding-right: 5px;
}
#ego_profile_image img {
width: 90px;
height: auto;
}
#ego_sparkline {
cursor:pointer;
height:36px;
width:471px;
}
#coauthorships_table th {
vertical-align: top;
}