Don't autoclose tag script "Updating posts" message
This commit is contained in:
@@ -552,14 +552,14 @@
|
|||||||
Danbooru.Post.notice_update = function(x) {
|
Danbooru.Post.notice_update = function(x) {
|
||||||
if (x === "inc") {
|
if (x === "inc") {
|
||||||
Danbooru.Post.pending_update_count += 1;
|
Danbooru.Post.pending_update_count += 1;
|
||||||
Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)...");
|
Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)...", true);
|
||||||
} else {
|
} else {
|
||||||
Danbooru.Post.pending_update_count -= 1;
|
Danbooru.Post.pending_update_count -= 1;
|
||||||
|
|
||||||
if (Danbooru.Post.pending_update_count < 1) {
|
if (Danbooru.Post.pending_update_count < 1) {
|
||||||
Danbooru.notice("Posts updated");
|
Danbooru.notice("Posts updated");
|
||||||
} else {
|
} else {
|
||||||
Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)...");
|
Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)...", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,13 @@
|
|||||||
$('html, body').animate({scrollTop: top}, 300, "linear", function() {Danbooru.scrolling = false;});
|
$('html, body').animate({scrollTop: top}, 300, "linear", function() {Danbooru.scrolling = false;});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.notice = function(msg) {
|
Danbooru.notice = function(msg, permanent) {
|
||||||
$('#notice').addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast").children("span").html(msg);
|
$('#notice').addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast").children("span").html(msg);
|
||||||
setTimeout(function() {
|
if (!permanent) {
|
||||||
$("#close-notice-link").click();
|
setTimeout(function() {
|
||||||
}, 6000);
|
$("#close-notice-link").click();
|
||||||
|
}, 6000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.error = function(msg) {
|
Danbooru.error = function(msg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user