Sha256: 0e9a4018b8138241f6cb8d827f2134c9c4159daf392a7ac16e3698d1647c0bc9

Contents?: true

Size: 1.97 KB

Versions: 4

Compression:

Stored size: 1.97 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1364984302.8734798:@value"t{I"
class:EFI"ProcessedAsset;FI"logical_path;FI"+locomotive/form_submit_notification.js;TI"
pathname;FI"n/Users/papipo/Projects/locomotive/engine/vendor/assets/javascripts/locomotive/form_submit_notification.js;TI"content_type;FI"application/javascript;FI"
mtime;FI"2013-04-03T11:01:13+02:00;FI"length;FiúI"digest;F"%ae00989b02bbd05d61d8f07f703659f5I"source;FI"ú/**
 * Version 0.0.1
 * Display a message letting the user know the form is being submitted
 * Didier Lafforgue
 */

$.fn.formSubmitNotification = function(settings) {

  function show() {
    $('#form-submit-notification').fadeIn()
  }

  function hide() {
    $('#form-submit-notification').fadeOut()
  }

  function create(message) {
    if ($('#form-submit-notification').size() == 0) {
      var element = $("<div id=\"form-submit-notification\"><div>" + message + "</div></div>").hide();
      $('body').append(element);
    }
  }

  return this.each(function() {
    var form    = $(this);
    var message = form.data('sending-form-message') || form.data('sending_form_message');

    if (typeof(message) == 'undefined')
      message = form.find('input[type=submit]').data('sending-form-message');

    if (typeof(message) == 'undefined')
      return ;

    create(message);

    form.bind('ajax:beforeSend', function(event) { show() });
    form.bind('ajax:complete', function(event) { hide() });

  });
}
;
;FI"dependency_digest;F"%a0d87ecd02e47f041caf73256120c6e2I"required_paths;F[I"n/Users/papipo/Projects/locomotive/engine/vendor/assets/javascripts/locomotive/form_submit_notification.js;TI"dependency_paths;F[{I"	path;FI"n/Users/papipo/Projects/locomotive/engine/vendor/assets/javascripts/locomotive/form_submit_notification.js;TI"
mtime;FI"2013-04-03T11:01:13+02:00;FI"digest;F"%c5c986e3ea588e769f74144368b0dcfaI"
_version;F"%6776f581a4329e299531e1d52aa59832

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
locomotivecms-search-0.0.5 spec/dummy/tmp/cache/assets/D12/FF0/sprockets%2F211db8c47e0494a0e5979e52dcdd1772
locomotivecms-search-0.0.4 spec/dummy/tmp/cache/assets/D12/FF0/sprockets%2F211db8c47e0494a0e5979e52dcdd1772
locomotivecms-search-0.0.3 spec/dummy/tmp/cache/assets/D12/FF0/sprockets%2F211db8c47e0494a0e5979e52dcdd1772
locomotivecms-search-0.0.2 spec/dummy/tmp/cache/assets/D12/FF0/sprockets%2F211db8c47e0494a0e5979e52dcdd1772