mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Various updates to Office Addin web scripts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5903 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -6,7 +6,7 @@ var OfficeSearch =
|
||||
{
|
||||
init: function()
|
||||
{
|
||||
$("searchText").addEvent("keydown", function(event)
|
||||
$('searchText').addEvent('keydown', function(event)
|
||||
{
|
||||
event = new Event(event);
|
||||
if (event.key == 'enter')
|
||||
@@ -14,6 +14,20 @@ var OfficeSearch =
|
||||
$("simpleSearchButton").onclick();
|
||||
}
|
||||
});
|
||||
|
||||
$('itemsFound').innerHTML = "Results Shown Below";
|
||||
},
|
||||
|
||||
itemsFound: function(shownResults, totalResults)
|
||||
{
|
||||
if (shownResults < totalResults)
|
||||
{
|
||||
$('itemsFound').innerHTML = "Showing first " + shownResults + " of " + totalResults + " total items found";
|
||||
}
|
||||
else
|
||||
{
|
||||
$('itemsFound').innerHTML = "Showing all " + shownResults + " items found";
|
||||
}
|
||||
},
|
||||
|
||||
/* AJAX call to perform server-side search */
|
||||
@@ -21,17 +35,18 @@ var OfficeSearch =
|
||||
{
|
||||
OfficeAddin.showStatusText("Searching...", "ajax_anim.gif", false);
|
||||
|
||||
var searchString = $("searchText").value;
|
||||
var maxResults = $("maxResults").value;
|
||||
var searchString = $('searchText').value;
|
||||
var maxResults = $('maxResults').value;
|
||||
|
||||
var actionURL = useTemplate + "?p=" + argPath + "&search=" + searchString + "&maxresults=" + maxResults;
|
||||
var myAjax = new Ajax(actionURL, {
|
||||
method: 'get',
|
||||
headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
|
||||
evalScripts: true,
|
||||
onComplete: function(textResponse, xmlResponse)
|
||||
{
|
||||
OfficeAddin.hideStatusText();
|
||||
$("searchResultsList").innerHTML = textResponse;
|
||||
$('searchResultsList').innerHTML = textResponse;
|
||||
}
|
||||
});
|
||||
myAjax.request();
|
||||
|
Reference in New Issue
Block a user