mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Sync with latest development (#139)
* Update index.html * Update features.md * Update header.md * Update header.md * Update header.md * Add files via upload * Update header.md * Update header.md * Add files via upload * Update header.md * Add files via upload * Add files via upload * Update header.md * Add files via upload * Delete sid-nav.png * Add files via upload * Update side-nav.md * Add files via upload * Update side-nav.md * Update side-nav.md * Update doc-list.md * Add files via upload * Update doc-list.md * Update doc-list.md * Delete doclist.png * Add files via upload * small changes to docs * [ACA-1038] 'Load more' doesn't work correctly on destination picker (#135) made sure that a search is performed only if there is a search string to search for * [ACA-951] Color theme and logo (#138) - documented customization of the logo and header background color
This commit is contained in:
parent
ae84e67ee3
commit
ebc3111824
@ -15,7 +15,7 @@ with a simple and easy to use interface for working with files stored in the Alf
|
||||
|
||||
### Prerequisites
|
||||
|
||||
This application utilises the latest releases from Alfresco:
|
||||
This application uses the latest releases from Alfresco:
|
||||
|
||||
- [Alfresco ADF version 2.0](https://community.alfresco.com/community/application-development-framework/pages/get-started)
|
||||
- [Alfresco Content Services version 5.2.2](https://www.alfresco.com/platform/content-services-ecm)
|
||||
@ -26,11 +26,11 @@ You also need [node.js](https://nodejs.org/en/) (8.9.1 or later) installed to bu
|
||||
</p>
|
||||
|
||||
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.
|
||||
due to the application using 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:
|
||||
There are several ways to get help with building applications using the Alfresco Application Development Framework:
|
||||
|
||||
### Alfresco DevCon 2018
|
||||
|
||||
@ -85,19 +85,19 @@ Please refer to the "[Using with Docker](/docker)" article for more details.
|
||||
### 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.
|
||||
To be considered the Travis build must be green and all our automation tests must 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.
|
||||
- **Tests**: Add unit cases to cover the new behavior, 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?
|
||||
### 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.
|
||||
|
@ -35,7 +35,7 @@ You must restart the application every time you change the settings values.
|
||||
## Running documentation locally
|
||||
|
||||
For development purposes, you can run and test documentation locally.
|
||||
That is useful when working in different branches instead of a `master` one.
|
||||
This is useful when working in different branches instead of a `master` one.
|
||||
|
||||
Run the following command to install the lightweight development server [wsrv](https://denysvuika.gitlab.io/wsrv/#/):
|
||||
|
||||
|
@ -40,7 +40,7 @@ Alternatively, you can provide a static address for the ACS server if necessary:
|
||||
|
||||
## Application settings
|
||||
|
||||
The are many settings you can change to alter the default behavior of the application.
|
||||
There are many settings you can change to alter the default behavior of the application.
|
||||
|
||||
### Application Name
|
||||
|
||||
@ -59,6 +59,37 @@ The value of the `application.name` key gets appended to every browser tab title
|
||||
with the format `[page title] - [application name]`,
|
||||
for example: "Personal Files - Alfresco Example Content Application".
|
||||
|
||||
### Application Logo
|
||||
|
||||
The default logo displayed in the top left corner of the Alfresco Content Application can be changed with the one you want:
|
||||
|
||||
1. Place the custom logo image file in the [app-name]/src/assets/images folder. The displayed image will be resized to fit the design, but please be aware that an image with extreme width/height might not look good after resizing.
|
||||
|
||||
2. In the app.config.json file, set the value of the application.logo to contain the name of the custom logo image: "logo": "/assets/images/[image-name].[extension]"
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"application": {
|
||||
"logo": "/assets/images/alfresco-logo-white.svg"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Header Background color
|
||||
|
||||
You can change the header background color by specifying the wanted color code for the "headerColor" key:
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"headerColor": "#2196F3"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Restricted content
|
||||
|
||||
You can restrict users from uploading certain types of files and folders by setting or extending the list of rules at the "files.excluded" path.
|
||||
|
@ -2,17 +2,17 @@
|
||||
|
||||
## Chrome Workaround
|
||||
|
||||
For the Chrome browser you can use the following plugin that allows you toggle CORS:
|
||||
For the Chrome browser, you can use the following plugin that allows you to toggle CORS:
|
||||
[Allow-Control-Allow-Origin](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi)
|
||||
|
||||
## Firefox Workaround
|
||||
|
||||
FireFox users can try the following plugin: [CORS Everywhere](https://addons.mozilla.org/en-Gb/firefox/addon/cors-everywhere/)
|
||||
Firefox users can try the following plugin: [CORS Everywhere](https://addons.mozilla.org/en-Gb/firefox/addon/cors-everywhere/)
|
||||
|
||||
## Safari Workaround
|
||||
|
||||
If you are developing or testing with Safari then you can use the "Develop" menu to toggle the CORS mode.
|
||||
Please note that page must be reloaded every time you change CORS settings.
|
||||
Please note that the page must be reloaded every time you change CORS settings.
|
||||
|
||||

|
||||
|
||||
|
@ -1,17 +1,19 @@
|
||||
### (3) Document List Layout
|
||||
### Document List Layout
|
||||
|
||||
The main area of the application is composed from a number of individual ADF components:
|
||||
The main area of the application is composed of several individual ADF components:
|
||||
|
||||
- [Breadcrumb](https://alfresco.github.io/adf-component-catalog/components/BreadcrumbComponent.html)
|
||||
- [Toolbar](https://alfresco.github.io/adf-component-catalog/components/ToolbarComponent.html)
|
||||
- [Document List](https://alfresco.github.io/adf-component-catalog/components/DocumentListComponent.html)
|
||||
- [Pagination](https://alfresco.github.io/adf-component-catalog/components/PaginationComponent.html)
|
||||
- (1) [Breadcrumb](https://alfresco.github.io/adf-component-catalog/components/BreadcrumbComponent.html)
|
||||
- (2) [Toolbar](https://alfresco.github.io/adf-component-catalog/components/ToolbarComponent.html)
|
||||
- (3) [Document List](https://alfresco.github.io/adf-component-catalog/components/DocumentListComponent.html)
|
||||
- (4) [Pagination](https://alfresco.github.io/adf-component-catalog/components/PaginationComponent.html)
|
||||
|
||||
The application has six different Document List views which share commonalities between each view and also subtle differences depending on the content being loaded which are explained below.
|
||||

|
||||
|
||||
The application has six different Document List views which share commonalities between each view and subtle differences depending on the content being loaded which are explained below.
|
||||
|
||||
#### Personal Files
|
||||
|
||||
Personal Files retrieves all content from the logged in users home area (`/User Homes/<username>/` in the repository);
|
||||
Personal Files retrieves all content from the logged in user's home area (`/User Homes/<username>/` in the repository);
|
||||
if the user is ‘admin’ who does not have a home folder then the repository root folder is shown.
|
||||
|
||||
Personal Files is the [Files component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/files),
|
||||
@ -19,11 +21,11 @@ using the [Nodes API](https://api-explorer.alfresco.com/api-explorer/#/nodes).
|
||||
|
||||
#### File Libraries
|
||||
|
||||
File Libraries retrieves all the sites that the user is a member including what type of site it is; public, moderated or private.
|
||||
File Libraries retrieves all the sites that the user is a member of including what type of site it is: public, moderated or private.
|
||||
File Libraries is the [Libraries component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/libraries),
|
||||
using the [Sites API](https://api-explorer.alfresco.com/api-explorer/#/sites).
|
||||
|
||||
When a user opens one of their sites then the content for that sites document library is shown.
|
||||
When a user opens one of their sites then the content for the site's document library is shown.
|
||||
To display the files and folders from a site (`/Sites/<siteid>/Document Library/`) the [Files component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/files),
|
||||
using the [Nodes API](https://api-explorer.alfresco.com/api-explorer/#/nodes) is used.
|
||||
|
||||
@ -40,7 +42,7 @@ A feature for creating and removing Shared Links will be added in the future.
|
||||
|
||||
#### Recent Files
|
||||
|
||||
The Recent Files view shows all the files that have been modified within the last 30 days by the current user.
|
||||
The Recent Files view shows all the files that have been created or modified within the last 30 days by the current user.
|
||||
The [Recent Files](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/current-user)
|
||||
component uses the Search API to query SOLR for changes made by the user and includes an extra column to display where the file is
|
||||
[located](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/location-link)
|
||||
@ -61,9 +63,9 @@ The Trash view shows all the items that a user has deleted, admin will see items
|
||||
The actions available in this view are Restore and Permanently Delete.
|
||||
The [Trashcan](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/trashcan) component uses the
|
||||
[trashcan](https://api-explorer.alfresco.com/api-explorer/#/trashcan) API to retrieve the deleted items
|
||||
and perform the actions requested by the user and includes an extra column to display where the file is
|
||||
and perform the actions requested by the user and includes an extra column to display where the item was
|
||||
[located](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/location-link)
|
||||
in the content repository.
|
||||
in the content repository before it was deleted.
|
||||
|
||||
#### Actions and the Actions Toolbar
|
||||
|
||||
@ -89,8 +91,8 @@ actions are automatically hidden when the user does not have permission.
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Download</td>
|
||||
<td>Downloads single files to the users computer, when multiple files are selected they are compressed into a ZIP and then downloaded.</td>
|
||||
<td>Folders are automatically compressed into a ZIP and then downloaded to the users computer.</td>
|
||||
<td>Downloads single files to the user's computer, when multiple files are selected they are compressed into a ZIP and then downloaded.</td>
|
||||
<td>Folders are automatically compressed into a ZIP and then downloaded to the user's computer.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit</td>
|
||||
@ -107,15 +109,15 @@ actions are automatically hidden when the user does not have permission.
|
||||
<tr>
|
||||
<td>Copy</td>
|
||||
<td colspan="2">
|
||||
Files and folders can be copied into other locations in the content repository using the
|
||||
Files and folders can be copied to another location 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).
|
||||
once the copy action has completed the user is notified and can undo the action (which permanently deletes the created copies).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Move</td>
|
||||
<td colspan="2">
|
||||
Files and folders can be moved into other locations in the content repository using the
|
||||
Files and folders can be moved to another location 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).
|
||||
</td>
|
||||
@ -124,11 +126,11 @@ actions are automatically hidden when the user does not have permission.
|
||||
<td>Delete</td>
|
||||
<td colspan="2">
|
||||
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).
|
||||
once the delete action has completed the user is notified and can undo the action (which restores the items from the trash).
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
As well as the actions available in the toolbar users can single click an item to select it,
|
||||
Besides the actions available in the toolbar users can single click an item to select it,
|
||||
or double click on a file to view it, and a folder to open it.
|
||||
|
@ -43,7 +43,7 @@ Navigate to "http://localhost" to access the running application.
|
||||
## Docker Compose file
|
||||
|
||||
You can also use the "docker-compose" file for local development and testing.
|
||||
To build and run container run the following command in the root project folder:
|
||||
To build and run a container run the following command in the root project folder:
|
||||
|
||||
```sh
|
||||
docker-compose up
|
||||
@ -72,7 +72,7 @@ npm run build:dev
|
||||
The command above updates the "dist/app.config.json" file to point the Content App to "http://localhost:8080" upon startup.
|
||||
Alternatively, you can change the configuration file manually before generating an image.
|
||||
|
||||
So the development workflow, in this case, is going to be:
|
||||
So, the development workflow, in this case, is going to be:
|
||||
|
||||
```sh
|
||||
npm run build:dev
|
||||
@ -122,7 +122,7 @@ 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:
|
||||
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
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
Log any issues in the ['ACA' JIRA project](https://issues.alfresco.com/jira/projects/ACA),
|
||||
please include a clear description, steps to reproduce and screenshots where appropriate.
|
||||
All issues will be reviewed; bugs will be categorised if reproducible and enhancement/feature suggestions
|
||||
will be considered against existing priorities if the use case serves a general purpose need.
|
||||
All issues will be reviewed; bugs will be categorized if reproducible and enhancement/feature suggestions
|
||||
will be considered against existing priorities if the use case serves a general-purpose need.
|
||||
|
||||
## Does Alfresco provide customer support for the example content application?
|
||||
|
||||
@ -30,4 +30,4 @@ Please refer to the ['ACA' JIRA project](https://issues.alfresco.com/jira/projec
|
||||
|
||||
## How often will this project be updated?
|
||||
|
||||
This project will continue evolve as the Alfresco ADF evolves, with Alfresco and community developers contributing to its progress.
|
||||
This project will continue to evolve as the Alfresco ADF evolves, with Alfresco and community developers contributing to its progress.
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Features
|
||||
|
||||
## Introduction
|
||||
The concept of this example is a simple user interface which makes accessing files in the Alfresco Content Services repository easy.
|
||||
|
||||
Often Content Management systems provide more capabilities out of the box than most users need;
|
||||
providing too many capabilities to these users prevents them from working efficiently,
|
||||
so they may end up using unsanctioned file management solutions which presents a proliferation of content storage
|
||||
and collaboration solutions as well as compliance issues for organisations.
|
||||
and collaboration solutions as well as compliance issues for organizations.
|
||||
|
||||
This application demonstrates how the complexity of Content Management can be simplified
|
||||
using the Alfresco Application Development Framework to easily and quickly create custom solutions for specific user cases.
|
||||
|
@ -1,16 +1,25 @@
|
||||
### (1) Header
|
||||
## Header
|
||||
|
||||
The application [header](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/header) has three main elements.
|
||||
|
||||
Logo & app primary color - logo and color are configurable by updating the
|
||||
[app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json) file in the root folder of the project,
|
||||
see [How to change the logo and color](/) and [Application Configuration](/configuration) for more information
|
||||

|
||||
|
||||
[Search](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/search) -
|
||||
utilizing the [ADF Search Component](https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/content-services/search)
|
||||
### (1) Logo and Color
|
||||
Logo & app primary color - logo and color are configurable by updating the
|
||||
[app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json) file in the root folder of the project.
|
||||
Please refer to the [Application Configuration](https://github.com/Alfresco/alfresco-content-app/blob/master/docs/configuration.md#application-logo) documentation for more information on how to change the logo and color.
|
||||
|
||||
### (2) Search
|
||||
The application [Search](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/search) -
|
||||
uses the [ADF Search Component](https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/content-services/search)
|
||||
the app provides a 'live' search feature, where users can open files and folders directly from the Search API results.
|
||||
|
||||

|
||||
|
||||
### (3) Current User
|
||||
[Current User](https://github.com/Alfresco/alfresco-content-app/tree/development/src/app/components/current-user) -
|
||||
displays the user's name, and a menu where users can logout.
|
||||
Optionally through updating the [app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json)
|
||||
a language switching menu can be displayed.
|
||||
|
||||

|
||||
|
@ -110,7 +110,7 @@ Modify the `/src/assets/i18n/en.json` file and append the "CORE" section like in
|
||||
```
|
||||
|
||||
Now, if you run the application and click the "New → Create Folder" menu,
|
||||
the title of the dialog should look similar to the following:
|
||||
the title of the dialog should look like the following:
|
||||
|
||||

|
||||
|
||||
|
BIN
docs/images/current-user.png
Normal file
BIN
docs/images/current-user.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
BIN
docs/images/doclist.png
Normal file
BIN
docs/images/doclist.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
BIN
docs/images/header.png
Normal file
BIN
docs/images/header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
docs/images/search.png
Normal file
BIN
docs/images/search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 179 KiB |
BIN
docs/images/side-nav.png
Normal file
BIN
docs/images/side-nav.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 118 KiB |
BIN
docs/images/uploader.png
Normal file
BIN
docs/images/uploader.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
@ -23,7 +23,7 @@
|
||||
type: 'dropdown',
|
||||
items: [
|
||||
{
|
||||
title: 'Features Introduction',
|
||||
title: 'Introduction',
|
||||
path: 'features',
|
||||
},
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
### (2) Side Nav
|
||||
### Side Nav
|
||||
|
||||
The application [side navigation](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/sidenav) has two features;
|
||||
The application [side navigation](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/sidenav) has two features:
|
||||
a button menu and navigation links.
|
||||
|
||||

|
||||
@ -11,13 +11,15 @@ The New button displays a menu which provides three actions:
|
||||
|
||||
- Create a new folder - provides a dialog which allows the creation of a new folder, the folder name is mandatory and the description is optional.
|
||||
- Upload a file - invokes the operating system file browser and allows a user to select file(s) to upload into their current location in the content repository.
|
||||
- Upload a folder - invokes the operating system folder browser and allows a user to select folder(s) to upload to their current location in the content repository.
|
||||
- Upload a folder - invokes the operating system folder browser and allows a user to select a folder to upload to their current location in the content repository.
|
||||
|
||||
When an upload starts the [upload component](https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/content-services/upload)
|
||||
is displayed which shows the user the progress of the uploads they have started.
|
||||
The upload dialog persists on the screen and can be minimised; users are able to continue using the application whilst uploads are in progress
|
||||
The upload dialog persists on the screen and can be minimized; users are able to continue using the application whilst uploads are in progress
|
||||
and uploads can be canceled which will stop uploads in progress or permanently delete already completed uploads.
|
||||
|
||||

|
||||
|
||||
#### Navigation
|
||||
|
||||
The navigation links are configurable via the [app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json).
|
||||
|
@ -212,6 +212,16 @@ export class NodeActionsService {
|
||||
}
|
||||
};
|
||||
|
||||
const initialGetNextPageOfSearch = destinationPicker.getNextPageOfSearch;
|
||||
destinationPicker.getNextPageOfSearch = (event) => {
|
||||
destinationPicker.infiniteScroll = true;
|
||||
destinationPicker.skipCount = event.skipCount;
|
||||
|
||||
if (destinationPicker.searchTerm.length > 0) {
|
||||
initialGetNextPageOfSearch.call(destinationPicker, event);
|
||||
}
|
||||
};
|
||||
|
||||
return data.select;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user