mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Word Add-in web scripts - fixed for AWC-1337, exception when no results returned from search. Also removed unnecessary server-side javascript files.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6205 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,10 +16,11 @@
|
||||
<#assign maxresults=10>
|
||||
</#if>
|
||||
<#assign resCount=0>
|
||||
<#assign totalResults=0>
|
||||
<#assign results = companyhome.childrenByLuceneSearch[queryString] >
|
||||
<#if results?size = 0>
|
||||
<div>
|
||||
<span class="noItems">(No results found)</span>
|
||||
<div class="noItems">
|
||||
<span>(No results found)</span>
|
||||
</div>
|
||||
<#else>
|
||||
<#assign totalResults = results?size>
|
||||
|
@@ -20,14 +20,20 @@ var OfficeSearch =
|
||||
|
||||
itemsFound: function(shownResults, totalResults)
|
||||
{
|
||||
if (shownResults < totalResults)
|
||||
var strFound;
|
||||
if (totalResults == 0)
|
||||
{
|
||||
$('itemsFound').innerHTML = "Showing first " + shownResults + " of " + totalResults + " total items found";
|
||||
strFound = "No items found";
|
||||
}
|
||||
else if (shownResults < totalResults)
|
||||
{
|
||||
strFound = "Showing first " + shownResults + " of " + totalResults + " total items found";
|
||||
}
|
||||
else
|
||||
{
|
||||
$('itemsFound').innerHTML = "Showing all " + shownResults + " items found";
|
||||
strFound = "Showing all " + shownResults + " items found";
|
||||
}
|
||||
$('itemsFound').innerHTML = strFound;
|
||||
},
|
||||
|
||||
/* AJAX call to perform server-side search */
|
||||
|
Reference in New Issue
Block a user