mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#46 Updated doc
This commit is contained in:
@@ -86,8 +86,7 @@ npm install --save material-design-icons material-design-lite
|
|||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<alfresco-upload-button [showDialogUpload]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[showUdoNotificationBar]="true"
|
|
||||||
[uploadFolders]="true"
|
[uploadFolders]="true"
|
||||||
[multipleFiles]="false"
|
[multipleFiles]="false"
|
||||||
[acceptedFilesType]=".jpg,.gif,.png,.svg"
|
[acceptedFilesType]=".jpg,.gif,.png,.svg"
|
||||||
@@ -107,8 +106,7 @@ import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/d
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `<alfresco-upload-button [showDialogUpload]="true"
|
template: `<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[showUdoNotificationBar]="true"
|
|
||||||
[uploadFolders]="true"
|
[uploadFolders]="true"
|
||||||
[multipleFiles]="false"
|
[multipleFiles]="false"
|
||||||
[acceptedFilesType]=".jpg,.gif,.png,.svg"
|
[acceptedFilesType]=".jpg,.gif,.png,.svg"
|
||||||
@@ -139,7 +137,6 @@ bootstrap(MyDemoApp, [
|
|||||||
|
|
||||||
#### Options
|
#### Options
|
||||||
|
|
||||||
**showDialogUpload**: {boolean} optional) default true. Hide/show upload dialog.<br />
|
|
||||||
**showUdoNotificationBar**: {boolean} (optional) default true. Hide/show notification bar.<br />
|
**showUdoNotificationBar**: {boolean} (optional) default true. Hide/show notification bar.<br />
|
||||||
**uploadFolders**: {boolean} (optional) default false. Allow/disallow upload folders (only for chrome).<br />
|
**uploadFolders**: {boolean} (optional) default false. Allow/disallow upload folders (only for chrome).<br />
|
||||||
**multipleFiles**: {boolean} (optional) default false. Allow/disallow multiple files.<br />
|
**multipleFiles**: {boolean} (optional) default false. Allow/disallow multiple files.<br />
|
||||||
@@ -151,7 +148,7 @@ This component, provide a drag and drop are to upload files to alfresco.
|
|||||||
#### Basic usage
|
#### Basic usage
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<alfresco-upload-drag-area [showDialogUpload]="true" (onSuccess)="customMethod($event)"></alfresco-upload-drag-area>
|
<alfresco-upload-drag-area (onSuccess)="customMethod($event)"></alfresco-upload-drag-area>
|
||||||
```
|
```
|
||||||
|
|
||||||
Example of an App that declares upload drag and drop component :
|
Example of an App that declares upload drag and drop component :
|
||||||
@@ -166,7 +163,7 @@ import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/d
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `<alfresco-upload-drag-area [showDialogUpload]="true" (onSuccess)="customMethod($event)" >
|
template: `<alfresco-upload-drag-area (onSuccess)="customMethod($event)" >
|
||||||
<div style="width: 200px; height: 100px; border: 1px solid #888888">
|
<div style="width: 200px; height: 100px; border: 1px solid #888888">
|
||||||
DRAG HERE
|
DRAG HERE
|
||||||
</div>
|
</div>
|
||||||
@@ -194,9 +191,16 @@ bootstrap(MyDemoApp, [
|
|||||||
#### Events
|
#### Events
|
||||||
**onSuccess**: The event is emitted when the file is uploaded<br />
|
**onSuccess**: The event is emitted when the file is uploaded<br />
|
||||||
|
|
||||||
#### Options
|
### Files Dialog
|
||||||
|
This component provides a dialog that shows all the files uploaded
|
||||||
|
with upload button or drag & drop area components. This component should
|
||||||
|
be used in combination with upload button or drag & drop area.
|
||||||
|
|
||||||
**showDialogUpload**: {boolean} optional) default true. Hide/show upload dialog.<br />
|
#### Basic usage
|
||||||
|
|
||||||
|
```html
|
||||||
|
<file-uploading-dialog></file-uploading-dialog>
|
||||||
|
```
|
||||||
|
|
||||||
## Build from sources
|
## Build from sources
|
||||||
Alternatively you can build component from sources with the following commands:
|
Alternatively you can build component from sources with the following commands:
|
||||||
|
@@ -26,8 +26,7 @@ import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/d
|
|||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `<label for="token">Access Token</label><br>
|
template: `<label for="token">Access Token</label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateToken()" [(ngModel)]="token"><br><br>
|
<input id="token" type="text" size="48" (change)="updateToken()" [(ngModel)]="token"><br><br>
|
||||||
<alfresco-upload-button [showDialogUpload]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[showUdoNotificationBar]="true"
|
|
||||||
[uploadFolders]="false"
|
[uploadFolders]="false"
|
||||||
[multipleFiles]="false"
|
[multipleFiles]="false"
|
||||||
(onSuccess)="customMethod($event)">
|
(onSuccess)="customMethod($event)">
|
||||||
@@ -35,8 +34,7 @@ import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/d
|
|||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<alfresco-upload-button [showDialogUpload]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[showUdoNotificationBar]="true"
|
|
||||||
[uploadFolders]="true"
|
[uploadFolders]="true"
|
||||||
[multipleFiles]="false"
|
[multipleFiles]="false"
|
||||||
(onSuccess)="customMethod($event)">
|
(onSuccess)="customMethod($event)">
|
||||||
@@ -44,8 +42,7 @@ import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/d
|
|||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<alfresco-upload-button [showDialogUpload]="true"
|
<alfresco-upload-button [showUdoNotificationBar]="true"
|
||||||
[showUdoNotificationBar]="true"
|
|
||||||
[uploadFolders]="false"
|
[uploadFolders]="false"
|
||||||
[multipleFiles]="true"
|
[multipleFiles]="true"
|
||||||
(onSuccess)="customMethod($event)">
|
(onSuccess)="customMethod($event)">
|
||||||
@@ -53,11 +50,12 @@ import { ALFRESCO_ULPOAD_COMPONENTS, UploadService } from 'ng2-alfresco-upload/d
|
|||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<alfresco-upload-drag-area [showDialogUpload]="true" (onSuccess)="customMethod($event)" >
|
<alfresco-upload-drag-area (onSuccess)="customMethod($event)" >
|
||||||
<div style="width: 200px; height: 100px; border: 1px solid #888888">
|
<div style="width: 200px; height: 100px; border: 1px solid #888888">
|
||||||
DRAG HERE
|
DRAG HERE
|
||||||
</div>
|
</div>
|
||||||
</alfresco-upload-drag-area>`,
|
</alfresco-upload-drag-area>
|
||||||
|
<file-uploading-dialog></file-uploading-dialog>`,
|
||||||
directives: [ALFRESCO_ULPOAD_COMPONENTS]
|
directives: [ALFRESCO_ULPOAD_COMPONENTS]
|
||||||
})
|
})
|
||||||
export class MyDemoApp {
|
export class MyDemoApp {
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
import { Component, ViewChild, ElementRef, Input, Output, EventEmitter } from 'angular2/core';
|
import { Component, ViewChild, ElementRef, Input, Output, EventEmitter } from 'angular2/core';
|
||||||
import { UploadService } from '../services/upload.service';
|
import { UploadService } from '../services/upload.service';
|
||||||
import { FileModel } from '../models/file.model';
|
|
||||||
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
import 'rxjs/Rx';
|
import 'rxjs/Rx';
|
||||||
|
|
||||||
@@ -26,8 +25,7 @@ declare let componentHandler: any;
|
|||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <alfresco-upload-button [showDialogUpload]="boolean"
|
* <alfresco-upload-button [showUdoNotificationBar]="boolean"
|
||||||
* [showUdoNotificationBar]="boolean"
|
|
||||||
* [uploadFolders]="boolean"
|
* [uploadFolders]="boolean"
|
||||||
* [multipleFiles]="boolean"
|
* [multipleFiles]="boolean"
|
||||||
* [acceptedFilesType]="string"
|
* [acceptedFilesType]="string"
|
||||||
@@ -36,7 +34,6 @@ declare let __moduleName: string;
|
|||||||
*
|
*
|
||||||
* This component, provide a set of buttons to upload files to alfresco.
|
* This component, provide a set of buttons to upload files to alfresco.
|
||||||
*
|
*
|
||||||
* @InputParam {boolean} [true] showDialogUpload - hide/show upload dialog.
|
|
||||||
* @InputParam {boolean} [true] showUdoNotificationBar - hide/show notification bar.
|
* @InputParam {boolean} [true] showUdoNotificationBar - hide/show notification bar.
|
||||||
* @InputParam {boolean} [false] uploadFolders - allow/disallow upload folders (only for chrome).
|
* @InputParam {boolean} [false] uploadFolders - allow/disallow upload folders (only for chrome).
|
||||||
* @InputParam {boolean} [false] multipleFiles - allow/disallow multiple files.
|
* @InputParam {boolean} [false] multipleFiles - allow/disallow multiple files.
|
||||||
@@ -58,9 +55,6 @@ export class UploadButtonComponent {
|
|||||||
@ViewChild('undoNotificationBar')
|
@ViewChild('undoNotificationBar')
|
||||||
undoNotificationBar: any;
|
undoNotificationBar: any;
|
||||||
|
|
||||||
@Input()
|
|
||||||
showUploadDialog: boolean = true;
|
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
showUdoNotificationBar: boolean = true;
|
showUdoNotificationBar: boolean = true;
|
||||||
|
|
||||||
|
@@ -22,12 +22,10 @@ import { FileDraggableDirective } from '../directives/file-draggable.directive';
|
|||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <alfresco-upload-drag-area [showDialogUpload]="boolean" (onSuccess)="customMethod($event)></alfresco-upload-drag-area>
|
* <alfresco-upload-drag-area (onSuccess)="customMethod($event)></alfresco-upload-drag-area>
|
||||||
*
|
*
|
||||||
* This component, provide a drag and drop are to upload files to alfresco.
|
* This component, provide a drag and drop are to upload files to alfresco.
|
||||||
*
|
*
|
||||||
* @InputParam {boolean} [true] showDialogUpload - hide/show upload dialog .
|
|
||||||
*
|
|
||||||
* @Output - onSuccess - The event is emitted when the file is uploaded
|
* @Output - onSuccess - The event is emitted when the file is uploaded
|
||||||
*
|
*
|
||||||
* @returns {UploadDragAreaComponent} .
|
* @returns {UploadDragAreaComponent} .
|
||||||
|
Reference in New Issue
Block a user