#46 intergrate drag and drop in document-list

This commit is contained in:
Mario Romano
2016-05-06 01:12:40 +01:00
parent a92f706c7d
commit e5b54f40b8
42 changed files with 617 additions and 283 deletions

View File

@@ -23,33 +23,35 @@
</ul>
</div>
<div class="col-md-10">
<alfresco-document-list
#list
[breadcrumb]="breadcrumb"
[navigate]="navigation"
folder-icon=""
(itemClick)="onItemClick($event)">
<content-columns>
<content-column source="$thumbnail"></content-column>
<content-column title="Display Name" source="displayName" class="full-width name-column"></content-column>
<content-column title="Created By" source="createdBy"></content-column>
<content-column title="Created On" source="createdOn"></content-column>
</content-columns>
<alfresco-upload-drag-area>
<alfresco-document-list
#list
[breadcrumb]="breadcrumb"
[navigate]="navigation"
folder-icon=""
(itemClick)="onItemClick($event)">
<content-columns>
<content-column source="$thumbnail"></content-column>
<content-column title="Display Name" source="displayName" class="full-width name-column"></content-column>
<content-column title="Created By" source="createdBy"></content-column>
<content-column title="Created On" source="createdOn"></content-column>
</content-columns>
<content-actions>
<!-- folder actions -->
<content-action target="folder" type="button" icon="delete" title="Delete" handler="system1"></content-action>
<content-action target="folder" type="menu" title="Default folder action 1" handler="system1"></content-action>
<content-action target="folder" type="menu" title="Custom folder action" (execute)="myFolderAction1($event)"></content-action>
<content-actions>
<!-- folder actions -->
<content-action target="folder" type="button" icon="delete" title="Delete" handler="system1"></content-action>
<content-action target="folder" type="menu" title="Default folder action 1" handler="system1"></content-action>
<content-action target="folder" type="menu" title="Custom folder action" (execute)="myFolderAction1($event)"></content-action>
<!-- document actions -->
<content-action target="document" type="button" icon="account_circle" handler="my-handler"></content-action>
<content-action target="document" type="button" icon="cloud_download" handler="download"></content-action>
<content-action target="document" type="menu" title="Download" handler="download"></content-action>
<content-action target="document" type="menu" title="System action" handler="system2"></content-action>
<content-action target="document" type="menu" title="Custom action" (execute)="myCustomAction1($event)"></content-action>
</content-actions>
</alfresco-document-list>
<!-- document actions -->
<content-action target="document" type="button" icon="account_circle" handler="my-handler"></content-action>
<content-action target="document" type="button" icon="cloud_download" handler="download"></content-action>
<content-action target="document" type="menu" title="Download" handler="download"></content-action>
<content-action target="document" type="menu" title="System action" handler="system2"></content-action>
<content-action target="document" type="menu" title="Custom action" (execute)="myCustomAction1($event)"></content-action>
</content-actions>
</alfresco-document-list>
</alfresco-upload-drag-area>
</div>
</div>
</div>

View File

@@ -14,6 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Component} from 'angular2/core';
import {
DOCUMENT_LIST_DIRECTIVES,
@@ -21,6 +23,7 @@ import {
DocumentActionsService
} from 'ng2-alfresco-documentlist/ng2-alfresco-documentlist';
import {MDL} from 'ng2-alfresco-core/material';
import {ALFRESCO_ULPOAD_COMPONENT, ALFRESCO_ULPOAD_PROVAIDERS} from 'ng2-alfresco-upload/ng2-alfresco-upload';
declare let __moduleName:string;
@@ -28,14 +31,14 @@ declare let __moduleName:string;
moduleId: __moduleName,
selector: 'files-component',
templateUrl: './files.component.html',
directives: [DOCUMENT_LIST_DIRECTIVES, MDL],
providers: [DOCUMENT_LIST_PROVIDERS]
directives: [DOCUMENT_LIST_DIRECTIVES, MDL, ALFRESCO_ULPOAD_COMPONENT],
providers: [DOCUMENT_LIST_PROVIDERS, ALFRESCO_ULPOAD_PROVAIDERS]
})
export class FilesComponent {
breadcrumb: boolean = false;
navigation: boolean = true;
events: any[] = [];
constructor(documentActions: DocumentActionsService) {
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
}