07-21-2017 09:05 AM
Our teams have developed two shares that work perfectly, the only difference is in the dashlet of the members of the single site are sorted by last name [first name] in one while in the other are sorted by name [last name]. Which property is such a difference?
Greetings.
07-21-2017 03:37 PM
07-21-2017 03:37 PM
07-21-2017 05:25 PM
ty for response douglas , your link are been very helpful and i think they can solved by problem and answer to my question, for your question, the dahslet i'm talking about is the standard documented here http://docs.alfresco.com/5.2/concepts/sites-dashlet-use.html.
let you know if i solved my problem with your advise.
Greetings
09-07-2017 08:42 AM
K the response of Douglas help me a lot, i'm not found on alfresco 4 the javascript colleagues.get.js , but i found the script site-members.js to customize for sort by surname instead name:
// Sort the member list by name
items.sort(function (membership1, membership2)
{
var name1 = membership1.firstName + membership1.lastName,
name2 = membership2.firstName + membership2.lastName;
return (name1 > name2) ? 1 : (name1 < name2) ? -1 : 0;
});
....................................................................
if ((firstName !== undefined) || (lastName !== undefined))
{
name = firstName ? firstName + " " : "";
name += lastName ? lastName : "";
}
............................................................................
// Sort the member list by surname
items.sort(function (membership1, membership2)
{
var name1 = membership1.lastName + membership1.firstName,
name2 = membership2.lastName + membership2.firstName;
return (name1 > name2) ? 1 : (name1 < name2) ? -1 : 0;
});
.....................................................................
if ((firstName !== undefined) || (lastName !== undefined))
{
name = lastName ? lastName + " ": "";
name += firstName ? firstName : "";
}
it's work when i go to the dashlet "All Members" of the site but it's not work for the "preview" in the site dashboard, there is some other javascript i need to modify? here i put a image of the problem:
They are order for name not surname. Someone can help me with that.
09-08-2017 09:15 PM
Hello.
Based on your text and the attached image, I could not understand what is and what is not working.
Can you please elaborate?
09-09-2017 06:49 AM
...I think Marco wants to sort the Users by lastName+firstName not by firstName+lastName which is the default sorting in the dashlet.
09-11-2017 03:05 AM
yes like martin said, sorry for the misunderstanding
09-12-2017 10:12 PM
Are you on Alfresco 4 yet?
The file colleagues.get.js, at least in Alfresco Share 5.2.e, is the file used for the dashlet Site Members:
<shortname>Site Members</shortname>
<description>Lists members in the collaboration site</description>
The file site-member.get.js is used by the webscript responsible to return data for the Site Members "page":
<shortname>site-members</shortname>
<description>Site Members component</description>
In this case, I don't know if the name of the file is right, as there are both site-members.js (the client side javascript file) and site-member.get.js (the webscript's controller).
So, there are different places to check/change, and I am not sure if you are talking about what I think you are.
Besides that, I still didn't get what is the preview you mentioned.
09-14-2017 09:44 AM
Sorry Douglas you were right from the start, for some reason my brain is trying to find the colleagues.get.js under alfresco webapp not the share, i have solved all. For anyone have the same issue you can find more detail into this question Sort site members by surname not name on site dashboard.
P.S i don't now how to call the scrool panel of the site-members show on the left side of the site dashboard , i think is acceptable call it "preview panel of the members of the site".
Greetings.
Explore our Alfresco products with the links below. Use labels to filter content by product module.