Sha256: 85c3d82dfc57bf2c4a9aafaabd08caa405e545824aa74a6b40763128777650ec
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 KB
Contents
$(document).foundation({ reveal: { animation: 'none' , animation_speed: 0, close_on_background_click: false, close_on_esc: true, dismiss_modal_class: "reveal-modal-close" } }); // Honour any html autofocus attributes on inputs inside a modal dialog $(document).on('opened.fndtn.reveal', '[data-reveal]', function () { var modal = $(this); modal.find('[autofocus]').focus(); $('form[data-client-side-validations]').enableClientSideValidations(); $('.searchable_select', modal).select2(); // If a modal is launched again, ensure the submit button is re-enabled. if ($('input[data-disable-with]').length > 0) { Rails.enableElement($('input[data-disable-with]')[0]); }; // Refresh layout of foundation widgets $(document).foundation('reflow'); var resizeSelect2DropDownsToFitModal = function(){ $('.select2', modal).css('width', "100%"); }; }); // If there was an error submitting a modal form, be sure to re-enable the submit button $(document).on('ajax:error', function(event) { Rails.enableElement($('input[data-disable-with]')[0]); });
Version data entries
11 entries across 11 versions & 1 rubygems