Skip to content

Commit

Permalink
#53 application deleted confirm.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasar icli committed Mar 3, 2016
1 parent 1d8e03b commit 2e6a3ff
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 5 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ pmteor:sparkline
bshamblen:morrisjs
random
pmteor:dev
kevohagan:sweetalert
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jparker:[email protected]
[email protected]
juliancwirko:[email protected]
juliancwirko:[email protected]
kevohagan:[email protected]
lai:[email protected]_1
[email protected]
lbee:[email protected]
Expand Down
23 changes: 22 additions & 1 deletion client/components/applications/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,31 @@ Template.applications.events({
Meteor.call('stop', this._id);
},
'click .delete'() {
Meteor.call('delete', this._id);
swal({
title: TAPi18n.__('are-you-sure-title'),
text: TAPi18n.__('are-you-sure-text'),
type: "warning",
showCancelButton: true,
confirmButtonColor: "#f05050",
confirmButtonText: TAPi18n.__('delete-confirm'),
closeOnConfirm: false,
showLoaderOnConfirm: true,
html: false
}, () => {
Meteor.call('delete', this._id, () => {
swal({
title: TAPi18n.__('deleted-application-title'),
text: TAPi18n.__('deleted-application-text'),
type: "success",
confirmButtonColor: "#7266ba"
});
});
});
},
'click .absoluteUrl'(event) {
event.preventDefault();

// in container then go to click stop.
window.open(this.absoluteUrl());
}
});
Expand Down
1 change: 1 addition & 0 deletions client/styles/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@
@import "imports/circle.less";
@import "imports/avatar.less";
@import "imports/morris.less";
@import "imports/sweetalert.less";
@import "imports/pmteor.less";
9 changes: 7 additions & 2 deletions i18n/de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"change-password": "Passwort ändern",
"log-out": "Ausloggen",
"go-home-page": "Zurück zur Startseite",
"not-found": "We couldn't find this %s.",
"not-found-desc": "The page you are looking for does not exists."
"not-found": "Wir konnten nicht finden, diese %s.",
"not-found-desc": "Die Seite, die Sie suchen existiert nicht.",
"are-you-sure-title": "Bist du sicher?",
"are-you-sure-text": "Sie finden diese Anwendung nicht wiederhergestellt werden können!",
"delete-confirm": "Ja, löschen!",
"deleted-application-title": "Anwendung gelöscht!",
"deleted-application-text": "Ihre Bewerbung wurde gelöscht."
}
7 changes: 6 additions & 1 deletion i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@
"log-out": "Log Out",
"go-home-page": "go to home page",
"not-found": "We couldn't find this %s.",
"not-found-desc": "The page you are looking for does not exists."
"not-found-desc": "The page you are looking for does not exists.",
"are-you-sure-title": "Are you sure?",
"are-you-sure-text": "You will not be able to recover this application!",
"delete-confirm": "Yes, delete it!",
"deleted-application-title": "Application Deleted!",
"deleted-application-text": "Your application has been deleted."
}
7 changes: 6 additions & 1 deletion i18n/tr.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@
"log-out": "Çıkış yap",
"go-home-page": "ana sayfa ya git",
"not-found": "We couldn't find this %s.",
"not-found-desc": "The page you are looking for does not exists."
"not-found-desc": "The page you are looking for does not exists.",
"are-you-sure-title": "Emin misiniz",
"are-you-sure-text": "Bu uygulamayı silerseniz birdaha geri dönüşümü olmayacaktır!",
"delete-confirm": "Evet, silmek istiyorum!",
"deleted-application-title": "Uygulama silindi.",
"deleted-application-text": "Uygulamanız kalıcı olarak silinmiştir!"
}

0 comments on commit 2e6a3ff

Please sign in to comment.