Sha256: b299b2244f4181be80f7c8b5a9c44f8b7a4d0a3626bf98567802b989addb3941
Contents?: true
Size: 899 Bytes
Versions: 26
Compression:
Stored size: 899 Bytes
Contents
window.Alchemy = {} if typeof(window.Alchemy) is 'undefined' Alchemy.Buttons = observe: (scope) -> $('form', scope).not('.button_with_label form').on 'submit', (event) -> $btn = $(this).find(':submit') if $btn.attr('disabled') == 'disabled' event.preventDefault() event.stopPropagation() false else Alchemy.Buttons.disable($btn) disable: (button) -> $button = $(button) spinner = Alchemy.Spinner.small() $button.data('content', $button.html()) $button.attr('disabled', true) $button.addClass('disabled') $button.css width: $button.outerWidth() $button.empty() spinner.spin($button[0]) return true enable: (scope) -> $button = $('form :submit:disabled', scope) $button.removeClass('disabled') $button.removeAttr('disabled') $button.html($button.data('content')) return true
Version data entries
26 entries across 26 versions & 2 rubygems