0

I'm developing AMP file for the Share tier and I want to override the search order. Currently, the sorting performed by fullName. In my case I need sorting by lastName.

In people-finder.js I found this line:

...
/**
* Build URI parameter string for People Finder JSON data webscript
*
* @method _buildSearchParams
* @param searchTerm {string} Search terms to query
*/
_buildSearchParams: function PeopleFinder__buildSearchParams(searchTerm)
{
    return "sortBy=fullName&dir=asc&filter=" + encodeURIComponent(searchTerm) + "&maxResults=" + this.options.maxSearchResults;
}
...

I think, that I should override sortBy parameter from fullName to lastName. I have done some experiments locally and saw that changes in those values make affect to the sorting.

How can I do it?


As Sanjay Patel noted, I created the following path and place relevant JavaScript files there:

share\src\main\amp\res\components\people-finder

I tried this way too - share\src\main\amp\web\components\people-finder\

But now on the embedded local Tomcat all works fine and I can see that JavaScript file was overridden:

enter image description here

But on the production server I get the following:

enter image description here

What I was tried to do:

  • delete alfresco and share directories from webapps;
  • clear the browser's cache;
  • uninstall AMP from Share and install again. Check, that it present in Share;
  • perform a full reindex with Solr

Nothing helps.. All of that not helped to override the people-finder.js

What could be the reason?

4

1 回答 1

1

在 eclips(如 share\src\main\amp\web\components\people-finder\)中创建与 people-finder.js 文件相同的路径,并放置修改后的文件。

于 2017-02-02T10:59:37.970 回答