NIHVIVO-1315, NIHVIVO1316: Added ellipses to link "more" for showing more core:overview content

This commit is contained in:
mb863 2011-01-26 22:17:19 +00:00
parent e5a6ca4e9d
commit 7580db63e0
3 changed files with 10 additions and 7 deletions

View file

@ -3,6 +3,6 @@
$(document).ready(function(){
// "more"/"less" HTML truncator for showing more or less content in data property core:overview
$('.individual-overview').truncate({max_length: 500});
$('.overview-value').truncate({max_length: 500});
});

View file

@ -22,7 +22,7 @@
truncated_node.insertAfter(full_node);
findNodeForMore(truncated_node).append(' (<a href="#show more content">'+opts.more+'</a>)');
findNodeForMore(truncated_node).append(' (... <a href="#show more content">'+opts.more+'</a>)');
findNodeForLess(full_node).append(' (<a href="#show less content">'+opts.less+'</a>)');
truncated_node.find('a:last').click(function() {
@ -39,8 +39,8 @@
// length of 10 would truncate "1234567890" to "12 (…more)".
$.fn.truncate.defaults = {
max_length: 100,
more: '+',
less: '-'
more: 'more',
less: 'less'
};
function recursivelyTruncate(node, max_length) {

View file

@ -6,8 +6,11 @@
<#if overview?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<@p.addLinkWithLabel overview editable />
<#list overview.statements as statement>
<p class="individual-overview">${statement.value}</p>
<@p.editingLinks "${overview.localName}" statement editable />
<div class="individual-overview">
<div class="overview-value">
${statement.value}
</div>
<@p.editingLinks "${overview.localName}" statement editable />
</div>
</#list>
</#if>