media.js 701 B

12345678910111213141516171819202122232425262728
  1. //[custom Javascript]
  2. //Project: Riday Admin - Responsive Admin Template
  3. //Primary use: Riday Admin - Responsive Admin Template
  4. //should be included in all pages. It controls some layout
  5. +function ($) {
  6. 'use strict'
  7. // Click to select
  8. $(document).on('click', '.media[data-provide~="selectable"], .media-list[data-provide~="selectable"] .media:not(.media-list-header):not(.media-list-footer)', function(){
  9. var input = $(this).find('input');
  10. input.prop('checked', !input.prop("checked"));
  11. if ( input.prop("checked") ) {
  12. $(this).addClass('active');
  13. }
  14. else {
  15. $(this).removeClass('active');
  16. }
  17. });
  18. }(jQuery) // End of use strict