summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/user_callout.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/assets/javascripts/user_callout.js
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
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();
}