NIHVIVO-1315, NIHVIVO1316: Added ellipses to link "more" for showing more core:overview content
This commit is contained in:
parent
e5a6ca4e9d
commit
7580db63e0
3 changed files with 10 additions and 7 deletions
|
@ -3,6 +3,6 @@
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
// "more"/"less" HTML truncator for showing more or less content in data property core:overview
|
// "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});
|
||||||
|
|
||||||
});
|
});
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
truncated_node.insertAfter(full_node);
|
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>)');
|
findNodeForLess(full_node).append(' (<a href="#show less content">'+opts.less+'</a>)');
|
||||||
|
|
||||||
truncated_node.find('a:last').click(function() {
|
truncated_node.find('a:last').click(function() {
|
||||||
|
@ -39,8 +39,8 @@
|
||||||
// length of 10 would truncate "1234567890" to "12 (…more)".
|
// length of 10 would truncate "1234567890" to "12 (…more)".
|
||||||
$.fn.truncate.defaults = {
|
$.fn.truncate.defaults = {
|
||||||
max_length: 100,
|
max_length: 100,
|
||||||
more: '+',
|
more: 'more',
|
||||||
less: '-'
|
less: 'less'
|
||||||
};
|
};
|
||||||
|
|
||||||
function recursivelyTruncate(node, max_length) {
|
function recursivelyTruncate(node, max_length) {
|
||||||
|
|
|
@ -6,8 +6,11 @@
|
||||||
<#if overview?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
|
<#if overview?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
|
||||||
<@p.addLinkWithLabel overview editable />
|
<@p.addLinkWithLabel overview editable />
|
||||||
<#list overview.statements as statement>
|
<#list overview.statements as statement>
|
||||||
<p class="individual-overview">${statement.value}</p>
|
<div class="individual-overview">
|
||||||
|
<div class="overview-value">
|
||||||
<@p.editingLinks "${overview.localName}" statement editable />
|
${statement.value}
|
||||||
|
</div>
|
||||||
|
<@p.editingLinks "${overview.localName}" statement editable />
|
||||||
|
</div>
|
||||||
</#list>
|
</#list>
|
||||||
</#if>
|
</#if>
|
Loading…
Add table
Add a link
Reference in a new issue