Sha256: 3d3ddafe4ea0e45b24c4efd989c557eb14676859c3c7f5382568c4117d5efd4d

Contents?: true

Size: 1.04 KB

Versions: 34

Compression:

Stored size: 1.04 KB

Contents

$(document).on('click', '.export-to-file-btn', function(e) {
  e.preventDefault();
  var query_param = window.location.href.split("?")[1]
  var action = $('#export-to-file-form').get(0).getAttribute('action')
  $('#export-to-file-form').get(0).setAttribute('action', action + '?' + query_param);
  $("#export-to-file-form").submit();
});

$(document).on(
  "click",
  '[data-behaviour="export-select-all"]',
  function (e) {
    if($(this).is(':checked')){
      $('[data-behaviour="export-checkbox"]').prop('checked', true)
      
    } else {
      $('[data-behaviour="export-checkbox"]').prop('checked', false)
    }
  }
);

$(document).on(
  "click",
  '[data-behaviour="export-checkbox"]',
  function (e) {
    const container = $(this).closest('.row');
    if (container.find('[data-behaviour="export-checkbox"]:checked').length == container.find('[data-behaviour="export-checkbox"]').length) {
      $('[data-behaviour="export-select-all"]').prop('checked', true);
    } else {
      $('[data-behaviour="export-select-all"]').prop('checked', false);
    }
  }
);

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
cm-admin-4.0.0 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.16 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.15 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.14 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.13 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.12 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.11 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.10 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.9 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.8 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.7 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.6 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.5 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.4 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.3 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.2 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.1 app/assets/javascripts/cm_admin/exports.js
cm-admin-3.0.0 app/assets/javascripts/cm_admin/exports.js
cm-admin-2.4.6 app/assets/javascripts/cm_admin/exports.js
cm-admin-2.4.5 app/assets/javascripts/cm_admin/exports.js