diff --git a/.angular-cli.json b/.angular-cli.json
index a9075f9f2..dcab4b6fb 100644
--- a/.angular-cli.json
+++ b/.angular-cli.json
@@ -13,13 +13,21 @@
"app.config.json",
"versions.json",
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-core/bundles/assets", "output": "./assets/" },
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-datatable/bundles/assets", "output": "./assets/" },
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-viewer/bundles/assets", "output": "./assets/" },
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-documentlist/bundles/assets", "output": "./assets/" },
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-login/bundles/assets", "output": "./assets/" },
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-upload/bundles/assets", "output": "./assets/" },
- { "glob": "**/*", "input": "../node_modules/ng2-alfresco-search/bundles/assets", "output": "./assets/" },
+ {
+ "glob": "**/*",
+ "input": "../node_modules/@alfresco/adf-core/prebuilt-themes",
+ "output": "./assets/prebuilt-themes"
+ },
+ {
+ "glob": "**/*",
+ "input": "../node_modules/@alfresco/adf-core/bundles/assets",
+ "output": "./assets/"
+ },
+ {
+ "glob": "**/*",
+ "input": "../node_modules/@alfresco/adf-content-services/bundles/assets",
+ "output": "./assets/"
+ },
{ "glob": "pdf.worker.js", "input": "../node_modules/pdfjs-dist/build", "output": "./" }
],
@@ -31,6 +39,8 @@
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
+ "./assets/fonts/material-icons/material-icons.css",
+ "./assets/fonts/muli/muli.css",
"styles.scss"
],
"scripts": [
@@ -79,7 +89,8 @@
"component": {},
"serve": {
"proxyConfig": "proxy.conf.js",
- "port": 3000
+ "port": 3000,
+ "host": "0.0.0.0"
}
}
}
diff --git a/LICENSE b/LICENSE
index 430d42bbe..65c5ca88a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,177 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
+ Copyright (C) 2007 Free Software Foundation, Inc.
+You also need [node.js](https://nodejs.org/en/) (8.9.1 or later) installed to build it locally from source code. +
+ +The latest version of the Alfresco Content platform is required +due to the application utilising the latest [REST APIs](https://docs.alfresco.com/5.2/pra/1/topics/pra-welcome.html) developments. + +## Where to get help + +There are a number of ways to get help with building applications using the Alfresco Application Development Framework: + +### Alfresco DevCon 2018 + +DevCon 2018 is an international developer conference entirely dedicated to Alfresco technology. +With the support of our community, customers, and partners, DevCon will increase your technical know-how, +connect you with other Alfresco developers, and let you collaborate with our team and each other. + +Register now to avoid disappointment, places are limited: +http://devcon.alfresco.com/ + +### Alfresco Community + +Visit the Alfresco Community space where you can find many resources to help you get started building your application, +along with blog posts from the Alfresco developers and much more: +https://community.alfresco.com/community/application-development-framework + +### Alfresco ADF Gitter + +Join the vibrant community in Gitter where you can chat with experienced developers, +including the Alfresco employees working directly on the ADF and this example application project: +https://gitter.im/Alfresco/alfresco-ng2-components + +### Alfresco Developer Support + +Developer Support is a subscription-based support offering delivered remotely +by a dedicated team of development-focused, senior Support Engineers. +This support offering is best for customers and partners that require on-going support +for their development teams and customized code. + +Visit the Developer Support Services section on the Alfresco website for more information: +https://www.alfresco.com/alfresco-developer-support-services + +### Alfresco University + +Training with Alfresco University is the best way to acquire the right skills for your team to deliver a successful Alfresco implementation. +The most cost-effective way to take advantage of this valuable training is through Alfresco University Passport. + +Visit the Alfresco University section on the Alfresco website for more information: +https://www.alfresco.com/alfresco-university ## Building and running locally @@ -13,3 +79,25 @@ Please refer to the [developer docs](/build) to get more details on building and The Content App provides a "Dockerfile" and "docker-compose" files to aid in running application in a container. Please refer to the "[Using with Docker](/docker)" article for more details. + +## Contribution Policy + +### How to contribute + +Fork our repository and submit a pull request when your code is ready for review. +To be considered the Travis build has to be green and all our automation tests have to run without regressions. + +### Contribute to the existing code base + +What are we reviewing for? + +- **License**: Every file should contain the Alfresco LICENSE header, LGPL Licence. +- **Tests**: Add unit cases to cover the new behaviour, and make sure all the existing tests are still green. +- **JS Documentation**: Every class needs to have its own inline jsdoc, this documentation should explain the general purpose of the class and of each method. +- **Documentation**: Update the documentation explaining how to use the new functionality, may not be necessary in the cases where change impacts only the CSS style. +- **Clean Coding**: Some good rules are enforced by the tslint, but we want also our code to be easy to read. Please avoid comments inside the code or leaving pieces of code commented out. +- **Localization**: Your contribution needs to support localization, with all new strings externalized, all translations are inside the i18n. The minimum requirement is English. + +### How long will it take for my contribution to be reviewed? + +The time necessary for a code review will vary, smaller changes may be reviewed within days, while larger changes may take longer. diff --git a/docs/build.md b/docs/build.md index 2afeb489b..0100a765f 100644 --- a/docs/build.md +++ b/docs/build.md @@ -2,7 +2,14 @@ The Content App is based on [Angular CLI](https://cli.angular.io), and you can use all the commands, generators and blueprints supported by the CLI. -Use the following commands to clone a copy of the project, install dependencies and run it. +## Prerequisites + +- [Node.js](https://nodejs.org/en/) 8.9.1 or later LTS version +- [Angular CLI](https://cli.angular.io/) + +## Cloning and running + +Use the following commands to clone the project, install dependencies and run it. ```sh git clone https://github.com/Alfresco/alfresco-content-app.git @@ -11,18 +18,18 @@ npm install npm start ``` -The application run at port 3000 by default, and should automatically open in the default browser once project compilation finishes. +The application runs at port 3000 by default, and should automatically open in the default browser once project compilation finishes. ## Proxy settings The Content App provides a proxy configuration for local development server -that allows you to address specific scenarios with CORS and native authentication dialogue. +that allows you to address specific scenarios with CORS and native authentication dialog. You can find settings in the "proxy.conf.js" file in the project root directory.The proxy settings get automatically applied every time you run the application with "npm start" script. -You must restart the application every time you change the setting values. +You must restart the application every time you change the settings values.
## Running documentation locally diff --git a/docs/configuration.md b/docs/configuration.md index 922b1fb13..6fdd3bf73 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,6 @@ # Application Configuration -The Content Application provides support for a global settings file `app.config.json` that you can use to customise the behaviour of ACA and ADF components. +The Content Application provides support for a global settings file `app.config.json` that you can use to customize the behavior of ACA and ADF components. ## Server settings @@ -29,7 +29,7 @@ Optionally it can also use the value of the original port if present, for exampl ### Static address -Alternatively, you can provide a static address for the ACS services if necessary: +Alternatively, you can provide a static address for the ACS server if necessary: ```json { @@ -40,7 +40,7 @@ Alternatively, you can provide a static address for the ACS services if necessar ## Application settings -The are many settings you can change to alter the default behaviour of the application. +The are many settings you can change to alter the default behavior of the application. ### Application Name @@ -104,7 +104,7 @@ You can change the default settings of the pagination that gets applied to all t ## Your custom settings -You can store any information in the application configuration file, and access it at runtime by utilising the `AppConfigService` service provided by the ADF framework. +You can store any information in the application configuration file, and access it at runtime by using the `AppConfigService` service provided by ADF.Please refer to the [AppConfigService](https://github.com/Alfresco/alfresco-ng2-components/blob/master/docs/app-config.service.md) documentation to get more details on Application Configuration features and API available. diff --git a/docs/cors.md b/docs/cors.md index 192da5af7..f296a92ee 100644 --- a/docs/cors.md +++ b/docs/cors.md @@ -2,7 +2,7 @@ ## Chrome Workaround -For the Chrome you can use the following plugin that allows you toggle CORS: +For the Chrome browser you can use the following plugin that allows you toggle CORS: [Allow-Control-Allow-Origin](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi) ## Firefox Workaround diff --git a/docs/docker.md b/docs/docker.md index 8f24330cc..3d98a5f05 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -86,3 +86,51 @@ To perform a cleanup operation, use the next command: ```sh docker-compose down --rmi all ``` + +## Publishing to Docker Hub + +First of all, if you do not have a Docker Hub account, you can register here: https://hub.docker.com/, the registration is absolutely free. + +Next, it is recommended that you get a clean build of the application: + +```sh +npm install +npm run build:dev +``` + +The commands above are going to produce a fresh build that is stored in the `dist` folder. +At this point, you can make modifications to the final code in the `dist` folder if needed. +For example you may want to change the `app.config.json` file content. + +Now you can build your first version of the image: + +```sh +docker image build -t myaccount/content-app:1.0 . +``` + +Where `myaccount` is usually your Docker Hub account name. + +
+Please note the ending "." symbol at the end of the command. It instructs the Docker to take current folder where the `Dockerfile` is located. +
+ +To publish the newly created image use the next command: + +```sh +docker push myaccount/content-app:1.0 +``` + +## Running from Docker Hub + +In order to quickly test the published image, or run it on another machine, use the following command: + +```sh +docker container run -p 80:80 --rm myaccount/content-app:1.0 +``` + +The `--rm` switch means the Docker will cleanup the container and image data once you stop the process. + +
+You may also want to remove your local image before trying out the Docker Hub:
+`docker image rm myaccount/content-app:1.0`
+
Action | +File | +Folder | + + +
---|---|---|
View | ++ Opens the selected file using the [Preview](https://github.com/Alfresco/alfresco-content-app/tree/development/src/app/components/preview) component, + where the file cannot be displayed natively in a browser a PDF rendition is obtained from the repository. + | +Not applicable | +
Download | +Downloads single files to the users computer, when multiple files are selected they are compressed into a ZIP and then downloaded. | +Folders are automatically compressed into a ZIP and then downloaded to the users computer. | +
Edit | +Not applicable | +The folder name and description can be edited in a dialog. | +
Favorite | ++ Toggle the favorite mark on or off for files and folders, when multiple items are selected + and one or more are not favorites then the mark will be toggled on. + | +|
Copy | ++ Files and folders can be copied into other locations in the content repository using the + [content-node-selector](https://alfresco.github.io/adf-component-catalog/components/ContentNodeSelectorComponent.html) component; + once the copy action has completed the user is notified and can undo the action (which permanently deletes the copies created). + | +|
Move | ++ Files and folders can be moved into other locations in the content repository using the + [content-node-selector](https://alfresco.github.io/adf-component-catalog/components/ContentNodeSelectorComponent.html) component; + once the move action has completed the user is notified and can undo the action (which moves the items back to the original location). + | +|
Delete | ++ Files and folders can be deleted from their location in the content repository; + once the delete action has completed the user is notified and undo the action (which restores the items from the trash). + | +