Related product I-Share

Collapse Get It from Primo VE Other Institutions Section

Back to the Primo VE Customization Package: Shared CSS and JavaScript Solutions page

December 17, 2020

Objective: Collapse the potentially long list of I-Share institutions with holdings in the "Get It From Other Institutions" section of the full record display.  By default, the list of I-Share institutions is expanded in Primo VE.  When collapsed with this JavaScript code, users must click on the blue arrow to expand the list.

Before After
pveGetItExpanded.png pveGetItCollapsed.png

How to accomplish this: The solution requires the following custom JavaScript code be added to the /VIEW_CODE/js/custom.js file:

/* Collapse "Get It From Other Institutions" dropdown by default in full record display. */
 
app.component("prmAlmaOtherMembersAfter", {
  bindings: {
    parentCtrl: "<",
  },
  controller: [
    function () {
      var ctrl = this;
      ctrl.parentCtrl.isCollapsed = true;
    },
  ],
}); 

Download a text file with this custom JavaScript code for easy copying and pasting into your local custom.js file.

 

Special thanks to UIC for contributing to this solution.