#seConfirmDialog alert change to elix alert dialog
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user