From 4234c60a55e81f17653b3ea9b39a8d74691491f0 Mon Sep 17 00:00:00 2001 From: tworrall Date: Thu, 21 Feb 2013 15:08:23 -0500 Subject: [PATCH] ensure proper styling of webpage thumbnails --- productMods/js/individual/individualUtils.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/productMods/js/individual/individualUtils.js b/productMods/js/individual/individualUtils.js index 17c9f371..ae72bb05 100644 --- a/productMods/js/individual/individualUtils.js +++ b/productMods/js/individual/individualUtils.js @@ -1,13 +1,16 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ $(document).ready(function(){ - + // ensures proper layout when an organization has its webpage link displayed as a thumnail. - if ( $('ul.webpages-withThumnails').length > 0 ) { + // there's a timing issue, so we can't check the length here, so check the role just to see + // if $('ul.webpages-withThumnails') exists + if ( $('ul.webpages-withThumbnails').children('li').length > 0 ) { $('div.individual-overview').css("float","left"); $('div#activeGrantsLink').css("margin-top","30px"); $('section#individual-info').children('h2#overview').css("clear","both"); } + // "more"/"less" HTML truncator for showing more or less content in data property core:overview $('.overview-value').truncate({max_length: 500}); @@ -140,5 +143,5 @@ $(document).ready(function(){ if ( $('div#webpagesContainer').length ) { $('div#webpagesContainer').css('width', '100%').css('clear','both'); } - } + } });