mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
demo upload
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<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/router.dev.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/http.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>
|
<script>
|
||||||
System.config({
|
System.config({
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"alfresco-core-rest-api": "^0.1.0",
|
||||||
"angular2": "2.0.0-beta.13",
|
"angular2": "2.0.0-beta.13",
|
||||||
"es6-promise": "3.0.2",
|
"es6-promise": "3.0.2",
|
||||||
"es6-shim": "0.35.0",
|
"es6-shim": "0.35.0",
|
||||||
|
@@ -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 {
|
|
||||||
|
|
||||||
}
|
|
@@ -15,26 +15,54 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, provide } from 'angular2/core';
|
import { Component } from 'angular2/core';
|
||||||
import { bootstrap } from 'angular2/platform/browser';
|
import { bootstrap } from 'angular2/platform/browser';
|
||||||
import { HTTP_PROVIDERS } from 'angular2/http';
|
import { HTTP_PROVIDERS } from 'angular2/http';
|
||||||
import { MyDemoComponent } from "./components/my-demo.component";
|
import { AlfrescoTranslationService, AlfrescoTranslationLoader } from 'ng2-alfresco-core/services';
|
||||||
import { TranslateLoader, TranslateService } from 'ng2-translate/ng2-translate';
|
import { ALFRESCO_ULPOAD_COMPONENT } from 'ng2-alfresco-upload/ng2-alfresco-upload';
|
||||||
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core/services/AlfrescoTranslationService';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: '<my-demo></my-demo>',
|
template: `<alfresco-upload-button [showDialogUpload]="true"
|
||||||
directives: [MyDemoComponent]
|
[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() {
|
constructor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(VgDemo, [
|
bootstrap(MyDemoApp, [
|
||||||
HTTP_PROVIDERS,
|
HTTP_PROVIDERS,
|
||||||
provide(TranslateLoader, {useClass: AlfrescoTranslationLoader}),
|
AlfrescoTranslationService,
|
||||||
TranslateService
|
AlfrescoTranslationLoader
|
||||||
]);
|
]);
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"alfresco-core-rest-api": "^0.1.0",
|
||||||
"angular2": "2.0.0-beta.15",
|
"angular2": "2.0.0-beta.15",
|
||||||
"es6-module-loader": "^0.17.8",
|
"es6-module-loader": "^0.17.8",
|
||||||
"es6-shim": "^0.35.0",
|
"es6-shim": "^0.35.0",
|
||||||
|
Reference in New Issue
Block a user