diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 6dda00e..1441103 100755 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -263,13 +263,24 @@ }, contentType: "application/json", async: true, + beforeSend: function () { + $("#todo-list").html("
\n" + + " \n" + + "
"); + }, success: function (result) { if (result.length !== 0) { $("#todo-list").html(result.map(m => todoComponent(m))); } else { - $("#todo-list").html("
\n" + - "

 Not found or empty

\n" + - "
"); + if ($("#search-todo").val() != null && $("#search-todo").val() != "") { + $("#todo-list").html("
\n" + + "

 Not found

\n" + + "
"); + } else { + $("#todo-list").html("
\n" + + "

 Empty

\n" + + "
"); + } } }, error: function (result) {