Fix bug where clicking close on msg alert didn't remove progress bar
This commit is contained in:
		
							parent
							
								
									769d24b4b7
								
							
						
					
					
						commit
						2f9eccf931
					
				@ -3,9 +3,8 @@
 | 
				
			|||||||
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 | 
					 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).ready(function () {
 | 
					$(document).ready(function () {
 | 
				
			||||||
    /* Fade out alerts */
 | 
					    $("#msg-alert-box").on("click", ".close", function (e) {
 | 
				
			||||||
    $(".alert .close").click(function (e) {
 | 
					        $("#msg-alert-box").fadeOut("slow");
 | 
				
			||||||
        $(this).parent().fadeOut("slow");
 | 
					 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ($("#msg-alert-box").length) {
 | 
					    if ($("#msg-alert-box").length) {
 | 
				
			||||||
@ -41,15 +40,15 @@ $(document).ready(function () {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (msginteractiontick < fifty) {
 | 
					            if (msginteractiontick < fifty) {
 | 
				
			||||||
                $("#msg-alert-box .alert").css("opacity", "1");
 | 
					                $("#msg-alert-box").css("opacity", "1");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (msginteractiontick == fifty) {
 | 
					            if (msginteractiontick == fifty) {
 | 
				
			||||||
                $("#msg-alert-box .alert").fadeTo(1000, 0.5);
 | 
					                $("#msg-alert-box").fadeTo(1000, 0.5);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (msginteractiontick >= gone) {
 | 
					            if (msginteractiontick >= gone) {
 | 
				
			||||||
                setTimeout(function () {
 | 
					                setTimeout(function () {
 | 
				
			||||||
                    if (msginteractiontick >= gone) {
 | 
					                    if (msginteractiontick >= gone) {
 | 
				
			||||||
                        $("#msg-alert-box .alert").fadeOut("slow");
 | 
					                        $("#msg-alert-box").fadeOut("slow");
 | 
				
			||||||
                        window.clearInterval(msgticker);
 | 
					                        window.clearInterval(msgticker);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }, 1000);
 | 
					                }, 1000);
 | 
				
			||||||
@ -57,7 +56,7 @@ $(document).ready(function () {
 | 
				
			|||||||
        }, 1000 * 1);
 | 
					        }, 1000 * 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $("#msg-alert-box").on("mouseenter", function () {
 | 
					        $("#msg-alert-box").on("mouseenter", function () {
 | 
				
			||||||
            $("#msg-alert-box .alert").css("opacity", "1");
 | 
					            $("#msg-alert-box").css("opacity", "1");
 | 
				
			||||||
            msginteractiontick = 0;
 | 
					            msginteractiontick = 0;
 | 
				
			||||||
            console.log("👈😎👈 zoop");
 | 
					            console.log("👈😎👈 zoop");
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user