#seConfirmDialog alert change to elix alert dialog

This commit is contained in:
Agriya Dev5
2020-12-28 20:10:06 +05:30
parent dc0e7f5fc8
commit 4104372a37
10 changed files with 81 additions and 23 deletions

View File

@@ -156,7 +156,7 @@ class LayersPanel {
const newName = prompt(this.uiStrings.notification.enterUniqueLayerName, uniqName);
if (!newName) { return; }
if (this.svgCanvas.getCurrentDrawing().hasLayer(newName)) {
alert(this.uiStrings.notification.dupeLayerName);
document.getElementById('se-alert-dialog').title = this.uiStrings.notification.dupeLayerName;
return;
}
this.svgCanvas.createLayer(newName);
@@ -190,7 +190,7 @@ class LayersPanel {
const newName = prompt(this.uiStrings.notification.enterUniqueLayerName, name);
if (!newName) { return; }
if (this.svgCanvas.getCurrentDrawing().hasLayer(newName)) {
alert(this.uiStrings.notification.dupeLayerName);
document.getElementById('se-alert-dialog').title = this.uiStrings.notification.dupeLayerName;
return;
}
this.svgCanvas.cloneLayer(newName);
@@ -235,7 +235,7 @@ class LayersPanel {
const newName = prompt(this.uiStrings.notification.enterNewLayerName, '');
if (!newName) { return; }
if (oldName === newName || this.svgCanvas.getCurrentDrawing().hasLayer(newName)) {
alert(this.uiStrings.notification.layerHasThatName);
document.getElementById('se-alert-dialog').title = this.uiStrings.notification.layerHasThatName;
return;
}
this.svgCanvas.renameCurrentLayer(newName);

View File

@@ -403,8 +403,7 @@ class TopPanelHandlers {
if (!valid) {
e.target.value = this.selectedElement().getAttribute(attr);
// eslint-disable-next-line no-alert
alert(this.uiStrings.notification.invalidAttrValGiven);
document.getElementById('se-alert-dialog').title = this.uiStrings.notification.invalidAttrValGiven;
return false;
}