Merge pull request #350 from pi-hole/tweak/querylogbuttonserrormessage

Add more detailed error output recently added to the lists page to the query log action buttons
This commit is contained in:
Mcat12
2017-01-10 18:01:19 -05:00
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -108,6 +108,7 @@ function add() {
},
error: function(jqXHR, exception) {
alFailure.show();
err.html("");
alFailure.delay(1000).fadeOut(2000, function() {
alFailure.hide();
});

View File

@@ -22,6 +22,7 @@ function add(domain,list) {
alDomain.html(domain);
var alSuccess = $("#alSuccess");
var alFailure = $("#alFailure");
var err = $("#err");
if(list === "white")
{
@@ -43,7 +44,8 @@ function add(domain,list) {
if (response.indexOf("not a valid argument") >= 0 || response.indexOf("is not a valid domain") >= 0)
{
alFailure.show();
alFailure.delay(1000).fadeOut(2000, function() { alFailure.hide(); });
err.html(response);
alFailure.delay(4000).fadeOut(2000, function() { alFailure.hide(); });
}
else
{
@@ -58,6 +60,7 @@ function add(domain,list) {
},
error: function(jqXHR, exception) {
alFailure.show();
err.html("");
alFailure.delay(1000).fadeOut(2000, function() {
alFailure.hide();
});