Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/user_callout.js')
-rw-r--r--app/assets/javascripts/user_callout.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/assets/javascripts/user_callout.js b/app/assets/javascripts/user_callout.js
index 96dfff77859..df00f38dd70 100644
--- a/app/assets/javascripts/user_callout.js
+++ b/app/assets/javascripts/user_callout.js
@@ -21,16 +21,17 @@ export default class UserCallout {
dismissCallout(e) {
const $currentTarget = $(e.currentTarget);
+ const cookieOptions = {};
+ if (!$currentTarget.hasClass('js-close-session')) {
+ cookieOptions.expires = 365;
+ }
if (this.options.setCalloutPerProject) {
- Cookies.set(this.cookieName, 'true', {
- expires: 365,
- path: this.userCalloutBody.data('projectPath'),
- });
- } else {
- Cookies.set(this.cookieName, 'true', { expires: 365 });
+ cookieOptions.path = this.userCalloutBody.data('projectPath');
}
+ Cookies.set(this.cookieName, 'true', cookieOptions);
+
if ($currentTarget.hasClass('close') || $currentTarget.hasClass('js-close')) {
this.userCalloutBody.remove();
}