Sha256: 0b8efec2e7c34075062537212304f244102971d0f86af9ee81b40fb39fcd7a2a

Contents?: true

Size: 533 Bytes

Versions: 11

Compression:

Stored size: 533 Bytes

Contents

Blacklight.onLoad(function() {
  function toggle_icon(itag){
	 itag.toggleClass("caret");
	 itag.toggleClass("caret up");
  }

  $(".sorts").on("click", function(){
    var itag =$(this).find('i');
    toggle_icon(itag);
    sort = itag.attr('class') == "caret" ? itag.attr('id') + ' desc' :  itag.attr('id');
    // There is more than one input named sort on the page, so qualifiy with the form class:
    $('.form-search input[name="sort"]').attr('value', sort);
    $("#user_submit").click();
  });
}); //end of Blacklight.onload

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/assets/javascripts/hyrax/sorting.js
hyrax-5.0.0 app/assets/javascripts/hyrax/sorting.js
hyrax-5.0.0.rc3 app/assets/javascripts/hyrax/sorting.js
hyrax-5.0.0.rc2 app/assets/javascripts/hyrax/sorting.js
hyrax-5.0.0.rc1 app/assets/javascripts/hyrax/sorting.js
hyrax-4.0.0 app/assets/javascripts/hyrax/sorting.js
hyrax-4.0.0.rc3 app/assets/javascripts/hyrax/sorting.js
hyrax-4.0.0.rc2 app/assets/javascripts/hyrax/sorting.js
hyrax-4.0.0.rc1 app/assets/javascripts/hyrax/sorting.js
hyrax-4.0.0.beta2 app/assets/javascripts/hyrax/sorting.js
hyrax-4.0.0.beta1 app/assets/javascripts/hyrax/sorting.js