Sha256: b1849f708cdebfd73e14469652851c48ef5b251421dfa593729093000e0334ab

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

//= require 'toastr'

//toastr
toastr.options = {
  "closeButton": true,
  "debug": false,
  "progressBar": true,
  "positionClass": "toast-top-right",
  "showDuration": "300",
  "hideDuration": "1000",
  "timeOut": "5000",
  "extendedTimeOut": "1000",
  "showEasing": "swing",
  "hideEasing": "linear",
  "showMethod": "fadeIn",
  "hideMethod": "fadeOut"
};

var showToast = function(flash){
  for(var i = 0; i < flash.length; i++ ){
    var msg = flash[i];
    var type = {
      notice: 'success',
      alert: 'error',
      warning: 'warning',
      info: 'info'
    };
    toastr[type[msg[0]]](msg[1]);
  }
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toastr_rails-2.1.0.2 app/assets/javascript/toastr_rails.js
toastr_rails-2.1.0.1 app/assets/javascript/toastr_rails.js