demo upload

This commit is contained in:
Mario Romano
2016-05-20 12:35:06 +01:00
parent 0e7061b4a7
commit efefa6d9bd
5 changed files with 41 additions and 44 deletions

View File

@@ -21,6 +21,7 @@
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/router.dev.js"></script>
<script src="node_modules/angular2/bundles/http.dev.js"></script>
<script src="node_modules/alfresco-core-rest-api/bundle.js"></script>
<script>
System.config({

View File

@@ -12,6 +12,7 @@
},
"license": "MIT",
"dependencies": {
"alfresco-core-rest-api": "^0.1.0",
"angular2": "2.0.0-beta.13",
"es6-promise": "3.0.2",
"es6-shim": "0.35.0",

View File

@@ -1,34 +0,0 @@
///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>
/**
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component } from 'angular2/core';
import { ALFRESCO_ULPOAD_COMPONENT } from 'ng2-alfresco-upload/ng2-alfresco-upload';
@Component({
selector: 'my-demo',
template: `<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="false"
[multipleFiles]="false">
</alfresco-upload-button>`,
directives: [ALFRESCO_ULPOAD_COMPONENT]
})
export class MyDemoComponent {
}

View File

@@ -15,26 +15,54 @@
* limitations under the License.
*/
import { Component, provide } from 'angular2/core';
import { Component } from 'angular2/core';
import { bootstrap } from 'angular2/platform/browser';
import { HTTP_PROVIDERS } from 'angular2/http';
import { MyDemoComponent } from "./components/my-demo.component";
import { TranslateLoader, TranslateService } from 'ng2-translate/ng2-translate';
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core/services/AlfrescoTranslationService';
import { AlfrescoTranslationService, AlfrescoTranslationLoader } from 'ng2-alfresco-core/services';
import { ALFRESCO_ULPOAD_COMPONENT } from 'ng2-alfresco-upload/ng2-alfresco-upload';
@Component({
selector: 'my-app',
template: '<my-demo></my-demo>',
directives: [MyDemoComponent]
template: `<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="false"
[multipleFiles]="false">
</alfresco-upload-button>
<br><br>
<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="true"
[multipleFiles]="false">
</alfresco-upload-button>
<br><br>
<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="false"
[multipleFiles]="true">
</alfresco-upload-button>
<br><br>
<alfresco-upload-drag-area [showDialogUpload]="true" >
<div style="width: 200px; height: 100px; border: 1px solid #888888">
DRAG HERE
</div>
</alfresco-upload-drag-area>`,
directives: [ALFRESCO_ULPOAD_COMPONENT]
})
class VgDemo {
export class MyDemoApp {
constructor() {
}
}
bootstrap(VgDemo, [
bootstrap(MyDemoApp, [
HTTP_PROVIDERS,
provide(TranslateLoader, {useClass: AlfrescoTranslationLoader}),
TranslateService
AlfrescoTranslationService,
AlfrescoTranslationLoader
]);