Left Menu Right Menu
June 5, 2017

Add hide/show Summit libraries button

Created by:  Mike Flakus, Portland State University

Description: In the detailed record view all partner library holdings are shown, which makes the lower parts of the view more difficult to read. This customizations hides this section of the view and creates a button to toggle between hiding and showing the section.

System components: Package Manager/PBO, JS, CSS

Skill set requirements: PBO, JS, CSS

Implementation steps:
  1. Ensure you have turned on inheritance from the Central Package, see documentation: Turn on inheritance from the Central Package
  2. Download your local package from PBO and unzip as described in our documentation: Make changes in your local package
  3. Open the file custom.js with your text-editor (e.g., Notepad++) and add the following code at the end of the file after the final })();



  4. You can customize the initial state (hidden/shown) and the text of the buttons by using the following code instead:

    'default_state': 'visible',
    'show_libraries_button_label': 'SHOW',
    'hide_libraries_button_label': 'HIDE'

  5. For ‘default_state’ set the parameter to ‘visible’ to show the libraries initially or ‘hidden’ to hide the libraries initially.
  6. For ‘show_libraries_button_label’ and ‘hide_libraries_button_label’ set to any text to show on the button.
  7. The button has the CSS class hide_show_other_institutions_button you can reference to style the button as needed.
  8. Zip and upload your local package

Related customizations:
Back to Blog
Comments (0)
Reply To Article