mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
integrate call in the demo shell and script demo shell
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
<a class="mdl-navigation__link" data-automation-id="datatable" href="" [routerLink]="['DataTable']">DataTable</a>
|
<a class="mdl-navigation__link" data-automation-id="datatable" href="" [routerLink]="['DataTable']">DataTable</a>
|
||||||
<a class="mdl-navigation__link" data-automation-id="uploader" href="" [routerLink]="['Uploader']">Uploader</a>
|
<a class="mdl-navigation__link" data-automation-id="uploader" href="" [routerLink]="['Uploader']">Uploader</a>
|
||||||
<a class="mdl-navigation__link" data-automation-id="tasks" href="" [routerLink]="['Tasks']">Tasks</a>
|
<a class="mdl-navigation__link" data-automation-id="tasks" href="" [routerLink]="['Tasks']">Tasks</a>
|
||||||
|
<a class="mdl-navigation__link" data-automation-id="webscript" href="" [routerLink]="['Webscript']">Webscript</a>
|
||||||
<a class="mdl-navigation__link" data-automation-id="login" href="" [routerLink]="['Login']">Login</a>
|
<a class="mdl-navigation__link" data-automation-id="login" href="" [routerLink]="['Login']">Login</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
<a class="mdl-navigation__link" href="" [routerLink]="['Uploader']" (click)="hideDrawer()">Uploader</a>
|
<a class="mdl-navigation__link" href="" [routerLink]="['Uploader']" (click)="hideDrawer()">Uploader</a>
|
||||||
<a class="mdl-navigation__link" href="" [routerLink]="['Login']" (click)="hideDrawer()">Login</a>
|
<a class="mdl-navigation__link" href="" [routerLink]="['Login']" (click)="hideDrawer()">Login</a>
|
||||||
<a class="mdl-navigation__link" href="" [routerLink]="['Tasks']" (click)="hideDrawer()">Tasks</a>
|
<a class="mdl-navigation__link" href="" [routerLink]="['Tasks']" (click)="hideDrawer()">Tasks</a>
|
||||||
|
<a class="mdl-navigation__link" href="" [routerLink]="['Webscript']" (click)="hideDrawer()">Webscript</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<main class="mdl-layout__content">
|
<main class="mdl-layout__content">
|
||||||
|
@@ -32,6 +32,7 @@ import { SearchComponent } from './components/search/search.component';
|
|||||||
import { SearchBarComponent } from './components/search/search-bar.component';
|
import { SearchBarComponent } from './components/search/search-bar.component';
|
||||||
import { LoginDemoComponent } from './components/login/login-demo.component';
|
import { LoginDemoComponent } from './components/login/login-demo.component';
|
||||||
import { TasksDemoComponent } from './components/tasks/tasks-demo.component';
|
import { TasksDemoComponent } from './components/tasks/tasks-demo.component';
|
||||||
|
import { WebscriptComponent } from './components/webscript/webscript.component';
|
||||||
|
|
||||||
declare var document: any;
|
declare var document: any;
|
||||||
|
|
||||||
@@ -50,7 +51,8 @@ declare var document: any;
|
|||||||
{path: '/uploader', name: 'Uploader', component: UploadButtonComponent},
|
{path: '/uploader', name: 'Uploader', component: UploadButtonComponent},
|
||||||
{path: '/login', name: 'Login', component: LoginDemoComponent},
|
{path: '/login', name: 'Login', component: LoginDemoComponent},
|
||||||
{path: '/search', name: 'Search', component: SearchComponent},
|
{path: '/search', name: 'Search', component: SearchComponent},
|
||||||
{path: '/tasks', name: 'Tasks', component: TasksDemoComponent}
|
{path: '/tasks', name: 'Tasks', component: TasksDemoComponent},
|
||||||
|
{path: '/webscript', name: 'Webscript', component: WebscriptComponent}
|
||||||
])
|
])
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
translate: AlfrescoTranslationService;
|
translate: AlfrescoTranslationService;
|
||||||
|
@@ -0,0 +1,62 @@
|
|||||||
|
/*!
|
||||||
|
* @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 '@angular/core';
|
||||||
|
import {
|
||||||
|
CONTEXT_MENU_DIRECTIVES
|
||||||
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
|
import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'alfresco-webscript-demo',
|
||||||
|
template: `
|
||||||
|
<label for="token"><b>Insert a scriptPath</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="scriptPath"><br>
|
||||||
|
<label for="token"><b>Insert a contextRoot</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="contextRoot"><br>
|
||||||
|
<label for="token"><b>Insert a servicePath</b></label><br>
|
||||||
|
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
||||||
|
<alfresco-webscript-get [scriptPath]="scriptPath"
|
||||||
|
[scriptArgs]="scriptArgs"
|
||||||
|
[contextRoot]="contextRoot"
|
||||||
|
[servicePath]="servicePath"
|
||||||
|
[contentType]="'HTML'"
|
||||||
|
(onSuccess)= "logData($event)"></alfresco-webscript-get>
|
||||||
|
`,
|
||||||
|
directives: [WEBSCRIPTCOMPONENT, CONTEXT_MENU_DIRECTIVES]
|
||||||
|
})
|
||||||
|
export class WebscriptComponent {
|
||||||
|
|
||||||
|
currentPath: string = '/';
|
||||||
|
|
||||||
|
authenticated: boolean;
|
||||||
|
|
||||||
|
host: string = 'http://127.0.0.1:8080';
|
||||||
|
|
||||||
|
scriptPath: string = 'sample/folder/Company%20Home';
|
||||||
|
|
||||||
|
contextRoot: string = 'alfresco';
|
||||||
|
|
||||||
|
servicePath: string = 'service';
|
||||||
|
|
||||||
|
scriptArgs: string = '';
|
||||||
|
|
||||||
|
logData(data) {
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
}
|
@@ -18,7 +18,8 @@ browserSync.init({
|
|||||||
'node_modules/ng2-alfresco-login/dist/**/*.{html,htm,css,js}',
|
'node_modules/ng2-alfresco-login/dist/**/*.{html,htm,css,js}',
|
||||||
'node_modules/ng2-alfresco-search/dist/**/*.{html,htm,css,js}',
|
'node_modules/ng2-alfresco-search/dist/**/*.{html,htm,css,js}',
|
||||||
'node_modules/ng2-alfresco-upload/dist/**/*.{html,htm,css,js}',
|
'node_modules/ng2-alfresco-upload/dist/**/*.{html,htm,css,js}',
|
||||||
'node_modules/ng2-alfresco-viewer/dist/**/*.{html,htm,css,js}'],
|
'node_modules/ng2-alfresco-viewer/dist/**/*.{html,htm,css,js}',
|
||||||
|
'node_modules/ng2-alfresco-webscript/dist/**/*.{html,htm,css,js}'],
|
||||||
|
|
||||||
reloadDelay: 1000
|
reloadDelay: 1000
|
||||||
});
|
});
|
||||||
|
@@ -81,7 +81,8 @@
|
|||||||
"ng2-alfresco-login": "0.2.0",
|
"ng2-alfresco-login": "0.2.0",
|
||||||
"ng2-alfresco-search": "0.2.0",
|
"ng2-alfresco-search": "0.2.0",
|
||||||
"ng2-alfresco-upload": "0.2.0",
|
"ng2-alfresco-upload": "0.2.0",
|
||||||
"ng2-alfresco-viewer": "0.2.0"
|
"ng2-alfresco-viewer": "0.2.0",
|
||||||
|
"ng2-alfresco-webscript": "0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browser-sync": "2.10.0",
|
"browser-sync": "2.10.0",
|
||||||
|
@@ -17,7 +17,8 @@
|
|||||||
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login/dist',
|
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login/dist',
|
||||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search/dist',
|
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search/dist',
|
||||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload/dist',
|
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload/dist',
|
||||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer/dist'
|
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'node_modules/ng2-alfresco-webscript/dist'
|
||||||
};
|
};
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
// packages tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
var packages = {
|
||||||
@@ -33,7 +34,8 @@
|
|||||||
'ng2-alfresco-login': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-login': { main: 'index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-search': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-search': { main: 'index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-upload': { main: 'index.js', defaultExtension: 'js'},
|
'ng2-alfresco-upload': { main: 'index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-viewer': { main: 'index.js', defaultExtension: 'js'}
|
'ng2-alfresco-viewer': { main: 'index.js', defaultExtension: 'js'},
|
||||||
|
'ng2-alfresco-webscript': { main: 'index.js', defaultExtension: 'js'}
|
||||||
};
|
};
|
||||||
var ngPackageNames = [
|
var ngPackageNames = [
|
||||||
'common',
|
'common',
|
||||||
|
@@ -53,7 +53,7 @@ import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
|
|||||||
[servicePath]="servicePath"
|
[servicePath]="servicePath"
|
||||||
[contentType]="'HTML'"
|
[contentType]="'HTML'"
|
||||||
(onSuccess)= "logData($event)"></alfresco-webscript-get>
|
(onSuccess)= "logData($event)"></alfresco-webscript-get>
|
||||||
</div>{{prova}}
|
</div>
|
||||||
`,
|
`,
|
||||||
directives: [WEBSCRIPTCOMPONENT, CONTEXT_MENU_DIRECTIVES]
|
directives: [WEBSCRIPTCOMPONENT, CONTEXT_MENU_DIRECTIVES]
|
||||||
})
|
})
|
||||||
@@ -75,8 +75,6 @@ class WebscriptDemo implements OnInit {
|
|||||||
|
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
prova: string;
|
|
||||||
|
|
||||||
constructor(private authService: AlfrescoAuthenticationService,
|
constructor(private authService: AlfrescoAuthenticationService,
|
||||||
private alfrescoSettingsService: AlfrescoSettingsService) {
|
private alfrescoSettingsService: AlfrescoSettingsService) {
|
||||||
|
|
||||||
|
@@ -9,7 +9,8 @@ for PACKAGE in \
|
|||||||
ng2-alfresco-login \
|
ng2-alfresco-login \
|
||||||
ng2-alfresco-search \
|
ng2-alfresco-search \
|
||||||
ng2-alfresco-upload \
|
ng2-alfresco-upload \
|
||||||
ng2-alfresco-viewer
|
ng2-alfresco-viewer \
|
||||||
|
ng2-alfresco-webscript
|
||||||
do
|
do
|
||||||
echo "====== clean component: ${PACKAGE} ====="
|
echo "====== clean component: ${PACKAGE} ====="
|
||||||
cd "$DIR/../ng2-components/${PACKAGE}"
|
cd "$DIR/../ng2-components/${PACKAGE}"
|
||||||
|
@@ -20,12 +20,20 @@ npm link ng2-alfresco-core
|
|||||||
npm link ng2-alfresco-datatable
|
npm link ng2-alfresco-datatable
|
||||||
npm link
|
npm link
|
||||||
|
|
||||||
|
#LINK WEBSCRIPT
|
||||||
|
echo "====== linking component: ng2-alfresco-webscript ====="
|
||||||
|
cd "$DIR/../ng2-components/ng2-alfresco-webscript"
|
||||||
|
npm link ng2-alfresco-core
|
||||||
|
npm link ng2-alfresco-datatable
|
||||||
|
npm link
|
||||||
|
|
||||||
#LINK ALL THE OTHERS COMPONENTS
|
#LINK ALL THE OTHERS COMPONENTS
|
||||||
for PACKAGE in \
|
for PACKAGE in \
|
||||||
ng2-alfresco-login \
|
ng2-alfresco-login \
|
||||||
ng2-alfresco-search \
|
ng2-alfresco-search \
|
||||||
ng2-alfresco-upload \
|
ng2-alfresco-upload \
|
||||||
ng2-alfresco-viewer
|
ng2-alfresco-viewer \
|
||||||
|
ng2-alfresco-webscript
|
||||||
do
|
do
|
||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
echo "====== linking component: ${PACKAGE} ====="
|
echo "====== linking component: ${PACKAGE} ====="
|
||||||
@@ -44,7 +52,8 @@ for PACKAGE in \
|
|||||||
ng2-alfresco-login \
|
ng2-alfresco-login \
|
||||||
ng2-alfresco-search \
|
ng2-alfresco-search \
|
||||||
ng2-alfresco-upload \
|
ng2-alfresco-upload \
|
||||||
ng2-alfresco-viewer
|
ng2-alfresco-viewer \
|
||||||
|
ng2-alfresco-webscript
|
||||||
do
|
do
|
||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
echo "====== demo shell linking: ${PACKAGE} ====="
|
echo "====== demo shell linking: ${PACKAGE} ====="
|
||||||
|
@@ -11,7 +11,8 @@ for PACKAGE in \
|
|||||||
ng2-alfresco-login \
|
ng2-alfresco-login \
|
||||||
ng2-alfresco-search \
|
ng2-alfresco-search \
|
||||||
ng2-alfresco-upload \
|
ng2-alfresco-upload \
|
||||||
ng2-alfresco-viewer
|
ng2-alfresco-viewer \
|
||||||
|
ng2-alfresco-webscript
|
||||||
do
|
do
|
||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
echo "====== PUBLISHING: ${DESTDIR} ====="
|
echo "====== PUBLISHING: ${DESTDIR} ====="
|
||||||
|
@@ -21,7 +21,8 @@ for PACKAGE in \
|
|||||||
ng2-alfresco-login \
|
ng2-alfresco-login \
|
||||||
ng2-alfresco-search \
|
ng2-alfresco-search \
|
||||||
ng2-alfresco-upload \
|
ng2-alfresco-upload \
|
||||||
ng2-alfresco-viewer
|
ng2-alfresco-viewer \
|
||||||
|
ng2-alfresco-webscript
|
||||||
do
|
do
|
||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
echo "====== UPDATE VERSION of ${PACKAGE} to ${VERSION} version in all the package.json ======"
|
echo "====== UPDATE VERSION of ${PACKAGE} to ${VERSION} version in all the package.json ======"
|
||||||
@@ -35,7 +36,8 @@ for PACKAGE in \
|
|||||||
ng2-alfresco-login \
|
ng2-alfresco-login \
|
||||||
ng2-alfresco-search \
|
ng2-alfresco-search \
|
||||||
ng2-alfresco-upload \
|
ng2-alfresco-upload \
|
||||||
ng2-alfresco-viewer
|
ng2-alfresco-viewer \
|
||||||
|
ng2-alfresco-webscript
|
||||||
do
|
do
|
||||||
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
DESTDIR="$DIR/../ng2-components/${PACKAGE}"
|
||||||
echo "====== UPDATE VERSION OF ${PACKAGE} to ${VERSION} version ======"
|
echo "====== UPDATE VERSION OF ${PACKAGE} to ${VERSION} version ======"
|
||||||
|
Reference in New Issue
Block a user