You are viewing limited content. For full access, please sign in.

Question

Question

How do you hide the entry properties and template information but retain the document links in Weblink 10?

asked on November 18, 2019 Show version history

I have looked into this a little bit and was able to use JavaScript to hide the entry properties with the following:

$(document).ready(function () {
 // try until row in table is found or 10 seconds have passed.
    var i = 1;
    function removeEntryPropertyLoop() {
        setTimeout(function () {
            // remove whole row containing the cell with the desired key.
            if ($('.mTitle[lflocalize=STR_MODIFIED]').length > 0) {
                $('.mTitle[lflocalize=STR_MODIFIED]').parent().parent().remove();
                $('.mTitle[lflocalize=STR_CREATED]').parent().parent().remove();
                $('.mTitle[lflocalize=STR_PATH]').parent().parent().remove();
   
 g                return; // exit loop
            }
            i++;
            if (i < 20) {
                removeEntryPropertyLoop();
            }
        }, 500);
    }
    removeEntryPropertyLoop();
});

But I'm having a hard time figuring out how to hide the template and fields. We want to display any linked documents, which is why we are not hiding the  entire metadata pane.

 

Any help is appreciated, thank you!

0 0

Replies

replied on December 9, 2019 Show version history

Hi Michelle, 
You could take advantage of the fact that you want to hide all the elements starting from template in the metadata pane and put the following within your timeout function:

var el = $('span[lflocalize=STR_TEMPLATE]').parent().parent();

while(el.length){
   el.hide();
   el = el.next();	
}

The while loop here will keep hiding the sibling elements of the 'Template' header inside the metadata pane.

In addition you probably don't want to quit retrying after 10 seconds since if user clicks on a new entry the metadata pane would get re-populated with the field information. You would want to keep checking metadata pane and clearing the elements. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.