Sha256: 3b2fa5511710847749d99602d1742de171b2b6a059c487720051c49a25353df2

Contents?: true

Size: 717 Bytes

Versions: 3

Compression:

Stored size: 717 Bytes

Contents

var general = general || {
  init: function() {
    $('form:not(.no-focus) input:visible:not(.no-focus):first').focus();
    $('[data-toggle="tooltip"]').tooltip();
    $('[href="#lity-close"]').on('click', this.lity_close_click_listener);
    this.bind_remote_content_for_bootstrap_modals();
  },

  bind_remote_content_for_bootstrap_modals: function() {
    $('[data-toggle="modal"]').on('click', function() {
      var anchor = $(this);
      $(anchor.data('target') + ' .modal-body').load(anchor.data('remote'));
    });
  },

  lity_close_click_listener: function(e) {
    e.preventDefault();
    $(parent.window.document).find('[data-lity-close=""]').trigger('click');
  }
};

$(function(){ general.init(); });

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
udongo-7.9.0 app/assets/javascripts/backend/general.js
udongo-7.8.1 app/assets/javascripts/backend/general.js
udongo-7.8.0 app/assets/javascripts/backend/general.js