Change/Remove the message when no items in List/library - "There are no items to show in this view of the list. To add a new item, click New".
Add the below code in content editor...
<script>
function ChangeDiscussionMessage()
{
var a = document.getElementsByTagName("TD")
for (var i=0;i<a.length;i++)
{
if (a[i].className=="ms-vb")
{
if (a[i].innerText.indexOf("There are no items to show in this view")>-1)
{
a[i].innerHTML = "No items in this list.";
}
}
}
}
_spBodyOnLoadFunctionNames.push("ChangeDiscussionMessage")
</script>
IF you want to do this for every list add this code to master page.
Excellent. Thanks for the code. Worked perfectly.
ReplyDelete