'); + authorTH.html(tableColumnTitle1); + row.append(authorTH); + + row.append($(' | ').html(tableColumnTitle2 + "" + $('#ego_label').text())); + + header.append(row); + + table.append(header); + + $.each(tableData, function(i, item){ + + /*if (visMode == "coauthorship") {*/ + number_of_works = item.number_of_authored_works; + /*} else { + 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 = "";
+
+ /*if (visMode == "coauthorship") {*/
+ works = "Publication(s)";
+ persons = "Co-author(s)";
+ relation = "coauthorship"
+ earliest_work = obj.earliest_publication;
+ latest_work = obj.latest_publication;
+ number_of_works = obj.number_of_authored_works;
+ /*} else {
+ works = "Grant(s)";
+ persons = "Co-PI(s)";
+ relation = "copi";
+ 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) {
+
+ $("#authorName").addClass('author_name').removeClass('neutral_author_name');
+ $('#num_works > .author_stats_text').text(works);
+ $('#num_authors > .author_stats_text').text(persons);
+
+ } else {
+
+ $("#authorName").addClass('neutral_author_name').removeClass('author_name');
+ $('#num_works > .author_stats_text').text('Joint ' + works);
+ $('#num_authors > .author_stats_text').text('Joint ' + persons);
+
+ }
+
+ $("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile"));
+ $("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, relation));
+ processProfileInformation("authorName",
+ "profileMoniker",
+ "profileImage",
+ jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")),
+ true,
+ true);
+
+
+
+ } else{
+ $("#profileUrl").attr("href","#");
+ $("#coAuthorshipVisUrl").attr("href","#");
+ }
+
+ $("#coAuthors").empty().append(obj.noOfCorelations);
+
+ $("#firstPublication").empty().append(earliest_work);
+ (earliest_work)?$("#fPub").attr("style","visibility:visible"):$("#fPub").attr("style","visibility:hidden");
+ $("#lastPublication").empty().append(latest_work);
+ (latest_work)?$("#lPub").attr("style","visibility:visible"):$("#lPub").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 renderCoAuthorshipVisualization())
+ * 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 renderCoAuthorshipVisualization() {
+
+ var visualization = "";
+ var encodedURL = "";
+
+ /*if(visMode == "coauthorship"){*/
+ visualization = "CoAuthor";
+ encodedURL = getEncodedCoAuthorURL();
+ /*} else {
+ 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/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl b/productMods/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl new file mode 100644 index 00000000..a1b2b227 --- /dev/null +++ b/productMods/templates/freemarker/visualization/personlevel/coAuthorPersonLevel.ftl @@ -0,0 +1,203 @@ +<#-- $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 egoCoAuthorshipDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthor_network_stream&labelField=label'> + +<#assign coprincipalinvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&visMode=copi'> + +<#assign egoCoAuthorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthors'> +<#assign egoCoAuthorshipNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthor_network_download'> + +<#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 coAuthorPersonLevelJavaScript = '${urls.base}/js/visualization/personlevel/person_level-fm.js'> + + + + + + + + + + +<#assign coAuthorStyle = "${urls.base}/css/visualization/personlevel/coauthor_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}" /> + + + + + +
+
diff --git a/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl b/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl
new file mode 100644
index 00000000..841b7965
--- /dev/null
+++ b/productMods/templates/freemarker/visualization/personlevel/coPIPersonLevel.ftl
@@ -0,0 +1 @@
+<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
\ 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 46e8da66..eddb9995 100644
--- a/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl
+++ b/productMods/templates/freemarker/visualization/publication/personPublicationSparklineContent.ftl
@@ -41,8 +41,6 @@
column: 0,
minValue: '${sparklineVO.earliestRenderedPublicationYear?c}',
maxValue: '${sparklineVO.latestRenderedPublicationYear?c}'
- /*minValue: '2001',
- maxValue: '2011'*/
}]));
diff --git a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java
index 4cc9fe77..d6f38b21 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/visualization/freemarker/coauthorship/CoAuthorshipVisCodeGenerator.java
@@ -514,6 +514,14 @@ public class CoAuthorshipVisCodeGenerator {
sparklineData.setTable(tableCode);
+
+ Map
+
+ <#-- Label -->
+
+
+ <#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
+
+ + + <#-- Moniker--> + + + + + + + <#if (numOfAuthors > 0) > + +Co-Author Network+ + <#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) > + (GraphML File) + <#else> + + <#if numOfAuthors?? && numOfAuthors <= 0 > + <#assign authorsText = "multi-author" /> + #if> + + + #if> + + <#else> + + + + #if> + +
+
+ #if>
+
+ <#-- Sparkline -->
+
+
+
+
+
+ Profile+ + +
+
+
+
+ + + + + + + Note: 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.
+
+ <#assign sparklineVO = egoPubSparklineVO />
+ <#include "personPublicationSparklineContent.ftl">
+
+ <#assign sparklineVO = uniqueCoauthorsSparklineVO />
+ <#include "coAuthorshipSparklineContent.ftl">
+
+
+ <#if (numOfAuthors > 0) >
+
+
+
+
+
+ #if>
+
+Tables+ +
+
+
+ <#if (numOfCoAuthorShips > 0) >
+
+ + TABLE + +
+
+
+
+ #if>
+
+
+
+ |