From 650a6ffc9d04558b8ecaadd487b5af6e8b682996 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 27 Jan 2015 21:52:45 -0800 Subject: [PATCH] CRM-15855 - crmMailing - After explicitly saving a draft, leave. --- js/angular-crm-util.js | 2 +- js/angular-crmMailing.js | 8 ++++---- partials/crmMailing/edit-unified.html | 2 +- partials/crmMailing/edit-unified2.html | 2 +- partials/crmMailing/edit-wizard.html | 2 +- partials/crmMailing/edit.html | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/angular-crm-util.js b/js/angular-crm-util.js index f122c9c8e4..2d840e2d9b 100644 --- a/js/angular-crm-util.js +++ b/js/angular-crm-util.js @@ -43,7 +43,7 @@ var blocks = 0; var result = function(promise) { blocks++; - promise.finally(function() { + return promise.finally(function() { blocks--; }); }; diff --git a/js/angular-crmMailing.js b/js/angular-crmMailing.js index 668cf554be..5bad720dd3 100644 --- a/js/angular-crmMailing.js +++ b/js/angular-crmMailing.js @@ -111,7 +111,7 @@ return crmMailingMgr.submit($scope.mailing); }) .then(function () { - leave('scheduled'); + $scope.leave('scheduled'); }) ; return block(crmStatus({start: ts('Submitting...'), success: ts('Submitted')}, promise)); @@ -134,13 +134,13 @@ return block(crmStatus({start: ts('Deleting...'), success: ts('Deleted')}, crmMailingMgr.delete($scope.mailing) .then(function () { - leave('unscheduled'); + $scope.leave('unscheduled'); }) )); }; // @param string listingScreen 'archive', 'scheduled', 'unscheduled' - function leave(listingScreen) { + $scope.leave = function leave(listingScreen) { switch (listingScreen) { case 'archive': window.location = CRM.url('civicrm/mailing/browse/archived', { @@ -161,7 +161,7 @@ scheduled: 'false' }); } - } + }; }); // Controller for the edit-recipients fields ( diff --git a/partials/crmMailing/edit-unified.html b/partials/crmMailing/edit-unified.html index 24e497c67b..f423a098a9 100644 --- a/partials/crmMailing/edit-unified.html +++ b/partials/crmMailing/edit-unified.html @@ -46,7 +46,7 @@ - + diff --git a/partials/crmMailing/edit-unified2.html b/partials/crmMailing/edit-unified2.html index 1d1916086c..6ccc6999c9 100644 --- a/partials/crmMailing/edit-unified2.html +++ b/partials/crmMailing/edit-unified2.html @@ -42,7 +42,7 @@ - + diff --git a/partials/crmMailing/edit-wizard.html b/partials/crmMailing/edit-wizard.html index 7bda0d62c8..50d0f44e97 100644 --- a/partials/crmMailing/edit-wizard.html +++ b/partials/crmMailing/edit-wizard.html @@ -64,7 +64,7 @@ - + diff --git a/partials/crmMailing/edit.html b/partials/crmMailing/edit.html index 6c33c71554..4cf76b6abe 100644 --- a/partials/crmMailing/edit.html +++ b/partials/crmMailing/edit.html @@ -61,7 +61,7 @@ - + -- 2.25.1