npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adf-aos-editonline-action

v2.0.1

Published

Alfresco ADF AOS action

Downloads

4

Readme

adf-aos-editonline-action

Description

This module provides the Edit on Ms Office action present in Alfresco Share to be used on ADF (Alfresco Development Framework) 2.0.0 applications.

The module was developed during the Adding a new feature to Alfresco Content Application (ACA) project of the Alfresco Global Hackathon 2018. I did a previous similar project that works for ADF 1.8.0 and 1.9.0. The idea of this projects is to create angular reusable components holding functionalities present on Alfresco Share and often used by our clients.

Prerequisites

Before you start using this module, make sure you have properly installed and configured Alfresco Office Services (AOS) on your Alfresco Content Services installation, documentation.

For illustrating the use of the module I'll be using the alfresco-content-app

Office client requisites

Alfresco Office Services documentation

NOTE: Alfresco server and the ADF application must be accessible by a qualified hostname from within your Office client.

Example configuration

To configure a hostname for your ADF application with webpack-dev-server, just edit package.json and add --public parameter to the start script.

 "start": "npm run server-versions && npm run webpack-dev-server -- --config config/webpack.prod.js --progress --public app.example.com:3000 --content-base app/",

Next specify the externally accessible hostname for Alfresco on app.config.json

"ecmHost": "https://acs.example.com",

Make sure you can access both services from the Office client.

Install

  • Npm

Install the ng2-alfresco-aos-editonline module into your ADF application

npm install adf-aos-editonline-action --save

Compatibility Matrix

| package version | ADF version | | --- | --- | | 2.0.0 | 2.0.0 | | 2.0.1 | 2.0.0 |

Basic usage

  1. Clone the Alfresco ADF content application and install the module
$ git clone https://github.com/Alfresco/alfresco-content-app.git
$ cd alfresco-content-app
$ npm install
$ npm install adf-aos-editonline-action --save
  1. Import the module into the application

Edit the root module on your application to add the AosModule

app.module.ts

    ...
    import { AosModule } from 'adf-aos-editonline-action';
    ...
    @NgModule({
        imports: [
            ...
            AosModule
        ],
        ...        
  1. Extend FilesComponent HTML template

For this example we are going to use the FilesComponent that comes with the application generated with yeoman. This component showcases the use of the ng2-alfresco-documentlist component which fits perfect to test the AOS action.

NOTE: Read the ContentAction component documentation for understanding the extension point here

src/app/components/files/files.component.html

   <adf-document-list>
        ...        
         <content-actions>
            <content-action
                icon="build"
                target="document"
                permission="update"
                [disableWithNoPermission]="true"
                (permissionEvent)="handlePermissionError($event)"
                title="{{'AOS.ACTION.TITLE' | translate}}"
                (success)="onAosEditonlineActionSuccess($event)"
                (execute)="aosEditonline($event)">
            </content-action>
        </content-actions>
    </adf-document-list>
  1. Extend FilesComponent ts file

On the FileComponent controller we need to implement the aosEditonline(event) function, the name of the method is just and example and could be any other name, it only need to match the one defined in the HTML template.

src/app/components/files/files.component.ts

    import { AosEditOnlineService } from 'adf-aos-editonline-action';
    ...
    constructor(
                ...
                private aosEditOnlineService: AosEditOnlineService) {
    }
    ...
    aosEditonline(event) {
        this.aosEditOnlineService.onActionEditOnlineAos(event.value.entry);
    }
  1. Start the application
$ npm start
  1. Test the action

Access your application on http:// (after successfully logged in), navigate to a Ms document and click on the actions menu

Screenshots

Execute "Edit on MS Office" action upon a ms file, for example a .pptx

Detail of the action menu

Give your Alfresco credentials

Detail of the action menu

Work with Alfresco content from within your Ms Office

Detail of the action menu

Build from sources

Alternatively you can build component from sources with the following commands:

npm install
npm run build

History

For detailed changelog, check Releases.

Contributors

Contributors