Code Monkey home page Code Monkey logo

alfresco-share-iframe-preview's Introduction

alfresco-share-iframe-preview

AMP module for Alfresco Share. Show stripped-down version of document details page for use in an iframe.

The URL /share/page/iframe-preview?nodeRef={nodeRef} will show a document details page with just a few actions in a compact format.

It will also report the height of the iframe to the parent window using window.parent.postMessage. This is useful if you want to resize the iframe based on the height of the actual content and the iframe is loaded from a different domain. The format of the postMessage is {iframeHeight: 230} where 230 is the height in pixels.

If the HTML previewer is enabled, then an HTML rendition of the document will be used as the preview. This is dependent on the htmlthumbnail module being installed on the repository side. The default is disabled. To enable, pass the -Dhtml.previewer.enabled=true option to Maven.

Building

To build, run the command: mvn package

Copy the target/iframe-preview-share.amp file to your Alfresco Share installation's amps_share folder and apply the AMP file.

Building for different customers

To build the project for a specific customer, you can specify the -Dcustomer.name=customer option to Maven on the command-line. For example:

./run.sh -Dcustomer.name=roskilde to run an integration test with the customer set to 'roskilde'.

mvn package -Dcustomer.name=roskilde to build an AMP file for the customer 'roskilde'.

There is a Maven profile setup in the pom.xml file that automatically enables HTML previewer and uses Alfresco version 5.0.c when the customer is 'roskilde'. Additional customer-specific profiles can be added in the same way.

It is possible to customize the translations used on a per-customer basis by adding a translations file to src/main/amp/config/alfresco/web-extension/messages/iframe-preview/ called ${customer}.properties where ${customer} is the name of the customer.

alfresco-share-iframe-preview's People

Contributors

sethmagenta avatar darkstar1 avatar syastrov avatar

Watchers

James Cloos avatar Douglas C. R. Paes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.