Changeset 7343

Show
Ignore:
Timestamp:
03/04/09 15:05:32 (17 months ago)
Author:
josowski
Message:

Minor changes related to the article page redesign

References #1115

Location:
head/ambra/webapp/src/main/webapp
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • head/ambra/webapp/src/main/webapp/article/article_comments.ftl

    r7339 r7343  
    5252        <ul> 
    5353        <#if corrections == true> 
    54           <li><a href="${commentsURL}" title="View all corrections" class="discuss icon">View all Comments</a></li> 
     54          <li><a href="${commentsURL}" title="View all Comments" class="discuss icon">View all Comments</a></li> 
    5555        <#else> 
     56          <#if ((numFormalCorrections + numMinorCorrections) > 0)> 
    5657          <li><a href="${correctionsURL}" title="View all corrections" class="corrections icon">View all corrections</a></li> 
     58          </#if> 
    5759        </#if> 
    5860          <li><a href="${startDiscussionUrl}" title="Click to make a new comment on this article" class="discuss icon">Make a new comment on this article</a></li> 
  • head/ambra/webapp/src/main/webapp/article/article_related.ftl

    r7339 r7343  
    4545 
    4646      <h3>Related Articles on the web <img id="relatedArticlesSpinner" src="../../images/loading.gif" height="20" width="20" class="loading" /></h3> 
     47      <div id="pubMedRelatedErr" style="display:none;"></div> 
    4748      <ul> 
    4849        <li><a href="http://scholar.google.com/scholar?hl=en&lr=&q=related:${docURL?url}&btnG=Search">Google Scholar</a></li> 
  • head/ambra/webapp/src/main/webapp/javascript/init_related.js

    r7318 r7343  
    2222dojo.addOnLoad(function() 
    2323  { 
     24    //TODO: Move this server setting to a configuration file 
    2425    var almService = new ambra.alm('alm-dev.plos.org'); 
    2526    var doi = escape(dojo.byId('doi').value); 
     
    3637{ 
    3738  dojo.fadeOut({ node:'relatedArticlesSpinner', duration: 1000 }).play(); 
    38  
     39   
    3940  if(response == null) 
    4041  { 
    41     setError('relatedArticlesSpinner'); 
     42    setError('pubMedRelatedErr'); 
    4243    return; 
    4344  } 
     
    5455function setCites(response, args) 
    5556{ 
     57  dojo.byId('relatedCites').style.display = 'none'; 
    5658  dojo.fadeOut({ node:'relatedCitesSpinner', duration: 1000 }).play(); 
    57   dojo.byId('relatedCites').style.display = 'none'; 
    5859 
    5960  if(response == null) 
    6061  { 
    61     setError('relatedCitesSpinner'); 
     62    setError('relatedCites'); 
    6263    return; 
    6364  } 
     
    8485  var html = ""; 
    8586 
     87  dojo.byId('relatedBlogPosts').style.display = 'none'; 
    8688  dojo.fadeOut({ node:'relatedBlogSpinner', duration: 1000 }).play(); 
    87   dojo.byId('relatedBlogPosts').style.display = 'none'; 
    8889 
    8990  if(response == null) 
    9091  { 
    91     setError('relatedBlogSpinner'); 
     92    setError('relatedBlogPosts'); 
    9293    return; 
    9394  } 
     
    110111} 
    111112 
    112 function setError(id) 
     113function setError(textID) 
    113114{ 
    114   dojo.byId(id).src = 'broken.jpg'; 
    115   dojo.byId(id).title = 'An error occured requesting the'; 
     115  dojo.byId(textID).innerHTML = '<span class="inlineError"><img src="../../images/icon_error.gif"/>&nbsp;Unable to retrieve this data at this time.</span>'; 
     116  dojo.fx.wipeIn({ node:textID, duration: 1000 }).play(); 
    116117}