From b469045de84b48bd832545ebb875ce53c1fa1e03 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 4 Jun 2015 14:37:33 -0400 Subject: [PATCH] (js) Simplify Dialog service --- UI/WebServerResources/js/Common/Dialog.service.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/UI/WebServerResources/js/Common/Dialog.service.js b/UI/WebServerResources/js/Common/Dialog.service.js index 8d1a5a86d..76db73cea 100644 --- a/UI/WebServerResources/js/Common/Dialog.service.js +++ b/UI/WebServerResources/js/Common/Dialog.service.js @@ -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); }; /**