From c74821f302cf45334fcbac3e4fec0ba1f122487c Mon Sep 17 00:00:00 2001 From: bkoniden Date: Mon, 3 Jan 2011 22:47:34 +0000 Subject: [PATCH] A bunch of changes like 1) Freemarker versions of Co-PI visualizations. CoInvestigator.ftl, CoPIPersonLevel.ftl, person_level_fm-copi.js. 2) Styling changes to Temporal graph. 3) Adding co_author, co_pi and temporal graph icons. 4) ftls related to sparklines. (CoAuthorship and CoPI) 5) Styling changes to CoAuthor/CoPI visualizations -- page.css, coauthor_style.css, coinvestigator_style.css --- .../personlevel/coauthor_style.css | 27 +- .../personlevel/coinvestigator_style.css | 103 ++++ .../css/visualization/personlevel/page.css | 102 +++- .../images/visualization/co_author_icon.png | Bin 0 -> 1536 bytes .../visualization/co_investigator_icon.png | Bin 0 -> 1536 bytes .../visualization/temporal_vis_icon.jpg | Bin 0 -> 2348 bytes .../temporal_vis_placeholder.jpg | Bin 0 -> 7316 bytes .../entityComparison/constants.js | 3 + .../js/visualization/entityComparison/util.js | 162 +------ .../personlevel/person_level-fm-copi.js | 449 ++++++++++++++++++ productMods/js/visualization/sparkline.js | 17 +- .../individual-sparklineVisualization.ftl | 19 +- .../coAuthorshipSparklineContent.ftl | 36 +- .../copi/coInvestigationSparklineContent.ftl | 89 ++-- .../grant/personGrantSparklineContent.ftl | 90 ++-- .../personlevel/coAuthorPersonLevel.ftl | 35 +- .../personlevel/coPIPersonLevel.ftl | 218 ++++++++- .../personPublicationSparklineContent.ftl | 39 +- .../visualization/entity_comparison.jsp | 91 ++-- .../templates/visualization/person_level.jsp | 14 +- .../CoAuthorshipVisCodeGenerator.java | 51 +- .../CoPIVisCodeGenerator.java | 25 +- .../EntityPublicationCountRequestHandler.java | 12 +- .../CoAuthorshipRequestHandler.java | 2 +- .../CoPIGrantCountRequestHandler.java | 2 +- .../CoPIVisCodeGenerator.java | 25 +- .../PersonGrantCountVisCodeGenerator.java | 5 +- .../PersonLevelRequestHandler.java | 4 +- .../utilities/UtilitiesRequestHandler.java | 17 + .../PersonGrantCountVisCodeGenerator.java | 29 +- ...ersonPublicationCountVisCodeGenerator.java | 51 +- .../visualization/entityComparison/layout.css | 45 +- .../personlevel/coauthor_style.css | 2 +- .../css/visualization/personlevel/page.css | 73 ++- 34 files changed, 1358 insertions(+), 479 deletions(-) create mode 100644 productMods/css/visualization/personlevel/coinvestigator_style.css create mode 100755 productMods/images/visualization/co_author_icon.png create mode 100755 productMods/images/visualization/co_investigator_icon.png create mode 100644 productMods/images/visualization/temporal_vis_icon.jpg create mode 100644 productMods/images/visualization/temporal_vis_placeholder.jpg create mode 100644 productMods/js/visualization/personlevel/person_level-fm-copi.js diff --git a/productMods/css/visualization/personlevel/coauthor_style.css b/productMods/css/visualization/personlevel/coauthor_style.css index 7dd2fe9a..33e5cf12 100644 --- a/productMods/css/visualization/personlevel/coauthor_style.css +++ b/productMods/css/visualization/personlevel/coauthor_style.css @@ -26,7 +26,9 @@ margin-top: 50px; width: 25%; background-color: #f7f9f9; - height: 80%; +/* height: 80%; */ + padding-left: 10px; + padding-bottom: 30px; } #dataPanel div { @@ -49,7 +51,7 @@ /* container override from liquid.css */ .container { - width: inherit; + width: inherit; } #incomplete-data{ @@ -57,9 +59,26 @@ margin : auto; line-height: 150%; color: #595b5b; + margin-left: 0px; } .fileDownloadPlaceHolder{ - - margin-left: 20px; + padding-top: 20px; + height: 20px; +} + +#profileTitle{ + + padding: 10px; + padding-left: 5%; + background-color: #2A2A2A; + color: white; + width: 50%; + margin-left: -10px; + margin-top: -10px; +} + +#table_heading{ +/* margin-bottom:20px; */ + width: 80%; } diff --git a/productMods/css/visualization/personlevel/coinvestigator_style.css b/productMods/css/visualization/personlevel/coinvestigator_style.css new file mode 100644 index 00000000..daacfe85 --- /dev/null +++ b/productMods/css/visualization/personlevel/coinvestigator_style.css @@ -0,0 +1,103 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +spacer{ + font-size:0; line-height:0; clear:both;} + + +/* ----------------- body start --------------------------- */ +#body{ + max-width:900px; + min-width:800px; + margin:0 auto; + position:relative; + background: white; +} +#bodyPannel{ + background: #FFFFFF; +/* width:765px; + float:left;*/ + /*padding-top: 0; + padding-right: 28px; + padding-bottom: 0;*/ + padding-left: 16px; + height: 840px; +} + +#dataPanel { + margin-top: 50px; + width: 25%; + background-color: #f7f9f9; +/* height: 80%; */ + padding-left: 10px; + padding-bottom: 30px; +} + +#dataPanel div { + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; +} +#dataPanel .italicize { + font-style: italic; +} +#dataPanel .bold { + font-weight: bold; + color:#13968c; + font-size: 14px; +} +#dataPanel .investigator_stats .numbers { + text-align: right; + width: 40px; + float:left; +} + +/* container override from liquid.css */ +.container { + width: inherit; +} + +#incomplete-data{ + width: 75%; + margin : auto; + line-height: 150%; + color: #595b5b; + margin-left: 0px; +} + +.fileDownloadPlaceHolder{ + padding-top: 20px; + height: 20px; +} + +#profileTitle{ + + padding: 10px; + padding-left: 5%; + background-color: #2A2A2A; + color: white; + width: 50%; + margin-left: -10px; + margin-top: -10px; +} + +#table_heading{ +/* margin-bottom:20px; */ + width: 80%; +} + +.investigator_name { + color: #13968c; + font-weight: bold; +} + +.neutral_investigator_name { + color: black; + font-weight: bold; +} + +.investigator_moniker { + color: #9C9C9C; +} + +#coinvestigations_table th { + vertical-align: top; +} diff --git a/productMods/css/visualization/personlevel/page.css b/productMods/css/visualization/personlevel/page.css index 6e270abe..de1c0a8f 100644 --- a/productMods/css/visualization/personlevel/page.css +++ b/productMods/css/visualization/personlevel/page.css @@ -8,23 +8,52 @@ a.no_href_styles { border: 0; } -.vis_stats { +/*.vis_stats {*/ /*width: 760px;*/ - margin: 0; +/* margin: 0; padding-left:10px; padding-top:10px; background: #fff; + margin-left: 35%; + clear: right; +} +*/ +/*.vis-tables {*/ +/* width: 33%; */ +/* padding: 10px; + margin: 10px; + background-color: #FFF; + border: 1px solid #ddebf1; + float:left; + font-size: 0.8em; +} +*/ + +.vis_stats { + /*width: 760px;*/ +/* margin: 0; + margin-left: 35%; + padding-left:10px;*/ + padding-top:10px; + background: #fff; + clear: right; + width:67%; + margin-left:33%; } .vis-tables { - width: 33%; - padding: 5px; - margin: 5px; +/* width: 33%; */ + padding: 10px; + margin: 10px; background-color: #FFF; border: 1px solid #ddebf1; - float: left; + float:left; + font-size: 0.8em; + width: 44%; + margin-left: 0px; } + p.datatable { font-size: 12px; display: block; @@ -83,7 +112,7 @@ p.datatable { } .neutral_author_name { - color: black; + color: #13968c; font-weight: bold; } @@ -96,13 +125,23 @@ p.datatable { padding-top: 10px; margin-bottom: 0.3em; float:left; + margin-right: 10px; } .toggle_visualization{ - padding-top: 10px; + +/* margin-bottom: 0.3em; + clear:left; float:right; width: 150px; +*/ + text-align: left; + margin-left: 84%; + margin-top: -8%; + max-width: 250px; + width: 22%; + height: 50px; } .sub_headings a { @@ -145,3 +184,50 @@ table.sparkline_wrapper_table td, th { #coauthorships_table th { vertical-align: top; } + +.sparkline_range{ + font-size: 0.9em; + font-weight: bold; +} + +.vis-tables table td{ + padding-right: 10px; + width: 50%; +} + +.vis-tables table caption{ + width: 100%; + padding-bottom: 10px; + font-weight: bold; + font-size: 16px; + text-align: left; +} + +.vis-tables table{ + width: 100%; +} + +.vis-tables table thead{ + text-align: left; +} + +.vis-tables table thead tr th { + background-color:#eaeaea; + font-size:14px; + padding:5px; + vertical-align:top; + text-align:left; +} + +.vis-tables table tbody { + font-size:12px; +} + +.vis-tables table tbody td { + text-align:left; + padding:5px; +} + +moniker{ + margin-top: 0px; +} \ No newline at end of file diff --git a/productMods/images/visualization/co_author_icon.png b/productMods/images/visualization/co_author_icon.png new file mode 100755 index 0000000000000000000000000000000000000000..c3fe8672366f7f8398547169e7af46748dc1366b GIT binary patch literal 1536 zcmV+b2LJhqP)-kkPEA zR$EJ3CT)6~wf9?kN$c}`e5ahW>5>%A3r~}rbH4X|zW4UMr?$4XHqqh%o(G-=iX~C5 z1D^n20h^MU*nkIt*MQnx_m+U~fe(OjUa;#M<-ljaL;SI^u_4>r+v-MER+iZ9b}zn$ zfd=3WU^z`P)c-2*4v-U%$AwTVZ8oJBpS<4!oCJEgpa8f)G9*DV1qB6?o13c^E-o%g zEEeNpDtQr?7JxHpc#57m0lY_I)SHu&BgMtVYLnEtu&^N6+1dPEk7q6dkC4!D;8Btx zd%xc=H8nMopP#S1G&eUVU0q!=K0YoEhl7Sl>N4guWt3=BwbZ?9}^ZSh(io_#3`e;(&*E~>1ol%}R8DJdxtr_(7emrKga%cZ5IMZ8|G z;qF3i0LV^3=rC|A*SOtoX>M+oii!&5dFu9fJkr?MC{S+xvs3Ep>k~*#OiV~eM~CvD*8RH; zojQmw?Z6$p!FaM7*o)}OnVA{23!_OwuCQOQMWxY)J_nwn9&U^kTUJ)KQ}*=w%F2pC zW(IhY-+F*kz61(~#ti7MQ=n=wPWtz;Y?&iN3 zG58jU0q2Aws&t>42O>IMhRs!Gmj8fH zH4;0W!{LR}w_uN!jS3oz({p)>jzxf@`M_W?%{ z(kIw^@LW4S+cPm>&yWzkbOm9%0HZI%QxBl(e$vN;o0S8vIdR>EL>|-gP|Q+7np7k& zFE0)c@l>xhIx)z&*g!c);XChdXR15v0DMBgn?SBH^6~&>vh&lJ$AJpn>;hJL$gPi= zkTEg@gF!X+vb<4!GB`LWeSLjKwUPWQ04s9M3PSe)j~O!zN6^~Z#5bF8IIKogp6>db zI;vkHI;{xVy*$t837*;^w}l= literal 0 HcmV?d00001 diff --git a/productMods/images/visualization/co_investigator_icon.png b/productMods/images/visualization/co_investigator_icon.png new file mode 100755 index 0000000000000000000000000000000000000000..10d2c6dc150ae6db4c5c498637ff4d6c767c1577 GIT binary patch literal 1536 zcmeAS@N?(olHy`uVBq!ia0vp^DnP8v!3HG%u&z)5Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07+CZ?T^vIyZoP?!^$1Rs__uAdrMYXcc4699g%*{pz?}w* zy7zP_D7{+L-Bjnmp{TKfTT$bMQqzJpvtKzW?KfKQMhgpmu=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X=>T-%3ui;s%*EA)Vx@VH&;GD3hwCt?gl@ ztjrXPJ--# zHUTwmAX!w8%s*=}&|c7AG3_dj)#20_m;A0>TpalJ9^K5-sokZVIEupg>)*OyN-?sK zb58zHSi=evh}Ib7MiTudl8cQg61ILH;uffp}cf+;!zJm1c84rq91TRd7tLoD^xp>pnyfKd{ef@ufW^kY2IkR-e@fpY@l z9B@0au-eazDC39a+G{5quw~;VsuXo!o5f4YK^UR+Z#e$;D+GW#8r?m4eDh+ymbJGh z2%}P?LOY!%2(``%kZ*Gu1b#|jq)4|zxGo%3p^JB3xR#}SRBheJsDlp{ zk3xh-U)CD6t05C6HG>>6g|r6>js(XC)%2v@nuU>~HnjvPPpOIsOyle^Uuff(MvBux zYoD>7gU8kKh%I&9E7%jU$B+c&q!CP8?$vejTvw`~ZdN+4*|ZW*0w+5qO03?hKesx9?sPS)`e zKZrFHwe*HvYu^mLMEzwTydL^>$lvmHhVe`FA3c^M05X);@#nao8rPxSyt~Cj9?j+GI+jmR(NZh2MS6LZ&+g2^;; zj9!~b_YZlqYLU{j#q#l1ANNb!o}fNo`#7)rNhLX=rLUw#?3$GkgWqP}tb=UIVb0ss zMtUy+oM9Tj2398BkTD_eoAa z>PXI>M(b5hA6IKJveAc|7ez$PwV6!T9DDocpnfBpdTGWhhIGk_A+^O$LUjo`X;vnNHy02cq^Qr=ul? zQRwSp0cXqO{G?36^tpWqJ`!N*rh4e**tPP_zzc>~b}3DtSW3Va)Zt0uSC5Dx4cucf zG4n$mT|vNo9iqu|=dxIoFEV(`h>h8w??-orlX|~c&i~Uu`_J|!Ht&^nb%p#S{v5&w zzz4v)A0@kZ*`ICyB6k?7j+D=6sA63{Qo4jI=kbNFQEzU@0_Frp1bTDtn3do(As;Oa zgm=y3rZXYiz%`cDS_KW5-)^gjTGAkCEk literal 0 HcmV?d00001 diff --git a/productMods/js/visualization/entityComparison/constants.js b/productMods/js/visualization/entityComparison/constants.js index 50bfe361..2cabfd37 100644 --- a/productMods/js/visualization/entityComparison/constants.js +++ b/productMods/js/visualization/entityComparison/constants.js @@ -69,6 +69,9 @@ var FlotOptions = { tickSize : 1, tickDecimals : 0, min : 0 + }, + grid : { + borderColor : "#D9D9D9" } }; diff --git a/productMods/js/visualization/entityComparison/util.js b/productMods/js/visualization/entityComparison/util.js index b3422c5a..21842be6 100644 --- a/productMods/js/visualization/entityComparison/util.js +++ b/productMods/js/visualization/entityComparison/util.js @@ -15,6 +15,8 @@ function init(graphContainer) { // TODO: make use of the id on the select field instead of a generic one. $("#comparisonParameter").text("Total Number of " + $("select.comparisonValues option:selected").val()); $('#yaxislabel').html("Number of " + optionSelected).mbFlipText(false); + $('#comparisonHeader').html(optionSelected).css('font-weight', 'bold'); + var defaultFlotOptions = { xaxis : { @@ -27,7 +29,11 @@ function init(graphContainer) { tickDecimals : 0, min : 0, max: 5 + }, + grid: { + borderColor : "#D9D9D9" } + }; /* @@ -538,7 +544,8 @@ function generateBarAndLabel(entity, divBar, divLabel,checkbox, spanElement){ //append a div and modify its css divBar.css("background-color", colorToAssign); divBar.css("width", normalizedWidth); - divLabel.children("a#entityURL").html(checkboxValue + " "); + divLabel.children("a#entityURL").html(checkboxValue + " ").css("color", "#333"); +// divLabel.children("a#entityURL").css("color", "#333").css("text-decoration", none); divLabel.children("a#entityURL").autoEllipsis(); createVIVOProfileImage(divLabel.children("a#vivoURL")); divLabel.children("a").css("font-size", "0.8em"); @@ -551,8 +558,8 @@ function createVIVOProfileImage(url){ var vivoImage = $(url); - vivoImage.html("VIVO"); - vivoImage.css("background-color","#212D34" ); + vivoImage.html("profile"); + vivoImage.css("background-color","#727272" ); vivoImage.css("color", "white"); vivoImage.css("padding", "2px"); } @@ -695,6 +702,7 @@ function prepareTableForDataTablePagination(jsonData){ table.attr('cellspacing', '0'); table.attr('border', '0'); table.attr('id', 'datatable'); + table.css('font-size', '0.9em'); var thead = $(''); var tr = $(''); @@ -730,7 +738,9 @@ function prepareTableForDataTablePagination(jsonData){ checkboxTD.html(''); var labelTD = $(''); + labelTD.css("width", "100px"); labelTD.html(index); +// labelTD.autoEllipsis(); var publicationCountTD = $(''); publicationCountTD.html(calcSumOfComparisonParameter(val)); @@ -754,11 +764,11 @@ function prepareTableForDataTablePagination(jsonData){ tableDiv.append(table); $('#datatable').dataTable({ - "sDom": '<"searchbar"f><"paginatedtabs"p><"datatablewrapper"t><"showentries"l>', + "sDom": '<"searchbar"f><"paginatedtabs"p><"datatablewrapper"t>', "aaSorting" : [[2, "desc"]], "iDisplayLength": 10, "sPaginationType": "full_numbers", - "aLengthMenu" : [5,10,15], + // "aLengthMenu" : [5,10,15], "fnDrawCallback": function() { $('tr>td:nth-child(1)>input').bind('click', function () { $(this).parent().parent().children().each(function(){$(this).addClass('datatablerowhighlight');}); }); $('tr>td:nth-child(1)>input').bind('click', function () { if(!$(this).is(':checked')) { $(this).parent().parent().children().each(function(){$(this).removeClass('datatablerowhighlight');});} }); @@ -776,7 +786,7 @@ function prepareTableForDataTablePagination(jsonData){ function bindPaginatedTabsToEvents(){ $('#datatable_paginate>span').bind('click', function(){ - console.log($(this)); + //console.log($(this)); checkIfColorLimitIsReached(); // bindInnerPaginatedTabsToEvents(); // $.each($('#datatable_paginate>span>span'), function(index, val){ @@ -820,6 +830,7 @@ function removeStopWords(val){ function setEntityLevel(){ $('#entitylevelheading').text(' - ' + toCamelCase(entityLevel) + ' Level').css('font-style', 'italic'); $('#entityleveltext').text(' ' + entityLevel.toLowerCase() + 's ').css('font-style', 'italic'); + $('#entityHeader').text(toCamelCase(entityLevel)).css('font-weight', 'bold'); } function getEntityVisMode(jsonData){ @@ -899,142 +910,3 @@ function setTickSizeOfAxes(){ setLineWidthAndTickSize(yearRange, FlotOptions); setTickSizeOfYAxis(calcMaxWithinComparisonParameter(checkedLabelToEntityRecord), FlotOptions); } -//function sortByEntityLabelDesc(value1, value2){ -// -//var result; -// -//if(value1 > value2){ -// result = -1; -//}else if(value1 < value2){ -// result = 1; -// }else { -// result = 0; -// } -//return result; -//} -// -//function sortByEntityLabelAsc(value1, value2){ -// -//var result; -// -//if (value1 > value2) { -// result = 1; -//} else if(value1 < value2) { -// result = -1; -// } else { -// result = 0; -// } -//return result; -//} - -//function renderPaginatedDiv(){ -// -////$("#entityTitleSortBy").trigger('click', "azdesc"); -//paginationDiv.pagination(setOfLabels.length, paginationOptions); -//} - -// -//jQuery.fn.liveUpdate = function(list){ -// -// list = jQuery(list); -// -// if ( list.length ) { -// var rows = list.children('li'); -// var cache = rows.map(function(){ -// // console.log($(this).children('a').text().toLowerCase()); -// return $(this).children('a').text().toLowerCase(); -// }); -// -// //console.log("rows: ", rows , " cache: ", cache); -// -// this.keyup(filter).keyup().parents('form').submit(function(){ -// return false; -// }); -// } -// -// return this; -// -// function filter(){ -// -// var term = jQuery.trim( jQuery(this).val().toLowerCase() ), scores = []; -// //console.log("this: ",this, " term: " +term); -// -// if ( !term ) { -// rows.show(); -// } else { -// rows.hide(); -// cache.each(function(i){ -// var score = this.score(term); -// if (score > 0) { -// scores.push([score, i]); -// } -// }); -// -// jQuery.each(scores.sort(function(a, b){return b[0] - a[0];}), function(){ -// jQuery(rows[ this[1] ]).show(); -// //console.log("showing : ", ($(rows[this[1]]).children('a').text())); -// }); -// } -// } -//}; -//function sortByParameterDesc(value1, value2){ -//var entity1 = labelToEntityRecord[value1]; -//var entity2 = labelToEntityRecord[value2]; -// -//var sum1 = calcSumOfComparisonParameter(entity1); -//var sum2 = calcSumOfComparisonParameter(entity2); -// -//return (sum2 - sum1); -//} -// -//function sortByParameterAsc(value1, value2){ -//var entity1 = labelToEntityRecord[value1]; -//var entity2 = labelToEntityRecord[value2]; -// -//var sum1 = calcSumOfComparisonParameter(entity1); -//var sum2 = calcSumOfComparisonParameter(entity2); -// -//return (sum1 - sum2); -//} -// -//function createCheckBoxesInsidePaginatedDiv(pageIndex){ -// -//var highestIndexInPage = Math.min((pageIndex + 1) * paginationOptions.items_per_page, setOfLabels.length); -//var newContent = ' '; -// -///* -// * Iterate through the list of school setOfLabels and build an HTML string -// * Also check if some of the checkboxes are previously checked? If they are checked, -// * then they should be on this time too! -// */ -//for (var i = pageIndex * paginationOptions.items_per_page; i < highestIndexInPage; i++) { -// var checkedFlag = ' ', j = 0, fontWeight = ' '; -// $.each(renderedObjects, function(){ -// if (renderedObjects[j].label == setOfLabels[i]) { -// checkedFlag = "checked"; -// fontWeight = " style='font-weight:bold;' "; -// } -// j++; -// }); -// newContent += '
  • ' + setOfLabels[i] + '<\/a><\/li>'; -//} -// -//// replace old content with new content -//$('#searchresult').html(newContent); -//populateMapOfCheckedEntities(); -// -//} -//function populateMapOfCheckedEntities(){ -////console.log('populating checked entities'); -// -////var checkedEntities = $("input[type=checkbox].if_clicked_on_school"); -////$.each(checkedEntities, function(index, val){ -//// labelToCheckedEntities[$(val).attr("value")] = val; -//// console.log('checked ', $(val).attr("value")); -////}); -// -//$.each(labelToCheckedEntities, function(index, val){ -//// labelToCheckedEntities[$(val).attr("value")] = val; -// //console.log('checked ', $(val).attr("value")); -//}); -//} \ No newline at end of file diff --git a/productMods/js/visualization/personlevel/person_level-fm-copi.js b/productMods/js/visualization/personlevel/person_level-fm-copi.js new file mode 100644 index 00000000..2ce4c32a --- /dev/null +++ b/productMods/js/visualization/personlevel/person_level-fm-copi.js @@ -0,0 +1,449 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +function getWellFormedURLs(given_uri, type) { + + if (!given_uri || given_uri == "") { + return; + } + + // 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 + // properly. + // so removing it for now. + + // $(document).ready(function() { + + var finalURL; + + if (type == "coauthorship") { + finalURL = $.ajax({ + url: contextPath + "/visualizationAjax", + data: ({vis: "utilities", vis_mode: "PERSON_LEVEL_URL", uri: given_uri}), + dataType: "text", + async: false, + success:function(data){ + } + }).responseText; + + return finalURL; + + } else if (type == "coinvestigation") { + + finalURL = $.ajax({ + url: contextPath + "/visualizationAjax", + data: ({vis: "utilities", vis_mode: "COPI_URL", uri: given_uri}), + dataType: "text", + async: false, + success:function(data){ + } + }).responseText; + + return finalURL; + + }else if (type == "profile") { + + finalURL = $.ajax({ + url: contextPath + "/visualizationAjax", + data: ({vis: "utilities", vis_mode: "PROFILE_URL", uri: given_uri}), + dataType: "text", + async: false, + success:function(data){ + } + }).responseText; + + return finalURL; + + } else if (type == "image") { + + finalURL = $.ajax({ + url: contextPath + "/visualizationAjax", + data: ({vis: "utilities", vis_mode: "IMAGE_URL", uri: given_uri}), + dataType: "text", + async: false, + success:function(data){ + } + }).responseText; + + return finalURL; + + } else if (type == "profile_info") { + + var profileInfoJSON = $.ajax({ + url: contextPath + "/visualizationAjax", + data: ({vis: "utilities", vis_mode: "PROFILE_INFO", uri: given_uri}), + dataType: "json", + async: false, + success:function(data){ + } + }).responseText; + + return profileInfoJSON; + + } + +} + +$.fn.image = function(src, successFunc, failureFunc){ + return this.each(function(){ + var profileImage = new Image(); + profileImage.onerror = failureFunc; + profileImage.onload = successFunc; + profileImage.src = src; + + return profileImage; + }); +}; + + +function setProfileImage(imageContainerID, mainImageURL) { + + if (imageContainerID == "") { + return; + } + + if (!mainImageURL || mainImageURL == "") { + $("#" + imageContainerID).empty(); + return; + } + + var rawPath = getWellFormedURLs(mainImageURL, "image"); + + var imageLink = contextPath + rawPath; + + var imageContainer = $("#" + imageContainerID); + imageContainer.image(imageLink, + function(){ + imageContainer.empty().append(this); + }, + function(){ + // For performing any action on failure to + // find the image. + imageContainer.empty(); + } + ); + +} + +function setProfileMoniker(monikerContainerID, moniker, doEllipsis) { + + if (monikerContainerID == "") { + return; + } + + if (!moniker) { + $("#" + monikerContainerID).empty(); + return; + } + + var finalDisplayMoniker; + + if (moniker.length > 30 && doEllipsis) { + + finalDisplayMoniker = moniker.substr(0,30) + "..."; + + } else { + + finalDisplayMoniker = moniker; + + } + + $("#" + monikerContainerID).empty().text(finalDisplayMoniker); + $("#" + monikerContainerID).attr('title', moniker); + +} + + +function setProfileName(nameContainerID, name, doNameEllipsis) { + + if (nameContainerID == "") { + return; + } + + if (!name) { + $("#" + nameContainerID).empty(); + return; + } + + var finalDisplayName; + + if (name.length > 30 && doNameEllipsis) { + + finalDisplayName = name.substr(0,30) + "..."; + + } else { + + finalDisplayName = name; + + } + + $("#" + nameContainerID).empty().text(finalDisplayName); + $("#" + nameContainerID).attr('title', name); + +} + +function processProfileInformation(nameContainerID, + monikerContainerID, + imageContainerID, + profileInfoJSON, + doMonikerEllipsis, + doNameEllipsis) { + + var name, mainImageURL, moniker; + + if (jQuery.isEmptyObject(profileInfoJSON)) { + return; + } + + $.each(profileInfoJSON, function(key, set){ + + if (key.search(/mainImage/i) > -1) { + + mainImageURL = set[0]; + + } else if (key.search(/moniker/i) > -1) { + + moniker = set[0]; + + } else if (key.search(/label/i) > -1) { + + name = set[0]; + + } + + }); + + setProfileName(nameContainerID, name, doNameEllipsis); + setProfileMoniker(monikerContainerID, moniker, doMonikerEllipsis); + setProfileImage(imageContainerID, mainImageURL); + +} + + +function visLoaded(nodes){ + + var jsonedNodes = jQuery.parseJSON(nodes); + var tableID = ""; + var tableContainer = ""; + + tableID = "coinvestigations_table"; + tableContainer = "coinve_table_container"; + + $(document).ready(function() { + createTable("coinvestigations_table" , "coinve_table_container" , jsonedNodes.slice(1)); + }); + +} + + +function createTable(tableID, tableContainer, tableData) { + + var number_of_works = ""; + var tableCaption = ""; + var tableColumnTitle1 = ""; + var tableColumnTitle2 = ""; + + + tableCaption = "Co-investigators "; + tableColumnTitle1 = "Investigator"; + tableColumnTitle2 = "Grants with
    "; + + var table = $(''); + table.attr('id', tableID); + + table.append($(''); + + var row = $(''); + + var investigatorTH = $(''); + + row.append($('
    ').html(tableCaption + "(.CSV File)")); + + var header = $('
    '); + investigatorTH.html(tableColumnTitle1); + row.append(investigatorTH); + + row.append($('').html(tableColumnTitle2 + "" + $('#ego_label').text())); + + header.append(row); + + table.append(header); + + $.each(tableData, function(i, item){ + + number_of_works = item.number_of_investigated_grants; + + var row = $('
    ').html(item.label)); + row.append($('').html(number_of_works)); + + table.append(row); + + }); + + table.prependTo('#' + tableContainer); + $('#' + tableContainer + " #loadingData").remove(); + +} + +//renderStatsOnNodeClicked, CoRelations, noOfCoRelations +//function nodeClickedJS(json){ +function renderStatsOnNodeClicked(json){ + + //console.log(json); + var obj = jQuery.parseJSON(json); + + var works = ""; + var persons = ""; + var relation = ""; + var earliest_work = ""; + var latest_work = ""; + var number_of_works = ""; + + works = "Grant(s)"; + persons = "Co-investigator(s)"; + relation = "coinvestigation"; + earliest_work = obj.earliest_grant; + latest_work = obj.latest_grant; + number_of_works = obj.number_of_investigated_grants; + + + + + $("#dataPanel").attr("style","visibility:visible"); + $("#works").empty().append(number_of_works); + + /* + * Here obj.url points to the uri of that individual + */ + if(obj.url){ + + if (obj.url == egoURI) { + + $("#investigatorName").addClass('investigator_name').removeClass('neutral_investigator_name'); + $('#num_works > .investigator_stats_text').text(works); + $('#num_investigators > .investigator_stats_text').text(persons); + + } else { + + $("#investigatorName").addClass('neutral_investigator_name').removeClass('investigator_name'); + $('#num_works > .investigator_stats_text').text('Joint ' + works); + $('#num_investigators > .investigator_stats_text').text('Joint ' + persons); + + } + + $("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile")); + $("#coInvestigationVisUrl").attr("href", getWellFormedURLs(obj.url, relation)); + processProfileInformation("investigatorName", + "profileMoniker", + "profileImage", + jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")), + true, + true); + + + + } else{ + $("#profileUrl").attr("href","#"); + $("#coInvestigationVisUrl").attr("href","#"); + } + + $("#coInvestigators").empty().append(obj.noOfCorelations); + + $("#firstGrant").empty().append(earliest_work); + (earliest_work)?$("#fGrant").attr("style","visibility:visible"):$("#fGrant").attr("style","visibility:hidden"); + $("#lastGrant").empty().append(latest_work); + (latest_work)?$("#lGrant").attr("style","visibility:visible"):$("#lGrant").attr("style","visibility:hidden"); + + // obj.url:the url parameter for node + +} + +/* +* Inside both of these functions, '&' are replaced with '%26' because we are externally +* passing two parameters to the flash code using flashvars (see renderCoInvestigationVisualization()) +* and they are delimited using '&' too. +*/ + +function getEncodedCoAuthorURL(){ + + var queryString = "uri="+ egoURI + "&vis=coauthorship"; +// console.log('domainParam is '+ domainParam); +// console.log('CoAuthorURL is ' + domainParam + '?' + queryString.replace(/&/g, '%26')); + return domainParam + '?' + queryString.replace(/&/g, '%26'); +} + +function getEncodedCoPIURL(){ + + var queryString = "uri="+ egoURI+ "&vis=coprincipalinvestigator"; +// console.log('CoPIURL is ' + domainParam + '?' + queryString.replace(/&/g, '%26') ); + return domainParam + '?' + queryString.replace(/&/g, '%26'); +} + +function renderCoInvestigationVisualization() { + + var visualization = ""; + var encodedURL = ""; + + visualization = "CoPI"; + encodedURL = getEncodedCoPIURL(); + +// console.log('visualization is ' + visualization + ' and encodedURL is '+ encodedURL); + // Version check for the Flash Player that has the ability to start Player + // Product Install (6.0r65) + var hasProductInstall = DetectFlashVer(6, 0, 65); + + // Version check based upon the values defined in globals + var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); + + if ( hasProductInstall && !hasRequestedVersion ) { + // DO NOT MODIFY THE FOLLOWING FOUR LINES + // Location visited after installation is complete if installation is + // required + var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; + var MMredirectURL = window.location; + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; + var MMdoctitle = document.title; + + AC_FL_RunContent( + "src", "playerProductInstall", + "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", + "width", "800", + "height", "840", + "align", "middle", + "id", "EgoCentric", + "quality", "high", + "bgcolor", "#ffffff", + "name", "EgoCentric", + "allowScriptAccess","sameDomain", + "type", "application/x-shockwave-flash", + "pluginspage", "http://www.adobe.com/go/getflashplayer" + ); + } else if (hasRequestedVersion) { + // if we've detected an acceptable version + // embed the Flash Content SWF when all tests are passed + //coAuthorUrl=/vivo1/visualization?vis=coauthorship%26render_mode=data%26uri=http%3A%2F%2Fvivo.iu.edu%2Findividual%2FBrnerKaty&labelField=label&coPIUrl=/vivo1/visualization?vis=coprincipalinvestigator%26render_mode=data%26uri=http%3A%2F%2Fvivo.iu.edu%2Findividual%2FBrnerKaty&labelField=label + AC_FL_RunContent( + "src", swfLink, +// "flashVars", 'coAuthorUrl='+ encodeURL(egoCoAuthorshipDataFeederURL) + '&coPIUrl=' + encodeURL(egoCoPIDataFeederURL) , +// "flashVars", 'coAuthorUrl='+ getEncodedCoAuthorURL() + '&coPIUrl=' + getEncodedCoPIURL() , +// "flashVars", 'graphmlUrl=' + getEncodedCoAuthorURL() + '&labelField=label&visType=CoAuthor', + "flashVars", 'graphmlUrl=' + encodedURL + '&labelField=label&visType='+visualization, + "width", "600", + "height", "850", + "align", "top", + "id", "EgoCentric", + "quality", "high", + "bgcolor", "#ffffff", + "name", "EgoCentric", + "allowScriptAccess","sameDomain", + "type", "application/x-shockwave-flash", + "pluginspage", "http://www.adobe.com/go/getflashplayer" + ); + } else { // flash is too old or we can't detect the plugin + var alternateContent = '

    ' + + 'This content requires the Adobe Flash Player. ' + + 'Get Flash

    '; + document.write(alternateContent); // insert non-flash content + + } + +} \ No newline at end of file diff --git a/productMods/js/visualization/sparkline.js b/productMods/js/visualization/sparkline.js index 625881db..6c8011ee 100644 --- a/productMods/js/visualization/sparkline.js +++ b/productMods/js/visualization/sparkline.js @@ -3,9 +3,10 @@ /* Javascript for sparkline visualization on person profile page */ var visualization = { - render: function(url) { - var containerId = 'vis_container', - container = $('#' + containerId); + renderCoAuthor: function(url) { + + var containerIdCoAuthor = 'vis_container_coauthor', + containerCoAuthor = $('#' + containerIdCoAuthor); //container.empty().html(''); @@ -15,17 +16,21 @@ var visualization = { 'render_mode': 'dynamic', 'vis': 'person_pub_count', 'vis_mode': 'short', - 'container': containerId + 'container': containerIdCoAuthor }, dataType: 'html', success:function(data){ - container.html(data); + containerCoAuthor.html(data); + containerCoAuthor.children("#pub_count_short_sparkline_vis").append(coAuthorIcon); + /* containerCoAuthor.find("").css("float", "left"); */ } }); } }; $(document).ready(function() { + visualizationUrl = visualizationUrl.replace("/visualization", "/visualizationAjax"); - visualization.render(visualizationUrl); + + visualization.renderCoAuthor(visualizationUrl); }); diff --git a/productMods/templates/freemarker/body/partials/individual/individual-sparklineVisualization.ftl b/productMods/templates/freemarker/body/partials/individual/individual-sparklineVisualization.ftl index 30f58b7a..f1bf8a84 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-sparklineVisualization.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-sparklineVisualization.ftl @@ -4,15 +4,30 @@ <#if individual.visualizationUrl??> +<#assign coAuthorIcon = '${urls.images}/visualization/co_author_icon.png'> +<#assign coInvestigatorIcon = '${urls.images}/visualization/co_investigator_icon.png'> +<#assign standardVisualizationURLRoot ="/visualizationfm"> <#assign googleJSAPI = 'http://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22areachart%22%2C%22imagesparkline%22%5D%7D%5D%7D'> - -
     
    +<#assign CoInvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${individual.uri}&vis_mode=copi'> + +
     
    +
    +
    +

    Co-Investigator Network
    View 4

    +
    + + ${stylesheets.addFromTheme("/visualization/visualization.css")} ${scripts.add(googleJSAPI)} ${scripts.add("/js/visualization/sparkline.js")} + \ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/coauthorship/coAuthorshipSparklineContent.ftl b/productMods/templates/freemarker/visualization/coauthorship/coAuthorshipSparklineContent.ftl index fbf21fe9..112c2cc1 100644 --- a/productMods/templates/freemarker/visualization/coauthorship/coAuthorshipSparklineContent.ftl +++ b/productMods/templates/freemarker/visualization/coauthorship/coAuthorshipSparklineContent.ftl @@ -12,7 +12,7 @@ <#assign sparklineContainerID = visContainerID + "_spark"> -
    +
    -
    +
    + + <#if sparklineVO.shortVisMode> <#----> @@ -160,37 +162,22 @@ <#else>

    - - - - - - - - - + <#if displayTable?? && displayTable> - <#list sparklineVO.yearToActivityCount?keys as year> - - - - - - - -
    - Unique Co-Investigators per year (.CSV File) -
    - Year - - Count -
    - ${year} - - ${sparklineVO.yearToActivityCount[year]} -
    - Download data as .csv file. -
    +

    + <#assign tableID = "sparkline_data_table" /> + <#assign tableCaption = "Unique Co-Investigators per year " /> + <#assign tableActivityColumnName = "Count" /> + <#assign tableContent = sparklineVO.yearToActivityCount /> + <#assign fileDownloadLink = sparklineVO.downloadDataLink /> + + <#include "yearToActivityCountTable.ftl"> + + Download data as .csv file. +
    +

    + +

    diff --git a/productMods/templates/freemarker/visualization/grant/personGrantSparklineContent.ftl b/productMods/templates/freemarker/visualization/grant/personGrantSparklineContent.ftl index ad4ce3ca..b41e1994 100644 --- a/productMods/templates/freemarker/visualization/grant/personGrantSparklineContent.ftl +++ b/productMods/templates/freemarker/visualization/grant/personGrantSparklineContent.ftl @@ -12,7 +12,7 @@ <#assign sparklineContainerID = visContainerID + "_spark"> -
    +
    @@ -40,7 +42,7 @@ var egoCoAuthorshipDataFeederURL = "${egoCoAuthorshipDataFeederURL}"; var egoCoAuthorsListDataFileURL = "${egoCoAuthorsListDataFileURL}"; var contextPath = "${urls.base}"; -var domainParam = "http://vivo-vis-test.slis.indiana.edu/vivo1/visualizationData"; +var domainParam = "http://vivo-vis-bkoniden.slis.indiana.edu/vivo1/visualizationData"; // --> @@ -64,7 +66,7 @@ var domainParam = "http://vivo-vis-test.slis.indiana.edu/vivo1/visualizationData $(document).ready(function(){ - <#if (numOfCoAuthorShips > 0) > + <#if (numOfCoAuthorShips?? && numOfCoAuthorShips > 0) > $("#coauth_table_container").empty().html(''); @@ -88,25 +90,26 @@ $(document).ready(function(){
    <#-- Label --> -

    +

    <#-- Moniker--> - +
    -

    Co-Investigator Network

    - View - 4 -
    +
    +

    Co-Investigator Network
    View 4

    +
    + +
    - <#if (numOfAuthors > 0) > + <#if (numOfAuthors?? && numOfAuthors > 0) > -

    Co-Author Network

    +

    Co-Author Network

    <#if (numOfCoAuthorShips?? && numOfCoAuthorShips > 0) || (numOfAuthors?? && numOfAuthors > 0) > - (GraphML File) + <#else> <#if numOfAuthors?? && numOfAuthors <= 0 > @@ -144,7 +147,7 @@ $(document).ready(function(){

    Profile

    -
     
    +

     

    @@ -165,7 +168,7 @@ $(document).ready(function(){ <#-- Sparkline --> -
    +
    <#assign displayTable = false /> @@ -176,11 +179,11 @@ $(document).ready(function(){ <#include "coAuthorshipSparklineContent.ftl">
    - <#if (numOfAuthors > 0) > + <#if (numOfAuthors?? && numOfAuthors > 0) >
    -

    Tables

    +

    Tables

    @@ -198,7 +201,7 @@ $(document).ready(function(){
    - <#if (numOfCoAuthorShips > 0) > + <#if (numOfCoAuthorShips?? && numOfCoAuthorShips > 0) >

    diff --git a/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl b/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl index 841b7965..127fdaff 100644 --- a/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl +++ b/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl @@ -1 +1,217 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> \ No newline at end of file +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#assign standardVisualizationURLRoot ="/visualizationfm"> +<#assign ajaxVisualizationURLRoot ="/visualizationAjax"> +<#assign dataVisualizationURLRoot ="/visualizationData"> + +<#assign egoURI ="${egoURIParam?url}"> +<#assign egoCoInvestigationDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coprincipalinvestigator&uri=${egoURI}&vis_mode=copi_network_stream&labelField=label'> + +<#assign coauthorshipURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&vis_mode=coauthor'> + +<#assign egoCoInvestigatorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coprincipalinvestigator&uri=${egoURI}&vis_mode=copis'> +<#assign egoCoInvestigationNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coprincipalinvestigator&uri=${egoURI}&vis_mode=copi_network_download'> + +<#assign coAuthorIcon = '${urls.images}/visualization/co_author_icon.png'> + +<#assign swfLink = '${urls.images}/visualization/coauthorship/EgoCentric.swf'> +<#assign adobeFlashDetector = '${urls.base}/js/visualization/coauthorship/AC_OETags.js'> +<#assign googleVisualizationAPI = 'http://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22areachart%22%2C%22imagesparkline%22%5D%7D%5D%7D'> +<#assign coInvestigatorPersonLevelJavaScript = '${urls.base}/js/visualization/personlevel/person_level-fm-copi.js'> + + + + + + + + +<#assign coInvestigatorStyle = "${urls.base}/css/visualization/personlevel/coinvestigator_style.css" /> +<#assign pageStyle = "${urls.base}/css/visualization/personlevel/page.css" /> +<#assign vizStyle = "${urls.base}/css/visualization/visualization.css" /> + + + + + +<#assign loadingImageLink = "${urls.images}/visualization/ajax-loader.gif"> + +<#assign egoVivoProfileURL = "/individual?uri=${egoURI}" /> + + + + +
    +
    + + <#-- Label --> +

    + + <#-- Moniker--> + + +
    +
    +

    Co-Author Network
    View 4

    +
    + + + + +
    + + <#if (numOfInvestigators?? && numOfInvestigators > 0) > + +

    Co-Investigator Network

    + + <#if (numOfCoInvestigations?? && numOfCoInvestigations > 0) || (numOfInvestigators?? && numOfInvestigators > 0) > + + <#else> + + <#if numOfInvestigators?? && numOfInvestigators <= 0 > + <#assign investigatorsText = "multi-investigator" /> + + + Currently there are no ${investigatorsText!} grants for + this investigator + in the VIVO database. + + + + <#else> + + Currently there are no grants for + this investigator in the + VIVO database. + + + + +
    + + + + <#if (numOfCoInvestigations?? && numOfCoInvestigations > 0) || (numOfInvestigators?? && numOfInvestigators > 0) > + +
    +
    + +
    +
    +

    Profile

    +
    + +

     

    + +
    + +
    +
       + Grant(s)
    +
    +   Co-investigator(s)
    + + + +
    Note: This information is based solely on grants which have been loaded into the VIVO system. + This may only be a small sample of the person's total work.
    +
    +
    + + + + <#-- Sparkline --> +
    + <#assign sparklineVO = egoGrantSparklineVO /> + <#include "personGrantSparklineContent.ftl"> + + <#assign sparklineVO = uniqueCoInvestigatorsSparklineVO /> + <#include "coInvestigationSparklineContent.ftl"> +
    + + <#if (numOfInvestigators?? && numOfInvestigators > 0) > + +
    + +

    Tables

    + +
    + +

    + + <#assign tableID = "grant_data_table" /> + <#assign tableCaption = "Grants per year " /> + <#assign tableActivityColumnName = "Grants" /> + <#assign tableContent = egoGrantSparklineVO.yearToActivityCount /> + <#assign fileDownloadLink = egoGrantSparklineVO.downloadDataLink /> + + <#include "yearToActivityCountTable.ftl"> + +

    + +
    + + <#if (numOfCoInvestigations?? && numOfCoInvestigations > 0) > + +
    + +

    +
    + + + +
    + +
    + + + +
    \ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl index 1edcaa79..bd9ce115 100644 --- a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl +++ b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl @@ -12,7 +12,7 @@ <#assign sparklineContainerID = visContainerID + "_spark"> -
    +