12-14-2012 11:35 AM
12-14-2012 01:35 PM
07-31-2017 06:08 PM
Hello Axel,
So I have been able to filter out all of the filter types except for "mine". The issue I'm running into is that there is not a way to automatically remove the filtered part so that other people's activities stop showing up. Where would I even begin to make this change? I've asked several times in the past and I'm hoping that I can atleast get pointed in the right direction.
08-01-2017 05:32 AM
I really do not understand what you are referring to right now... if you have removed all filter types execpt "mine" then there should be no way other peoples activities show up. What to you mean by "automatically remove the filtered part"?
08-01-2017 11:43 AM
On a site activities widget before you make a modification you can see members of the site and what they are doing. After making the modification those same activities show up on the widget. Now this can be old notifications on the feed. The only way to filter those off the widget is to have the user click on "Everyone's activites" and then select their own. What I want to be able to do (if possible) is eliminate the step where a user must do that in order for the filter to work properly.
08-08-2017 09:18 PM
I am not sure if I understood your problem, but it seems the problem is that the widget is initialized with the "all" option selected by default, as you can see in the source code here share/activities.js at master · Alfresco/share · GitHub
The webscript config has all the options defined, I think you have already noticed: share/site-activities.get.config.xml at master · Alfresco/share · GitHub
I believe all you need to do is to initialize the dashlet widged with the value "mine" for the user-filter.
08-09-2017 01:22 PM
Thank you Douglas for replying....So I have been able to modify the activities feed, but with a little hickup. Changing the activities.js and the activities-min.js and modifying the following:
activities.js on line 157 and 158
<code>
this.widgets.user.set("label", this.msg("filter.mine"));
this.widgets.user.value = "mine";
</code>
activities-min.js basically the same edit searching for "all" and replacing it with "mine"
So that is hard coding the install files which I really don't want to do. I want to be able to have the appropriate method of modifying the install files. I just don't know how to get started on the SDK for this modification.
Then creating the xml file which is here:
/opt/alfresco51/tomcat/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/my-activities.get.config.xml. That filters just the "mine" part.
I have tried to only modify the above mentioned to try and find which one needs to be changed while the others are left alone. It doesn't work without all three components being modified. Which is fine!
I guess really my question going forward is I want to be able to correctly modify the files, but when I try and do that in the SDK I get stuck and not really sure what is the best approach to do this. I really just need a nudge on what to do and I can go from there.
One thing that I have done is created a jar file and placed in the /tomcat/shared/lib folder the contents of the jar are the two above mentioned files with the modifications. I just created the file path of
/share/components/dashlets/the two js files
Is that a solution or is there something better?
08-09-2017 04:37 PM
My approach for this kind of JS file adaption is to always add a custom JS file as a dependency (customisation via Surf extension module) that then augments / modifies the prototype of the YUI component. Usually I replace one of the init functions of the component with a closure that simply calls the default function and does some pre/post processing around it. That way I can set the different widget states and don't have to modify original files.
I currently don't have an example in my open source modules of a prototype modification (last time I used this was for my old employer), but I used a similar approach to enhance edit-site / create-site dialogs.
08-09-2017 04:41 PM
Oh - and please forget that tomcat/shared/lib exists. It is no place to put any Alfresco addon / extension, even with JAR packaging. It will work as long as you only have static resources, but if the addon includes one Java class that needs to use / extend / implement a class from Alfresco or any of the included libraries, it will fail due to classloading issues.
08-09-2017 05:06 PM
Thank you for the response, but I think you have further confused me. Ok so going forward /tomcat/shared/lib doesn't exist. I should be putting any jar packaging in the /modules/share or the modules/platform depending on what I'm doing.
So if I understand both you and douglas so far.....
I need to create a jar package that I put into modules/share and the content of the jar I'm still trying to figure out. I may be missing something, but what I understand the jar file content should be basically a file path with the two files I want to override.
share/src/main/webapp/components/dashlets/activities.js and the activities-min.js
Is this correct?
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.