Author: fdesbois Date: 2010-06-15 19:57:36 +0000 (Tue, 15 Jun 2010) New Revision: 536 Log: Evo #2333 : use anchor from FCKEditor to detect where the text need to be crop Modified: trunk/wao-ui/src/main/webapp/css/news.css trunk/wao-ui/src/main/webapp/js/wao.js Modified: trunk/wao-ui/src/main/webapp/css/news.css =================================================================== --- trunk/wao-ui/src/main/webapp/css/news.css 2010-06-15 19:54:07 UTC (rev 535) +++ trunk/wao-ui/src/main/webapp/css/news.css 2010-06-15 19:57:36 UTC (rev 536) @@ -66,7 +66,7 @@ } div#so-news div.news-item div.news-content a.news-details-link { - color: blue; + color: #133852; text-decoration: underline; cursor: pointer; } Modified: trunk/wao-ui/src/main/webapp/js/wao.js =================================================================== --- trunk/wao-ui/src/main/webapp/js/wao.js 2010-06-15 19:54:07 UTC (rev 535) +++ trunk/wao-ui/src/main/webapp/js/wao.js 2010-06-15 19:57:36 UTC (rev 536) @@ -125,23 +125,23 @@ // Tapestry.debug('find anchor : ' + anchor); // Prepare the hidden block - var moreContent = document.createElement('div'); - moreContent.id = 'news-details-content-' + j; - moreContent.addClassName('hidden'); + var detailsContent = document.createElement('div'); + detailsContent.id = 'news-details-content-' + j; + detailsContent.addClassName('hidden'); // Update params of the anchor to be clickable anchor.update('Lire la suite...'); anchor.addClassName('news-details-link'); - anchor.writeAttribute('onClick', 'toggleNewsDetails("' + moreContent.id + '")'); + anchor.writeAttribute('onClick', 'toggleNewsDetails("' + detailsContent.id + '")'); - // Retrieve siblings paragraphs to wrap them into the hidden moreContent + // Retrieve siblings paragraphs to wrap them into the hidden detailsContent var otherParagraphs = paragraph.nextSiblings(); for (k = 0; k < otherParagraphs.length; k++) { - moreContent.appendChild(otherParagraphs[k]); + detailsContent.appendChild(otherParagraphs[k]); } // append the hidden block to the news - news.appendChild(moreContent); + news.appendChild(detailsContent); break; } }