From a361c7ff72c5da64e5f787607afdb1e4b623c07a Mon Sep 17 00:00:00 2001 From: beregovoy68 Date: Fri, 2 Dec 2016 14:37:08 +0300 Subject: [PATCH] Fix for global dialogs. Now we clean up only popups with both classes modal and recyclable. --- src/index.html | 4 ++-- src/js/shared/dialog.service.js | 2 +- src/js/shared/shared.dialog.directive.js | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/index.html b/src/index.html index e7f6b8612f..13d5345866 100644 --- a/src/index.html +++ b/src/index.html @@ -233,7 +233,7 @@

NEW ACCOUNT - NOTICE

-
+

NOTICE

This feature is still under development and not active during the alpha release.

@@ -268,7 +268,7 @@

NOTICE

Backup -
+

ACCOUNT INFO BACKUP

Your account's basic information, click the COPY button in order to copy the contents to the clipboard or CLOSE to exit.


diff --git a/src/js/shared/dialog.service.js b/src/js/shared/dialog.service.js index f2a52cb2ef..0d5067921f 100644 --- a/src/js/shared/dialog.service.js +++ b/src/js/shared/dialog.service.js @@ -26,7 +26,7 @@ dialogs with outdated data */ this.cleanup = function () { - var result = $document.find('body > div.modal'); + var result = $document.find('body > div.modal.recyclable'); _.forEach(result, function (divNode) { divNode.remove(); }) diff --git a/src/js/shared/shared.dialog.directive.js b/src/js/shared/shared.dialog.directive.js index 12d5d76b9e..f691179c86 100644 --- a/src/js/shared/shared.dialog.directive.js +++ b/src/js/shared/shared.dialog.directive.js @@ -41,6 +41,9 @@ function WavesDialogLink(scope, element, attrs, controller) { element.addClass('wavesPop'); + + if (!scope.global) + element.addClass('recyclable'); } angular @@ -61,7 +64,8 @@ okButtonCaption: '@', okButtonEnabled: '=?', cancelButtonCaption: '@', - isError: '=?' + isError: '=?', + global: '=?' }, link: WavesDialogLink, template: '' +