From f0efc698b0451ca7ef8cce36840f45a2a0fd8f6f Mon Sep 17 00:00:00 2001 From: oliveira131 <47257731+oliveira131@users.noreply.github.com> Date: Mon, 22 Jul 2019 13:27:31 -0300 Subject: [PATCH] Update toast.min.js --- dist/toast.min.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dist/toast.min.js b/dist/toast.min.js index 96838c7..cfc9ec4 100644 --- a/dist/toast.min.js +++ b/dist/toast.min.js @@ -1,9 +1,10 @@ /** * @author Script47 (https://github.com/Script47/Toast) * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component - * @version 0.7.1 + * @version 0.8.0 **/ - (function(c){c.toast=function(b){var d=c("body");b.container&&1===b.container.length&&(d=b.container);d.children(".toast-container").length||(d.prepend('
'),d.children(".toast-container").append('
'),d.on("hidden.bs.toast",".toast",function(){c(this).remove()}));d=d.children(".toast-container").children(".toast-wrapper");var k="toast-"+(c(".toast").length+1),a="",f=a="",g="text-muted",h="",r=b.title|| - "Notice!",t=b.subtitle||"",q=b.content||"",l=b.delay||-1,e=b.img,m=b.pause_on_hover||!1,n=!1,p="";switch(b.type||"info"){case "info":a="bg-info";h=g=f="text-white";break;case "success":a="bg-success";h=g=f="text-white";break;case "warning":case "warn":a="bg-warning";h=g=f="text-white";break;case "error":case "danger":a="bg-danger",h=g=f="text-white"}!1!==m?(b=Math.floor(Date.now()/1E3)+l/1E3,p='data-autohide="false"',m='data-hide-timestamp="'+b+'"'):p=-1===l?'data-autohide="false"':'data-delay="'+ - l+'"';a='";d.append(a);d.find(".toast:last").toast("show");!1!==m&&(setTimeout(function(){n||c("#"+k).toast("hide")},l),c(document).on("mouseover","#"+k,function(){n=!0}),c(document).on("mouseleave","#"+k,function(){var a=Math.floor(Date.now()/1E3),b=parseInt(c(this).data("hide-timestamp"));n=!1;a>=b&&c(this).toast("hide")}))}})(jQuery); + (function(g){g.toast=function(b){var c=g("body");b.container&&1===b.container.length&&(c=b.container);c.children(".toast-container").length||(c.prepend('
'),c.children(".toast-container").append('
'),c.on("hidden.bs.toast",".toast",function(){g(this).remove()}));c=c.children(".toast-container").children(".toast-wrapper");var k="toast-"+(g(".toast").length+1),a="",d=a="",e="text-muted",f="",t=b.title|| +"Notice!",u=b.subtitle||"",r=b.content||"",l=b.delay||-1,h=b.img,m=b.ico,n=b.pause_on_hover||!1,p=!1,v=b.prepend,q="";switch(b.type||"info"){case "info":a="bg-info";f=e=d="text-white";break;case "success":a="bg-success";f=e=d="text-white";break;case "warning":case "warn":a="bg-warning";f=e=d="text-white";break;case "error":case "danger":a="bg-danger";f=e=d="text-white";break;case "dark":a="bg-dark";f=e=d="text-white";break;case "primary":a="bg-primary";f=e=d="text-white";break;case "secondary":a= +"bg-secondary";f=e=d="text-white";break;case "light":a="bg-light";f=e=d="";break;case "white":a="bg-white";f=e=d="text-dark";break;case "transparent":a="bg-transparent",f=e=d=""}!1!==n?(b=Math.floor(Date.now()/1E3)+l/1E3,q='data-autohide="false"',n='data-hide-timestamp="'+b+'"'):q=-1===l?'data-autohide="false"':'data-delay="'+l+'"';a='";!0===v?(c.prepend(a),c.find(".toast:first").toast("show")):(c.append(a),c.find(".toast:last").toast("show"));!1!==n&&(setTimeout(function(){p||g("#"+k).toast("hide")},l),g(document).on("mouseover","#"+k,function(){p=!0}),g(document).on("mouseleave","#"+k,function(){var a=Math.floor(Date.now()/1E3),b=parseInt(g(this).data("hide-timestamp"));p=!1;a>=b&&g(this).toast("hide")}))}})(jQuery);