diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2017-08-31 19:43:52 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2017-08-31 19:43:52 +0800 |
commit | e0597dc5b0a3718aa3b5991a65096c609d23dba2 (patch) | |
tree | f7b258112dfae0be3a51e5e6ea08189ce28f63fd /sdc-workflow-designer-ui/src/app/components/menus | |
parent | 626d74e4c51aa47da5d5d643b5b7a04188b5552a (diff) |
change component structure
separate bpmn elements from toolbar component, and add rest task and gateway elements.
Issue-ID: SDC-266
Change-Id: I5aabe92b161a44bfc24290e93cd80b8d73dbe963
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/components/menus')
4 files changed, 108 insertions, 0 deletions
diff --git a/sdc-workflow-designer-ui/src/app/components/menus/menu.component.css b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.css new file mode 100644 index 00000000..2fa48afa --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.css @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ + +.btn-right{ + float: right; +} + +button i{ + padding-right: 3px; +} diff --git a/sdc-workflow-designer-ui/src/app/components/menus/menu.component.html b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.html new file mode 100644 index 00000000..edee3618 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.html @@ -0,0 +1,20 @@ +<!-- +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +--> + +<div class="btn-right"> + <button type="button" class="btn white" (click)="save()" [disabled]="!canSave"> + <i class="fa fa-save"></i>Save + </button> + <!-- <button type="button" class="btn white" (click)="test()">test</button> --> +</div> diff --git a/sdc-workflow-designer-ui/src/app/components/menus/menu.component.spec.ts b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.spec.ts new file mode 100644 index 00000000..52f2c772 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.spec.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MenuComponent } from './menu.component'; + +describe('MenuComponent', () => { + let component: MenuComponent; + let fixture: ComponentFixture<MenuComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MenuComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MenuComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should be created', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/sdc-workflow-designer-ui/src/app/components/menus/menu.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.ts new file mode 100644 index 00000000..347f1a24 --- /dev/null +++ b/sdc-workflow-designer-ui/src/app/components/menus/menu.component.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2017 ZTE Corporation. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and the Apache License 2.0 which both accompany this distribution, + * and are available at http://www.eclipse.org/legal/epl-v10.html + * and http://www.apache.org/licenses/LICENSE-2.0 + * + * Contributors: + * ZTE - initial API and implementation and/or initial documentation + */ +import { Component, OnInit, ViewChild } from '@angular/core'; + +import { WorkflowService } from '../../services/workflow.service'; + +@Component({ + selector: 'b4t-menu', + templateUrl: './menu.component.html', + styleUrls: ['./menu.component.css'] +}) +export class MenuComponent { + + public canSave = true; + + constructor(private workflowService: WorkflowService) { } + + public save(): void { + this.workflowService.save(); + } + + public test() { + } +} |