Sha256: 2ca69ca7ba3693376377ef6b7874f8b5b216c650056f9f810d4420c2cbc4acfa

Contents?: true

Size: 1.78 KB

Versions: 5

Compression:

Stored size: 1.78 KB

Contents

I"(function() {
  var onDOMReady;

  onDOMReady = function() {
    $('.batch_actions_selector li a').click(function(e) {
      var message;
      e.stopPropagation();
      e.preventDefault();
      if (message = $(this).data('confirm')) {
        return ActiveAdmin.modal_dialog(message, $(this).data('inputs'), (function(_this) {
          return function(inputs) {
            return $(_this).trigger('confirm:complete', inputs);
          };
        })(this));
      } else {
        return $(this).trigger('confirm:complete');
      }
    });
    $('.batch_actions_selector li a').on('confirm:complete', function(e, inputs) {
      var val;
      if (val = JSON.stringify(inputs)) {
        $('#batch_action_inputs').removeAttr('disabled').val(val);
      } else {
        $('#batch_action_inputs').attr('disabled', 'disabled');
      }
      $('#batch_action').val($(this).data('action'));
      return $('#collection_selection').submit();
    });
    if ($(".batch_actions_selector").length && $(":checkbox.toggle_all").length) {
      if ($(".paginated_collection table.index_table").length) {
        $(".paginated_collection table.index_table").tableCheckboxToggler();
      } else {
        $(".paginated_collection").checkboxToggler();
      }
      return $(document).on('change', '.paginated_collection :checkbox', function() {
        if ($(".paginated_collection :checkbox:checked").length) {
          return $(".batch_actions_selector").each(function() {
            return $(this).aaDropdownMenu("enable");
          });
        } else {
          return $(".batch_actions_selector").each(function() {
            return $(this).aaDropdownMenu("disable");
          });
        }
      });
    }
  };

  $(document).ready(onDOMReady).on('page:load turbolinks:load', onDOMReady);

}).call(this);
:ET

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
active_admin-workflow-0.1.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/ve/ve37eKBu93AYRiA4HOP1fL9C8hIPwCCFJBTnd0d2Eig.cache
activeadmin_latlng-1.5.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/Ve/ve37eKBu93AYRiA4HOP1fL9C8hIPwCCFJBTnd0d2Eig.cache
activeadmin_latlng-1.4.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/Ve/ve37eKBu93AYRiA4HOP1fL9C8hIPwCCFJBTnd0d2Eig.cache
activeadmin_latlng-1.3.0 spec/dummy/tmp/cache/assets/sprockets/v3.0/Ve/ve37eKBu93AYRiA4HOP1fL9C8hIPwCCFJBTnd0d2Eig.cache
activeadmin_latlng-1.2.2 spec/dummy/tmp/cache/assets/sprockets/v3.0/Ve/ve37eKBu93AYRiA4HOP1fL9C8hIPwCCFJBTnd0d2Eig.cache