From 704136c6f29cbdeb55c6268c22132b80352738c4 Mon Sep 17 00:00:00 2001 From: mb863 Date: Thu, 16 Dec 2010 22:26:59 +0000 Subject: [PATCH] NIHVIVO-556: Changed color for line separators in top header nav --- .../publicationSparklineContent.ftl | 375 ++++++++---------- themes/wilma/css/wilma.css | 2 +- 2 files changed, 168 insertions(+), 209 deletions(-) diff --git a/productMods/templates/freemarker/visualization/publicationSparklineContent.ftl b/productMods/templates/freemarker/visualization/publicationSparklineContent.ftl index f5406915..a7c31ff8 100644 --- a/productMods/templates/freemarker/visualization/publicationSparklineContent.ftl +++ b/productMods/templates/freemarker/visualization/publicationSparklineContent.ftl @@ -2,239 +2,198 @@ <#assign visContainerID = '${sparklineVO.visContainerDivID}'> <#if sparklineVO.shortVisMode> - <#assign sparklineContainerID = 'pub_count_short_sparkline_vis'> + <#assign sparklineContainerID = 'pub_count_short_sparkline_vis'> <#else> - <#assign sparklineContainerID = 'pub_count_full_sparkline_vis'> + <#assign sparklineContainerID = 'pub_count_full_sparkline_vis'> <#-- This is used to prevent collision between sparkline & visualization conatiner div ids. --> <#if visContainerID?upper_case == sparklineContainerID?upper_case> - <#assign sparklineContainerID = visContainerID + "_spark"> + <#assign sparklineContainerID = visContainerID + "_spark">
- -
- - - - - -
+ var sparksText = ' publication(s) from ${sparklineVO.earliestYearConsidered?c}' + + ' to ${sparklineVO.latestRenderedPublicationYear?c} ' + + ' (.CSV File) '; + + + $('#${sparklineContainerID} td.sparkline_text').html(sparksText); + + } + + /* + * This will activate the visualization. It takes care of creating + * div elements to hold the actual sparkline image and then calling the + * drawPubCountVisualization function. + * */ -<#if sparklineVO.shortVisMode> - - - View all VIVO publications and corresponding co-author network. - - - -<#else> - - -

- - - - - - - - - + $(document).ready(function() { + var sparklineImgTD; - <#list sparklineVO.yearToActivityCount?keys as year> - - - - - + /* + * This is a nuclear option (creating the container in which everything goes) + * the only reason this will be ever used is the API user never submitted a + * container ID in which everything goes. The alternative was to let the + * vis not appear in the calling page at all. So now atleast vis appears but + * appended at the bottom of the body. + * */ + + if ($('#${visContainerID}').length === 0) { + $('
', { + 'id': '${visContainerID}' + }).appendTo('body'); + } + + if ($('#${sparklineContainerID}').length === 0) { + + $('
', { + 'id': '${sparklineContainerID}', + 'class': 'sparkline_style' + }).prependTo('#${visContainerID}'); -
-
- Publications per year (.CSV File) -
- Year - - Publications -
- ${year} - - ${sparklineVO.yearToActivityCount[year]} -
- Download data as .csv file. -
-

- - + var table = $(''); + table.attr('class', 'sparkline_wrapper_table'); + var row = $(''); + sparklineImgTD = $('
'); + sparklineImgTD.attr('id', '${sparklineContainerID}_img'); + sparklineImgTD.attr('width', '65'); + sparklineImgTD.attr('align', 'right'); + sparklineImgTD.attr('class', 'sparkline_style'); + + row.append(sparklineImgTD); + + var sparklineNumberTD = $(''); + sparklineNumberTD.attr('width', '30'); + sparklineNumberTD.attr('align', 'right'); + sparklineNumberTD.attr('class', 'sparkline_number'); + row.append(sparklineNumberTD); + var sparklineTextTD = $(''); + sparklineTextTD.attr('width', '450'); + sparklineTextTD.attr('class', 'sparkline_text'); + row.append(sparklineTextTD); + table.append(row); + table.prependTo('#${sparklineContainerID}'); + + } + + drawPubCountVisualization(sparklineImgTD); + }); + + + + <#if sparklineVO.shortVisMode> + <#----> +

View all VIVO publications and corresponding co-author network.

+ <#--
--> + <#else> + +

+ + + + + + + + + + + <#list sparklineVO.yearToActivityCount?keys as year> + + + + + + + +
+ Publications per year (.CSV File) +
+ Year + + Publications +
+ ${year} + + ${sparklineVO.yearToActivityCount[year]} +
+ Download data as .csv file. +
+

+ \ No newline at end of file diff --git a/themes/wilma/css/wilma.css b/themes/wilma/css/wilma.css index 91b06a5d..46dd78f6 100644 --- a/themes/wilma/css/wilma.css +++ b/themes/wilma/css/wilma.css @@ -97,7 +97,7 @@ ul#header-nav li { display: block; padding-left: 10px; padding-right: 10px; - border-right: 1px solid #fff; + border-right: 1px solid #7c7d7f; font-size: 0.7em; color: #fff; }