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

Revised: November 7, 2022 due to Primo VE upgrade to Angular 1.8

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: Please review the steps for working with the customization package and its files on the main Shared CSS and JavaScript Solutions page.  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;
 
      this.$onInit = function(){
        {
          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.