Skip to content

Commit

Permalink
Few minor code clean up edits for desc truncation [ref #6685]
Browse files Browse the repository at this point in the history
  • Loading branch information
mheppler committed Mar 2, 2021
1 parent d46f6a7 commit e3e5cbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/main/java/propertyFiles/Bundle.properties
Expand Up @@ -61,8 +61,6 @@ delete=Delete
copyClipboard=Copy to Clipboard
truncateMoreBtn=Read More
truncateMoreTip=Click to read the full
truncateLessBtn=Read Less
truncateLessTip=Click to collapse the
yes=Yes
no=No
previous=Previous
Expand Down
6 changes: 4 additions & 2 deletions src/main/webapp/dataset.xhtml
Expand Up @@ -1656,8 +1656,10 @@
$(document).ready(function () {
popoverHTML('#{bundle.htmlAllowedTitle}', '#{bundle.htmlAllowedTags}');

// TO-DO MAKE DYNAMIC
contentTruncate('dsDescription', 'Description', '#{bundle.truncateMoreBtn}', '#{bundle.truncateMoreTip}', '#{bundle.truncateLessBtn}', '#{bundle.truncateLessTip}');
// truncate summary description, contentTruncate function in dv_rebind_bootstrap_ui.js
var = 'dsDescription'
var descLabel = $('#' + descId + ' th').text();
contentTruncate(descId, descLabel, '#{bundle.truncateMoreBtn}', '#{bundle.truncateMoreTip}');
});
function openDialog() {
PF('details').show();
Expand Down
10 changes: 2 additions & 8 deletions src/main/webapp/resources/js/dv_rebind_bootstrap_ui.js
Expand Up @@ -23,9 +23,6 @@ function bind_bsui_components(){
$('.bootstrap-button-tooltip, [data-toggle="tooltip"]').tooltip("hide");
$("[data-toggle='popover']").popover("hide");

// Truncate content
contentTruncate();

// Truncate checksums
checksumTruncate();

Expand Down Expand Up @@ -162,13 +159,10 @@ function sharrre(){
}

/*
* Truncate any metadata content
* Truncate dataset description content
*/
function contentTruncate(truncSelector, truncMetaLabel, truncMoreBtn, truncMoreTip, truncLessBtn, truncLessTip){

// I MADE IT MYSELF...
function contentTruncate(truncSelector, truncMetaLabel, truncMoreBtn, truncMoreTip){

// WHAT ARE WE TRUNCATING
// SELECTOR ID FROM PARAMETERS
$('#' + truncSelector + ' td div').each(function () {

Expand Down

0 comments on commit e3e5cbe

Please sign in to comment.