cancel
Showing results for 
Search instead for 
Did you mean: 

extend search result page alfresco share 4

need
Champ in-the-making
Champ in-the-making
Hi all,

it is possible extend the search page result and insert the copy action in the mini preview near the document name?

Thanks at all.
5 REPLIES 5

need
Champ in-the-making
Champ in-the-making
Help me with any suggestion, thanks

ddraper
World-Class Innovator
World-Class Innovator
The short answer is that it is possible - have you taken a read through my blog posts on the new extensibility features? (there a quite few posts which start here: http://blogs.alfresco.com/wp/ddraper/2011/07/22/how-to-add-content-to-an-alfresco-share-page/)

I'd recommend that you use SurfBug to identify the components or WebScripts on the page that you wish to extend and then review the existing copy action code in the source to see how you can re-use it. Alternatively you can use FireBug or WebInspector to review how the copy action uses the REST API to perform the copy and implement your own copy solution.

I hope this helps you get started,

Regards,
Dave

need
Champ in-the-making
Champ in-the-making
Yes, i've read the blog post but the problem is:

If I enable surfbug I do not see all the components of the list of search results, only shows that:

http://img140.imageshack.us/img140/7379/searchwk.jpg

I do not see the area that interests me…help please Smiley Happy

need
Champ in-the-making
Champ in-the-making
Bump  :mrgreen:

need
Champ in-the-making
Champ in-the-making
Hi All,

in my search result page I find the code that I want for a change, I assume that it relates to the client in res / components / search and the file is search.js, precisely

// Render the cell
            var name = oRecord.getData("displayName");
            var htmlName = $html(name);
            var html = '<span><a href="' + url + '"><img src="' + imageUrl + '" alt="' + htmlName + '" title="' + htmlName + '" /></a></span>';
            if (dataType === "document")
            {
               var viewUrl = Alfresco.constants.PROXY_URI_RELATIVE + "api/node/content/" + oRecord.getData("nodeRef").replace(":/", "") + "/" + oRecord.getData("name");
               html = '<div class="action-overlay">' +
                      '<a href="' + encodeURI(viewUrl) + '" target="_blank"><img title="' + $html(me.msg("label.viewinbrowser")) +
                      '" src="' + Alfresco.constants.URL_RESCONTEXT + 'components/search/images/view-in-browser-16.png" width="16" height="16"/></a>' +
                      '<a href="' + encodeURI(viewUrl + "?a=true") + '" style="padding-left:4px" target="_blank"><img title="' + $html(me.msg("label.download")) +
                      '" src="' + Alfresco.constants.URL_RESCONTEXT + 'components/search/images/download-16.png" width="16" height="16"/></a>' +
                      '</div>' + html;
            }
            elCell.innerHTML = html;

it is right?

now reading this post https://forums.alfresco.com/en/viewtopic.php?f=50&t=41083, and this blog
http://blogs.alfresco.com/wp/mikeh/2011/09/26/share-document-library-extensions-in-v4-0/

i understand I figure I should add this to replace the client side js:
<customizations>
    <customization>
        <targetPackageRoot>org.alfresco</targetPackageRoot>
        <sourcePackageRoot>org.thirdparty.extension</sourcePackageRoot>
        <dependencies>
<js src="/custom/my-customization.js" />
            <css>/res/dependencies/addition_styles.css</css>
        </dependencies>
    </customization>
</customizations>

It is right?

Now I will insert the copy to action in that part of code, I can not figure out how to call the JS that starts the action copy to…Help me please… :roll: