mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-13 12:38:09 +00:00
Disable click outside of angular material dialog area to close the dialog
This commit is contained in:
@ -9,7 +9,8 @@ export class ProgressDialogService {
|
|||||||
public open() {
|
public open() {
|
||||||
const ref = this.dialog.open(ProgressDialogComponent, {
|
const ref = this.dialog.open(ProgressDialogComponent, {
|
||||||
width: '250px',
|
width: '250px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,8 @@ export class DeleteTemplateComponent {
|
|||||||
data: {
|
data: {
|
||||||
templateName: templateName
|
templateName: templateName
|
||||||
},
|
},
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
||||||
|
@ -20,7 +20,8 @@ export class ChangeSymbolActionComponent implements OnInit {
|
|||||||
const dialogRef = this.dialog.open(ChangeSymbolDialogComponent, {
|
const dialogRef = this.dialog.open(ChangeSymbolDialogComponent, {
|
||||||
width: '1000px',
|
width: '1000px',
|
||||||
height: '500px',
|
height: '500px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -27,7 +27,8 @@ export class ConfigActionComponent {
|
|||||||
@Input() node: Node;
|
@Input() node: Node;
|
||||||
private conf = {
|
private conf = {
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
width: '800px'
|
width: '800px',
|
||||||
|
disableClose: true
|
||||||
};
|
};
|
||||||
dialogRef;
|
dialogRef;
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@ export class EditConfigActionComponent {
|
|||||||
const dialogRef = this.dialog.open(ConfigEditorDialogComponent, {
|
const dialogRef = this.dialog.open(ConfigEditorDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
height: '500px',
|
height: '500px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -25,7 +25,8 @@ export class EditStyleActionComponent implements OnChanges {
|
|||||||
editStyle() {
|
editStyle() {
|
||||||
const dialogRef = this.dialog.open(StyleEditorDialogComponent, {
|
const dialogRef = this.dialog.open(StyleEditorDialogComponent, {
|
||||||
width: '800px',
|
width: '800px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -29,7 +29,8 @@ export class EditTextActionComponent implements OnInit {
|
|||||||
editText() {
|
editText() {
|
||||||
const dialogRef = this.dialog.open(TextEditorDialogComponent, {
|
const dialogRef = this.dialog.open(TextEditorDialogComponent, {
|
||||||
width: '300px',
|
width: '300px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -26,7 +26,8 @@ export class ExportConfigActionComponent {
|
|||||||
} else {
|
} else {
|
||||||
const dialogRef = this.dialog.open(ConfigDialogComponent, {
|
const dialogRef = this.dialog.open(ConfigDialogComponent, {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
dialogRef.afterClosed().subscribe((configType: string) => {
|
dialogRef.afterClosed().subscribe((configType: string) => {
|
||||||
|
@ -27,7 +27,8 @@ export class ImportConfigActionComponent {
|
|||||||
if (this.node.node_type !== 'vpcs') {
|
if (this.node.node_type !== 'vpcs') {
|
||||||
const dialogRef = this.dialog.open(ConfigDialogComponent, {
|
const dialogRef = this.dialog.open(ConfigDialogComponent, {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
dialogRef.afterClosed().subscribe((configType: string) => {
|
dialogRef.afterClosed().subscribe((configType: string) => {
|
||||||
|
@ -20,7 +20,8 @@ export class PacketFiltersActionComponent {
|
|||||||
const dialogRef = this.dialog.open(PacketFiltersDialogComponent, {
|
const dialogRef = this.dialog.open(PacketFiltersDialogComponent, {
|
||||||
width: '900px',
|
width: '900px',
|
||||||
height: '400px',
|
height: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -17,7 +17,8 @@ export class ShowNodeActionComponent {
|
|||||||
showNode() {
|
showNode() {
|
||||||
const dialogRef = this.dialog.open(InfoDialogComponent, {
|
const dialogRef = this.dialog.open(InfoDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.node = this.node;
|
instance.node = this.node;
|
||||||
|
@ -19,7 +19,8 @@ export class StartCaptureActionComponent {
|
|||||||
startCapture() {
|
startCapture() {
|
||||||
const dialogRef = this.dialog.open(StartCaptureDialogComponent, {
|
const dialogRef = this.dialog.open(StartCaptureDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -35,7 +35,8 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
|
|||||||
|
|
||||||
private conf = {
|
private conf = {
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
width: '800px'
|
width: '800px',
|
||||||
|
disableClose: true
|
||||||
};
|
};
|
||||||
dialogRefQemuImageCreator;
|
dialogRefQemuImageCreator;
|
||||||
|
|
||||||
|
@ -80,7 +80,8 @@ export class PacketFiltersDialogComponent implements OnInit{
|
|||||||
onHelpClick() {
|
onHelpClick() {
|
||||||
const dialogRef = this.dialog.open(HelpDialogComponent, {
|
const dialogRef = this.dialog.open(HelpDialogComponent, {
|
||||||
width: '500px',
|
width: '500px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.title = 'Help for filters';
|
instance.title = 'Help for filters';
|
||||||
|
@ -50,7 +50,8 @@ export class ProjectMapMenuComponent implements OnInit, OnDestroy {
|
|||||||
public takeScreenshot() {
|
public takeScreenshot() {
|
||||||
const dialogRef = this.dialog.open(ScreenshotDialogComponent, {
|
const dialogRef = this.dialog.open(ScreenshotDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed().subscribe((result: Screenshot) => {
|
dialogRef.afterClosed().subscribe((result: Screenshot) => {
|
||||||
if (result) this.saveImage(result);
|
if (result) this.saveImage(result);
|
||||||
|
@ -702,7 +702,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
addNewProject() {
|
addNewProject() {
|
||||||
const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, {
|
const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
@ -711,7 +712,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
saveProject() {
|
saveProject() {
|
||||||
const dialogRef = this.dialog.open(SaveProjectDialogComponent, {
|
const dialogRef = this.dialog.open(SaveProjectDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
@ -721,7 +723,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
editProject() {
|
editProject() {
|
||||||
const dialogRef = this.dialog.open(EditProjectDialogComponent, {
|
const dialogRef = this.dialog.open(EditProjectDialogComponent, {
|
||||||
width: '600px',
|
width: '600px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
@ -732,7 +735,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
let uuid: string = '';
|
let uuid: string = '';
|
||||||
const dialogRef = this.dialog.open(ImportProjectDialogComponent, {
|
const dialogRef = this.dialog.open(ImportProjectDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -87,7 +87,8 @@ export class AddBlankProjectDialogComponent implements OnInit {
|
|||||||
data: {
|
data: {
|
||||||
existingProject: existingProject
|
existingProject: existingProject
|
||||||
},
|
},
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
||||||
|
@ -110,7 +110,8 @@ export class ImportProjectDialogComponent implements OnInit {
|
|||||||
data: {
|
data: {
|
||||||
existingProject: existingProject
|
existingProject: existingProject
|
||||||
},
|
},
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
||||||
|
@ -78,7 +78,8 @@ export class ProjectsComponent implements OnInit {
|
|||||||
const dialogRef = this.dialog.open(ConfigureGns3VMDialogComponent, {
|
const dialogRef = this.dialog.open(ConfigureGns3VMDialogComponent, {
|
||||||
width: '350px',
|
width: '350px',
|
||||||
height: '120px',
|
height: '120px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
dialogRef.afterClosed().subscribe((answer: boolean) => {
|
||||||
@ -149,7 +150,8 @@ export class ProjectsComponent implements OnInit {
|
|||||||
duplicate(project: Project) {
|
duplicate(project: Project) {
|
||||||
const dialogRef = this.dialog.open(ChooseNameDialogComponent, {
|
const dialogRef = this.dialog.open(ChooseNameDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
@ -162,7 +164,8 @@ export class ProjectsComponent implements OnInit {
|
|||||||
addBlankProject() {
|
addBlankProject() {
|
||||||
const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, {
|
const dialogRef = this.dialog.open(AddBlankProjectDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
@ -172,7 +175,8 @@ export class ProjectsComponent implements OnInit {
|
|||||||
let uuid: string = '';
|
let uuid: string = '';
|
||||||
const dialogRef = this.dialog.open(ImportProjectDialogComponent, {
|
const dialogRef = this.dialog.open(ImportProjectDialogComponent, {
|
||||||
width: '400px',
|
width: '400px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
let instance = dialogRef.componentInstance;
|
let instance = dialogRef.componentInstance;
|
||||||
instance.server = this.server;
|
instance.server = this.server;
|
||||||
|
@ -94,7 +94,8 @@ export class ServersComponent implements OnInit, OnDestroy {
|
|||||||
createModal() {
|
createModal() {
|
||||||
const dialogRef = this.dialog.open(AddServerDialogComponent, {
|
const dialogRef = this.dialog.open(AddServerDialogComponent, {
|
||||||
width: '350px',
|
width: '350px',
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(server => {
|
dialogRef.afterClosed().subscribe(server => {
|
||||||
|
@ -35,7 +35,8 @@ export class SnapshotMenuItemComponent implements OnInit {
|
|||||||
server: this.server,
|
server: this.server,
|
||||||
project: this.project
|
project: this.project
|
||||||
},
|
},
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(snapshot => {
|
dialogRef.afterClosed().subscribe(snapshot => {
|
||||||
|
@ -27,7 +27,8 @@ export class TemplateComponent implements OnInit {
|
|||||||
server: this.server,
|
server: this.server,
|
||||||
project: this.project
|
project: this.project
|
||||||
},
|
},
|
||||||
autoFocus: false
|
autoFocus: false,
|
||||||
|
disableClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe((nodeAddedEvent: NodeAddedEvent) => {
|
dialogRef.afterClosed().subscribe((nodeAddedEvent: NodeAddedEvent) => {
|
||||||
|
Reference in New Issue
Block a user