1. Changed wordings for CSV file downloads & Network Image files for co-author & co-investigator networks.

2. Changed Temporal Graph legend links to be save as other clickable links (blue-ish)
3. Changed wordings on temporal graph vis.
4. Changed default sorting to be first on counts (desc) & then entity names (asc)
5. Changed how the constants were intiated for temporal vis, this is preparation for other tasks.
6. Since now if no URI is provided to the tmeporal graph vis it defaults to the highest levbel org. Removed the AJAX call to a utilites servlet that calculated this beforehand.
This commit is contained in:
cdtank 2011-02-02 21:04:36 +00:00
parent 415c1b73f4
commit 49116a20b2
9 changed files with 88 additions and 64 deletions

View file

@ -120,6 +120,7 @@ a.clear-selected-entities {
margin-left: 10px;
display: inline-block;
text-decoration: underline;
color: #2485AE;
}
.ellipsis.multiline {
white-space: normal;

View file

@ -30,58 +30,75 @@ var colorConstantQueue = [ LIGHT_BLUE, DARK_ORANGE, VIBRANT_GREEN,
DARK_TURQUOISE, MEHENDI_GREEN, HOT_PINK,
DARK_RED ];
var freeColors = colorConstantQueue.slice();
var freeColors;
var globalDateObject = new Date();
var globalDateObject;
var year = {
min: globalDateObject.getFullYear() - 9,
max: globalDateObject.getFullYear(),
globalMin: globalDateObject.getFullYear() - 9,
globalMax: globalDateObject.getFullYear()
};
var year;
var colors = {};
var prevColor = {};
var colorToAssign, colorToRemove;
var renderedObjects = [];
var labelToEntityRecord = {};
var setOfLabels = [];
var labelToCheckedEntities = {};
var stopWordsToCount = {};
var colors, prevColor, colorToAssign,
colorToRemove, renderedObjects, labelToEntityRecord,
setOfLabels, labelToCheckedEntities, stopWordsToCount;
var graphContainer;
var tableDiv;
var entityLevel;
//options for Flot
var FlotOptions = {
legend : {
show : false
},
lines : {
show : true
},
points : {
show : false
},
xaxis : {
tickDecimals : 0,
tickSize : 10
},
series : {
lines : {
lineWidth : 7
}
},
yaxis : {
tickSize : 1,
tickDecimals : 0,
min : 0
},
grid : {
borderColor : "#D9D9D9"
}
};
var FlotOptions;
FlotOptions.colors = colorConstantQueue;
function initConstants() {
freeColors = colorConstantQueue.slice();
globalDateObject = new Date();
year = {
min: globalDateObject.getFullYear() - 9,
max: globalDateObject.getFullYear(),
globalMin: globalDateObject.getFullYear() - 9,
globalMax: globalDateObject.getFullYear()
};
colors = {};
prevColor = {};
colorToAssign, colorToRemove;
renderedObjects = [];
labelToEntityRecord = {};
setOfLabels = [];
labelToCheckedEntities = {};
stopWordsToCount = {};
//options for Flot
FlotOptions = {
legend : {
show : false
},
lines : {
show : true
},
points : {
show : false
},
xaxis : {
tickDecimals : 0,
tickSize : 10
},
series : {
lines : {
lineWidth : 7
}
},
yaxis : {
tickSize : 1,
tickDecimals : 0,
min : 0
},
grid : {
borderColor : "#D9D9D9"
}
};
FlotOptions.colors = colorConstantQueue;
}

View file

@ -2,6 +2,11 @@
$(document).ready(function() {
/*
* This will set intitial values of the constants present in constants.js
* */
initConstants();
/* This is used to cache the current state whether the user is allowed to select more entities from
the datatable or not. Once Max number of entity selection is reached the user can no longer select
more & this variable will be set to false. */
@ -41,7 +46,7 @@ $(document).ready(function() {
});
$("#body").empty().html("<div id='loading-comparisons'>Loading " + selectedValue + "&nbsp;&nbsp;<img src='" + loadingImageLink + "' /></div>");
//$("#body").empty().html("<div id='loading-comparisons'>Loading " + selectedValue + "&nbsp;&nbsp;<img src='" + loadingImageLink + "' /></div>");
/*
* This piece of code is not executed at all because the redirect happens before there is a chance
@ -128,7 +133,6 @@ $(document).ready(function() {
*/
function loadData(jsonData) {
// var yearRange;
$.each(jsonData, function (index, val) {
setOfLabels.push(val.label);
labelToEntityRecord[val.label] = val;

View file

@ -965,7 +965,7 @@ function prepareTableForDataTablePagination(jsonData){
checkboxTH.html(' ');
var entityLabelTH = $('<th>');
entityLabelTH.html('Entity Label');
entityLabelTH.html('Entity Name');
var publicationCountTH = $('<th>');
if($("select.comparisonValues option:selected").text() === "by Publications"){
@ -1022,7 +1022,7 @@ function prepareTableForDataTablePagination(jsonData){
var entityListTable = $('#datatable').dataTable({
"sDom": '<"' + searchBarParentContainerDIVClass + '"f><"filterInfo"i><"paginatedtabs"p><"table-separator"><"datatablewrapper"t>',
"aaSorting": [
[2, "desc"]
[2, "desc"], [1,'asc']
],
"asStripClasses": [],
"iDisplayLength": 10,

View file

@ -1,10 +1,12 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#assign visualizationLink>
<a class="visualization-menupage-link temporal-graph hidden" href="#" title="Compare publications and grants output">Temporal Graph</a>
<a class="visualization-menupage-link temporal-graph" href="${urls.base}/visualization?vis=entity_comparison" title="Compare publications and grants output">Temporal Graph</a>
</#assign>
<#include "menupage.ftl">
${stylesheets.add("/css/visualization/visualization.css")}
${scripts.add("/js/menupage/visualizationLink.js")}
<#--
${scripts.add("/js/menupage/visualizationLink.js")}
-->

View file

@ -52,7 +52,7 @@
<h3>Who do you want to compare?</h3>
<div id="paginatedTable"></div>
<div id="paginated-table-footer">
<a id="csv" href="${temporalGraphDownloadFileLink}" class="temporalGraphLinks">Save as CSV</a>
<a id="csv" href="${temporalGraphDownloadFileLink}" class="temporalGraphLinks">Save All as CSV</a>
<a class="clear-selected-entities temporalGraphLinks" title="Clear all selected entities.">Clear</a>
</div>
</div>

View file

@ -196,13 +196,13 @@ public class CoAuthorshipRequestHandler implements VisualizationRequestHandler {
outputFileName = UtilityFunctions.slugify(authorNodesAndEdges
.getEgoNode().getNodeName())
+ "_coauthors-per-year" + ".csv";
+ "_co-authors-per-year" + ".csv";
yearToCoauthors = UtilityFunctions.getPublicationYearToCoAuthors(authorNodesAndEdges);
} else {
outputFileName = "no_coauthors-per-year" + ".csv";
outputFileName = "no_co-authors-per-year" + ".csv";
}
Map<String, String> fileData = new HashMap<String, String>();
@ -230,12 +230,12 @@ public class CoAuthorshipRequestHandler implements VisualizationRequestHandler {
if (coAuthorshipData.getNodes() != null && coAuthorshipData.getNodes().size() > 0) {
outputFileName = UtilityFunctions.slugify(coAuthorshipData.getEgoNode().getNodeName())
+ "_coauthors" + ".csv";
+ "_co-authors" + ".csv";
coAuthorsToCount = getCoAuthorsList(coAuthorshipData);
} else {
outputFileName = "no_coauthors" + ".csv";
outputFileName = "no_co-authors" + ".csv";
}
Map<String, String> fileData = new HashMap<String, String>();
@ -295,10 +295,10 @@ public class CoAuthorshipRequestHandler implements VisualizationRequestHandler {
if (authorNodesAndEdges.getNodes() != null && authorNodesAndEdges.getNodes().size() > 0) {
outputFileName = UtilityFunctions.slugify(authorNodesAndEdges.getEgoNode().getNodeName())
+ "_coauthor-network.graphml" + ".xml";
+ "_co-author-network.graphml" + ".xml";
} else {
outputFileName = "no_coauthor-network.graphml" + ".xml";
outputFileName = "no_co-author-network.graphml" + ".xml";
}
CoAuthorshipGraphMLWriter coAuthorshipGraphMLWriter =

View file

@ -213,13 +213,13 @@ public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler
outputFileName = UtilityFunctions.slugify(piNodesAndEdges
.getEgoNode().getNodeName())
+ "_coinvestigators-per-year" + ".csv";
+ "_co-investigators-per-year" + ".csv";
yearToCoPIs = UtilityFunctions.getGrantYearToCoPI(piNodesAndEdges);
} else {
outputFileName = "no_coinvestigators-per-year" + ".csv";
outputFileName = "no_co-investigators-per-year" + ".csv";
}
Map<String, String> fileData = new HashMap<String, String>();
@ -247,12 +247,12 @@ public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler
if (coPIData.getNodes() != null && coPIData.getNodes().size() > 0) {
outputFileName = UtilityFunctions.slugify(coPIData.getEgoNode().getNodeName())
+ "_coinvestigators" + ".csv";
+ "_co-investigators" + ".csv";
coPIsToCount = getCoPIsList(coPIData);
} else {
outputFileName = "no_coinvestigators" + ".csv";
outputFileName = "no_co-investigators" + ".csv";
}
Map<String, String> fileData = new HashMap<String, String>();
@ -312,10 +312,10 @@ public class CoPIGrantCountRequestHandler implements VisualizationRequestHandler
if (coPIData.getNodes() != null && coPIData.getNodes().size() > 0) {
outputFileName = UtilityFunctions.slugify(coPIData.getEgoNode().getNodeName())
+ "_copi-network.graphml" + ".xml";
+ "_co-investigator-network.graphml" + ".xml";
} else {
outputFileName = "no_copi-network.graphml" + ".xml";
outputFileName = "no_co-investigator-network.graphml" + ".xml";
}
CoPIGraphMLWriter coPIGraphMLWriter =