From 2a48f7e8641b7f853a8b4f6e059d0aefc4ccb487 Mon Sep 17 00:00:00 2001 From: bkoniden Date: Fri, 14 Jan 2011 18:52:21 +0000 Subject: [PATCH] commented out console.log statements in util.js and attached click event functionality to change event for select.comparisonValues in entityComparison*.ftl --- ...ityComparisonGrantsStandaloneActivator.ftl | 25 +++++++++--------- .../entityComparisonStandaloneActivator.ftl | 26 ++++++++++--------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl index b966b06f..8f233de3 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonGrantsStandaloneActivator.ftl @@ -122,29 +122,29 @@ var subOrganizationTemporalGraphPubURL = "${subOrganizationTemporalGraphPubURL}" // initial display of the grid when the page loads init(graphContainer); - /* - * When the intra-entity parameters are clicked, - * update the status accordingly. - */ - $("select.comparisonValues").click(function(){ - var selectedValue = $("select.comparisonValues option:selected").val(); - $("#comparisonParameter").text("Total Number of " + selectedValue); - $('#yaxislabel').html("Number of " + selectedValue).mbFlipText(false); - $('#yaxislabel').css("color", "#595B5B"); - $('#comparisonHeader').html(selectedValue).css('font-weight', 'bold'); - }); //click event handler for clear button $("a#clear").click(function(){ clearRenderedObjects(); }); + + /* + * When the intra-entity parameters are clicked, + * update the status accordingly. + */ $("select.comparisonValues").change(function(){ - console.log($("select.comparisonValues option:selected").text()); if($("select.comparisonValues option:selected").text() === "by Publications"){ window.location = subOrganizationTemporalGraphPubURL + "&uri=" + "${organizationURI}"; } + + var selectedValue = $("select.comparisonValues option:selected").val(); + $("#comparisonParameter").text("Total Number of " + selectedValue); + $('#yaxislabel').html("Number of " + selectedValue).mbFlipText(false); + $('#yaxislabel').css("color", "#595B5B"); + $('#comparisonHeader').html(selectedValue).css('font-weight', 'bold'); + }); $("input[type=checkbox].easyDeselectCheckbox").live('click', function(){ @@ -152,7 +152,6 @@ var subOrganizationTemporalGraphPubURL = "${subOrganizationTemporalGraphPubURL}" var checkbox = $(this); var checkboxValue = $(this).attr("value"); var linkedCheckbox = labelToCheckedEntities[checkboxValue]; - //console.log('checkbox value is '+ checkboxValue); var entityToBeRemoved = labelToEntityRecord[checkboxValue]; if(!checkbox.is(':checked')){ diff --git a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl index 275b7f53..d611cbcd 100644 --- a/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl +++ b/productMods/templates/freemarker/visualization/entitycomparison/entityComparisonStandaloneActivator.ftl @@ -120,28 +120,30 @@ var subOrganizationTemporalGraphGrantURL = "${subOrganizationTemporalGraphGrantU // initial display of the grid when the page loads init(graphContainer); - /* - * When the intra-entity parameters are clicked, - * update the status accordingly. - */ - $("select.comparisonValues").click(function(){ - var selectedValue = $("select.comparisonValues option:selected").val(); - $("#comparisonParameter").text("Total Number of " + selectedValue); - $('#yaxislabel').html("Number of " + selectedValue).mbFlipText(false); - $('#yaxislabel').css("color", "#595B5B"); - $('#comparisonHeader').html(selectedValue).css('font-weight', 'bold'); - }); + //click event handler for clear button $("a#clear").click(function(){ clearRenderedObjects(); }); + + /* + * When the intra-entity parameters are clicked, + * update the status accordingly. + */ $("select.comparisonValues").change(function(){ - console.log($("select.comparisonValues option:selected").text()); + if($("select.comparisonValues option:selected").text() === "by Grants"){ window.location = subOrganizationTemporalGraphGrantURL + "&uri=" + "${organizationURI}"; } + + var selectedValue = $("select.comparisonValues option:selected").val(); + $("#comparisonParameter").text("Total Number of " + selectedValue); + $('#yaxislabel').html("Number of " + selectedValue).mbFlipText(false); + $('#yaxislabel').css("color", "#595B5B"); + $('#comparisonHeader').html(selectedValue).css('font-weight', 'bold'); + }); $("input[type=checkbox].easyDeselectCheckbox").live('click', function(){