Sha256: 84d1941a7f16712156958dfe01a32058a7e2e0f7eeeba9ea5d8f8bfdd8bd65cb

Contents?: true

Size: 733 Bytes

Versions: 12

Compression:

Stored size: 733 Bytes

Contents

(function() {
  window.Glow = {
    flash: function(type, message) {
      return $(document).trigger('glow:flash', {
        type: type,
        message: message
      });
    }
  };
  $(document).ajaxComplete(function(evt, xhr, options) {
    var message, type;
    if (type = xhr.getResponseHeader('X-Message-Type') && (message = xhr.getResponseHeader('X-Message'))) {
      return Glow.flash(type, message);
    }
  });
  window.Flash = {
    fire: Glow.flash,
    success: function(message) {
      return Glow.flash('success', message);
    },
    notice: function(message) {
      return Glow.flash('notice', message);
    },
    error: function(message) {
      return Glow.flash('error', message);
    }
  };
}).call(this);

Version data entries

12 entries across 10 versions & 1 rubygems

Version Path
glow-0.0.10 test/rails3/public/javascripts/glow.js
glow-0.0.9 test/rails3/public/javascripts/glow.js
glow-0.0.8 test/rails3/public/javascripts/glow.js
glow-0.0.7 test/rails3/public/javascripts/glow.js
glow-0.0.7 vendor/assets/javascripts/glow.js
glow-0.0.6 vendor/assets/javascripts/glow.js
glow-0.0.6 test/rails3/public/javascripts/glow.js
glow-0.0.5 test/rails3/public/javascripts/glow.js
glow-0.0.4 test/rails3/public/javascripts/glow.js
glow-0.0.3 test/rails3/public/javascripts/glow.js
glow-0.0.2 test/dummy/public/javascripts/glow.js
glow-0.0.1 test/dummy/public/javascripts/glow.js