mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-18 23:08:14 +00:00
Merge pull request #271 from GNS3/Consistance-of-dialogs-style
Styles for dialogs edited
This commit is contained in:
@ -60,6 +60,7 @@ export class TextEditorComponent implements OnInit, OnDestroy {
|
|||||||
);
|
);
|
||||||
this.deactivateTextAdding();
|
this.deactivateTextAdding();
|
||||||
this.innerText = '';
|
this.innerText = '';
|
||||||
|
this.temporaryTextElement.nativeElement.innerText = '';
|
||||||
this.temporaryTextElement.nativeElement.removeEventListener('focusout', this.textListener);
|
this.temporaryTextElement.nativeElement.removeEventListener('focusout', this.textListener);
|
||||||
this.renderer.setStyle(this.temporaryTextElement.nativeElement, 'display', 'none');
|
this.renderer.setStyle(this.temporaryTextElement.nativeElement, 'display', 'none');
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@ export class EditStyleActionComponent implements OnInit {
|
|||||||
|
|
||||||
editStyle() {
|
editStyle() {
|
||||||
const dialogRef = this.dialog.open(StyleEditorDialogComponent, {
|
const dialogRef = this.dialog.open(StyleEditorDialogComponent, {
|
||||||
width: '450px'
|
width: '300px'
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -20,7 +20,7 @@ export class EditTextActionComponent implements OnInit {
|
|||||||
|
|
||||||
editText() {
|
editText() {
|
||||||
const dialogRef = this.dialog.open(TextEditorDialogComponent, {
|
const dialogRef = this.dialog.open(TextEditorDialogComponent, {
|
||||||
width: '450px'
|
width: '300px'
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -1,24 +1,27 @@
|
|||||||
<h1 mat-dialog-title>Style editor</h1>
|
<h1 mat-dialog-title>Style editor</h1>
|
||||||
<span *ngIf="element.fill" class="item">
|
|
||||||
<div class="item-name">Fill color:</div>
|
<div class="modal-form-container">
|
||||||
<input class="input-color" type="color" [(ngModel)]="element.fill" />
|
<mat-form-field>
|
||||||
</span>
|
<input matInput placeholder="Fill color" type="color" [(ngModel)]="element.fill">
|
||||||
<span class="item">
|
</mat-form-field>
|
||||||
<div class="item-name">Border color:</div>
|
|
||||||
<input class="input-color" type="color" [(ngModel)]="element.stroke" />
|
<mat-form-field>
|
||||||
</span>
|
<input matInput placeholder="Fill color" type="color" [(ngModel)]="element.stroke">
|
||||||
<span class="item">
|
</mat-form-field>
|
||||||
<div class="item-name">Border width:</div>
|
|
||||||
<input class="item-value" matInput type="text" [(ngModel)]="element.stroke_width" />
|
<mat-form-field>
|
||||||
</span>
|
<input matInput placeholder="Border width" type="text" [(ngModel)]="element.stroke_width">
|
||||||
<span *ngIf="element.stroke_dasharray" class="item">
|
</mat-form-field>
|
||||||
<div class="item-name">Border style:</div>
|
|
||||||
<input class="item-value" matInput type="text" [(ngModel)]="element.stroke_dasharray" />
|
<mat-form-field *ngIf="element.stroke_dasharray">
|
||||||
</span>
|
<input matInput placeholder="Border style" type="text" [(ngModel)]="element.stroke_dasharray">
|
||||||
<span class="item">
|
</mat-form-field>
|
||||||
<div class="item-name">Rotation:</div>
|
|
||||||
<input class="item-value" matInput type="text" [(ngModel)]="rotation" />
|
<mat-form-field>
|
||||||
</span>
|
<input matInput placeholder="Rotation" type="text" [(ngModel)]="rotation">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div mat-dialog-actions>
|
<div mat-dialog-actions>
|
||||||
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
||||||
<button mat-button (click)="onYesClick()" tabindex="2" mat-raised-button color="primary">Apply</button>
|
<button mat-button (click)="onYesClick()" tabindex="2" mat-raised-button color="primary">Apply</button>
|
||||||
|
@ -1,25 +1,22 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
|
||||||
height: 25px;
|
height: 25px;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-name {
|
.item-name {
|
||||||
width: 30%;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-value {
|
.item-value {
|
||||||
width: 70%;
|
width: 100%;
|
||||||
margin: 3px;
|
margin-bottom: 10px;
|
||||||
margin-right: 4px;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-color {
|
.input-color {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
width: 70%;
|
width: 100%;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@ -27,3 +24,26 @@
|
|||||||
input:focus {
|
input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="color"] {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border: none;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="color"]::-webkit-color-swatch-wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="color"]::-webkit-color-swatch {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-form-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-form-container > * {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
<h1 mat-dialog-title>Text editor</h1>
|
<h1 mat-dialog-title>Text editor</h1>
|
||||||
<span *ngIf="element.fill" class="item">
|
|
||||||
<div class="item-name">Fill color:</div>
|
<div class="modal-form-container">
|
||||||
<input class="input-color" type="color" (ngModelChange)="changeTextColor($event)" [(ngModel)]="element.fill" />
|
<mat-form-field>
|
||||||
</span>
|
<input matInput placeholder="Fill color" type="color" (ngModelChange)="changeTextColor($event)" [(ngModel)]="element.fill">
|
||||||
<span class="item">
|
</mat-form-field>
|
||||||
<div class="item-name">Rotation:</div>
|
|
||||||
<input class="item-value" matInput type="text" [(ngModel)]="rotation" />
|
<mat-form-field>
|
||||||
</span>
|
<input matInput placeholder="Rotation" type="text" [(ngModel)]="rotation">
|
||||||
<span> <textarea #textArea id="textArea" class="text" [(ngModel)]="element.text"> </textarea> </span>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<textarea #textArea id="textArea" class="text" [(ngModel)]="element.text"> </textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div mat-dialog-actions>
|
<div mat-dialog-actions>
|
||||||
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
||||||
<button mat-button (click)="onYesClick()" tabindex="2" mat-raised-button color="primary">Apply</button>
|
<button mat-button (click)="onYesClick()" tabindex="2" mat-raised-button color="primary">Apply</button>
|
||||||
|
@ -1,24 +1,22 @@
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
|
||||||
height: 25px;
|
height: 25px;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-name {
|
.item-name {
|
||||||
width: 30%;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-value {
|
.item-value {
|
||||||
width: 70%;
|
width: 100%;
|
||||||
margin-top: 3px;
|
margin-bottom: 10px;
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-color {
|
.input-color {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
width: 70%;
|
width: 100%;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@ -27,7 +25,30 @@ input:focus {
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="color"] {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border: none;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="color"]::-webkit-color-swatch-wrapper {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="color"]::-webkit-color-swatch {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-form-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-form-container > * {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
@ -207,6 +207,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setUpMapCallbacks() {
|
setUpMapCallbacks() {
|
||||||
|
if (!this.readonly) {
|
||||||
|
this.toolsService.selectionToolActivation(true);
|
||||||
|
}
|
||||||
|
|
||||||
const onNodeContextMenu = this.nodeWidget.onContextMenu.subscribe((eventNode: NodeContextMenu) => {
|
const onNodeContextMenu = this.nodeWidget.onContextMenu.subscribe((eventNode: NodeContextMenu) => {
|
||||||
const node = this.mapNodeToNode.convert(eventNode.node);
|
const node = this.mapNodeToNode.convert(eventNode.node);
|
||||||
this.contextMenu.openMenuForNode(node, eventNode.event.clientY, eventNode.event.clientX);
|
this.contextMenu.openMenuForNode(node, eventNode.event.clientY, eventNode.event.clientX);
|
||||||
@ -219,7 +223,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
const onContextMenu = this.selectionTool.contextMenuOpened.subscribe((event) => {
|
const onContextMenu = this.selectionTool.contextMenuOpened.subscribe((event) => {
|
||||||
const selectedItems = this.selectionManager.getSelected();
|
const selectedItems = this.selectionManager.getSelected();
|
||||||
if (selectedItems.length === 0) return;
|
if (selectedItems.length === 0 || !(event instanceof MouseEvent)) return;
|
||||||
|
|
||||||
let drawings: Drawing[] = [];
|
let drawings: Drawing[] = [];
|
||||||
let nodes: Node[] = [];
|
let nodes: Node[] = [];
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.file-button{
|
.file-button{
|
||||||
height: 50px;
|
width: 100%;
|
||||||
width: 20%;
|
margin-top: 5px;
|
||||||
margin-top: 10px;
|
margin-bottom: 10px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,8 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.file-name-form-field {
|
.file-name-form-field {
|
||||||
margin-left: 5%;
|
width: 100%;
|
||||||
width: 65%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-button {
|
.delete-button {
|
||||||
|
@ -109,7 +109,7 @@ export class ProjectsComponent implements OnInit {
|
|||||||
|
|
||||||
addBlankProject() {
|
addBlankProject() {
|
||||||
const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, {
|
const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, {
|
||||||
width: '550px'
|
width: '400px'
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
@ -117,7 +117,7 @@ export class ProjectsComponent implements OnInit {
|
|||||||
|
|
||||||
importProject() {
|
importProject() {
|
||||||
const dialogRef = this.dialog.open(ImportProjectDialogComponent, {
|
const dialogRef = this.dialog.open(ImportProjectDialogComponent, {
|
||||||
width: '550px'
|
width: '400px'
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -16,6 +16,10 @@ a.table-link {
|
|||||||
color: white!important;
|
color: white!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mat-dialog-actions {
|
||||||
|
margin-bottom: -12px!important;
|
||||||
|
}
|
||||||
|
|
||||||
@-moz-document url-prefix() {
|
@-moz-document url-prefix() {
|
||||||
.temporaryElement{
|
.temporaryElement{
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
|
Reference in New Issue
Block a user