Skip to content

Commit

Permalink
Confirm button for assets and references.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Sep 1, 2020
1 parent 2d6c88f commit 493a6de
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
4 changes: 4 additions & 0 deletions backend/i18n/frontend_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
"assets.protected": "Protected",
"assets.refreshTooltip": "Refresh Assets (CTRL + SHIFT + R)",
"assets.reloaded": "Assets reloaded.",
"assets.removeConfirmText": "Do you really want to remove the asset?",
"assets.removeConfirmTitle": "Remove asset",
"assets.renameFolder": "Rename Folder",
"assets.replaceConfirmText": "Do you really want to replace the asset with a newer version",
"assets.replaceConfirmTitle": "Replace asset?",
Expand Down Expand Up @@ -367,6 +369,8 @@
"contents.referencesSelectSchema": "Select {schema}",
"contents.refreshTooltip": "Refresh Contents (CTRL + SHIFT + R)",
"contents.reloaded": "Contents reloaded.",
"contents.removeConfirmText": "Do you really want to remove the content?",
"contents.removeConfirmTitle": "Remove content",
"contents.saveAndPublish": "Save and Publish",
"contents.scheduledAt": "at",
"contents.scheduledAtLabel": "at",
Expand Down
4 changes: 4 additions & 0 deletions backend/i18n/frontend_nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
"assets.protected": "Beschermd",
"assets.refreshTooltip": "Assets vernieuwen (CTRL + SHIFT + R)",
"assets.reloaded": "Bestanden herladen.",
"assets.removeConfirmText": "Do you really want to remove the asset?",
"assets.removeConfirmTitle": "Remove asset",
"assets.renameFolder": "Naam map wijzigen",
"assets.replaceConfirmText": "Wilt je de asset echt vervangen door een nieuwere versie",
"assets.replaceConfirmTitle": "Asset vervangen?",
Expand Down Expand Up @@ -367,6 +369,8 @@
"contents.referencesSelectSchema": "Selecteer {scheme}",
"contents.refreshTooltip": "Ververs inhoud (CTRL + SHIFT + R)",
"contents.reloaded": "Inhoud opnieuw geladen.",
"contents.removeConfirmText": "Do you really want to remove the content?",
"contents.removeConfirmTitle": "Remove content",
"contents.saveAndPublish": "Opslaan en publiceren",
"contents.scheduledAt": "bij",
"contents.scheduledAtLabel": "bij",
Expand Down
4 changes: 4 additions & 0 deletions backend/i18n/source/frontend_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
"assets.protected": "Protected",
"assets.refreshTooltip": "Refresh Assets (CTRL + SHIFT + R)",
"assets.reloaded": "Assets reloaded.",
"assets.removeConfirmText": "Do you really want to remove the asset?",
"assets.removeConfirmTitle": "Remove asset",
"assets.renameFolder": "Rename Folder",
"assets.replaceConfirmText": "Do you really want to replace the asset with a newer version",
"assets.replaceConfirmTitle": "Replace asset?",
Expand Down Expand Up @@ -367,6 +369,8 @@
"contents.referencesSelectSchema": "Select {schema}",
"contents.refreshTooltip": "Refresh Contents (CTRL + SHIFT + R)",
"contents.reloaded": "Contents reloaded.",
"contents.removeConfirmText": "Do you really want to remove the content?",
"contents.removeConfirmTitle": "Remove content",
"contents.saveAndPublish": "Save and Publish",
"contents.scheduledAt": "at",
"contents.scheduledAtLabel": "at",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
<i class="icon-pencil"></i>
</a>

<button type="button" class="btn btn-text-secondary" (click)="delete.emit()">
<button type="button" class="btn btn-text-secondary"
(sqxConfirmClick)="delete.emit()"
confirmTitle="i18n:contents.removeConfirmTitle"
confirmText="i18n:contents.removeConfirmText">
<i class="icon-close"></i>
</button>
</div>
Expand Down
10 changes: 8 additions & 2 deletions frontend/app/shared/components/assets/asset.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
<i class="icon-delete"></i>
</a>

<a class="file-delete ml-2" (click)="remove.emit()" *ngIf="removeMode">
<a class="file-delete ml-2" *ngIf="removeMode"
(sqxConfirmClick)="delete.emit()"
confirmTitle="i18n:assets.removeConfirmTitle"
confirmText="i18n:assets.removeConfirmText">
<i class="icon-close"></i>
</a>
</ng-container>
Expand Down Expand Up @@ -131,7 +134,10 @@
<i class="icon-bin2"></i>
</button>

<button type="button" class="btn btn-text-secondary" (click)="remove.emit()" *ngIf="removeMode">
<button type="button" class="btn btn-text-secondary" *ngIf="removeMode"
(sqxConfirmClick)="delete.emit()"
confirmTitle="i18n:contents.removeConfirmTitle"
confirmText="i18n:contents.removeConfirmText">
<i class="icon-close"></i>
</button>
</td>
Expand Down
4 changes: 0 additions & 4 deletions frontend/app/shared/components/assets/asset.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ img {
cursor: pointer;
}

.icon-close {
font-size: .6rem;
}

.tag {
background: $color-border;
border: 0;
Expand Down

0 comments on commit 493a6de

Please sign in to comment.