(js) Simplify Dialog service

pull/91/head
Francis Lachapelle 2015-06-04 14:37:33 -04:00
parent a1c493358f
commit b469045de8
1 changed files with 2 additions and 8 deletions

View File

@ -32,18 +32,12 @@
* @returns a promise that resolves if the user has clicked on the 'OK' button
*/
Dialog.confirm = function(title, content) {
var d = this.$q.defer(),
confirm = this.$modal.confirm()
var confirm = this.$modal.confirm()
.title(title)
.content(content)
.ok(l('OK'))
.cancel(l('Cancel'));
this.$modal.show(confirm).then(function() {
d.resolve();
}, function() {
d.reject();
});
return d.promise;
return this.$modal.show(confirm);
};
/**