Sha256: 3489762b390cb796f4238eadee18404776c672bef9f73dff38a6eb325617153f

Contents?: true

Size: 651 Bytes

Versions: 9

Compression:

Stored size: 651 Bytes

Contents

export default class {
  connect(){
    var container, target;

    function init() {
      const target_val = container.attr('data-target')
      if (!target_val) 
        return

      target = $("#" + target_val); 
      container.on('click', open);
      target.find('[data-behavior="cancel-link"]').on('click', close);
    }

    function open(event) {
      event.preventDefault();
      target.slideToggle('slow');
    }

    function close(event) {
      event.preventDefault();
      target.slideUp('fast');
    }

    return $('[data-behavior="contact-link"]').each(function() {        
      container = $(this);
      init();
    });
  }
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-3.6.0.beta10 app/javascript/spotlight/user/report_a_problem.js
blacklight-spotlight-3.6.0.beta9 app/javascript/spotlight/user/report_a_problem.js
blacklight-spotlight-3.6.0.beta8 app/javascript/spotlight/user/report_a_problem.js
blacklight-spotlight-3.6.0.beta7 app/javascript/spotlight/user/report_a_problem.js
blacklight-spotlight-3.6.0.beta6 app/javascript/spotlight/user/report_a_problem.js
blacklight-spotlight-3.6.0.beta5 app/javascript/spotlight/user/report_a_problem.js
blacklight-spotlight-3.6.0.beta4 app/javascript/spotlight/user/report_a_problem.es6
blacklight-spotlight-3.6.0.beta3 app/javascript/spotlight/user/report_a_problem.es6
blacklight-spotlight-3.6.0.beta1 app/javascript/spotlight/user/report_a_problem.es6