/** * Created by Benny on 29.03.2016. */ var app = app || {}; app.gui = app.gui || {}; app.gui.Toast = (function() { var TYPE_SUCCESS = "success", TYPE_ERROR = "error", TYPE_WARN = "warning", TYPE_INFO = "info"; /** * * @param string msg * @param int type */ function show( msg, type ) { var t = type || TYPE_SUCCESS; toastr[ type ]( msg ); } toastr.options = { "closeButton": true, "debug": false, "progressBar": true, "preventDuplicates": false, "positionClass": "toast-top-right", "onclick": null, "showDuration": "400", "hideDuration": "1000", "timeOut": "7000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" }; return { TYPE_SUCCESS : TYPE_SUCCESS, TYPE_ERROR : TYPE_ERROR, TYPE_WARN : TYPE_WARN, TYPE_INFO : TYPE_INFO, show : show } }());