Sha256: f8d807db5e94ea758d43d22924fe1dbc722af3954ea223bc44e80d862ce7d7bf

Contents?: true

Size: 481 Bytes

Versions: 65

Compression:

Stored size: 481 Bytes

Contents

export default class SortAndPerPage {
  /**
   * Initializes the class in the context of an individual select element,
   * and bind its change event to submit the form it is contained within.
   * @param {jQuery} element the select element that this class represents
   */
  constructor(element) {
      this.form = element.parents('form')[0];

      // submit the form to cause the page to render
      element.on('change', (e) => {
          this.form.submit();
      });
  }
}

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.4 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.3 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.2 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.1 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.0 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.0.rc3 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.0.rc2 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-5.0.0.rc1 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-3.6.0 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-4.0.0 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-4.0.0.rc3 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-4.0.0.rc2 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-4.0.0.rc1 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-3.5.0 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-4.0.0.beta2 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-3.4.2 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-4.0.0.beta1 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-3.4.1 app/assets/javascripts/hyrax/sort_and_per_page.es6
hyrax-3.4.0 app/assets/javascripts/hyrax/sort_and_per_page.es6