Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
f8520f5d
Commit
f8520f5d
authored
8 years ago
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove manual Cookie.set "path" option in favor of global setting
parent
1c0213f2
No related merge requests found
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
9 additions
and
53 deletions
+9
-53
app/assets/javascripts/activities.js
app/assets/javascripts/activities.js
+1
-3
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+1
-4
app/assets/javascripts/cycle_analytics.js.es6
app/assets/javascripts/cycle_analytics.js.es6
+1
-3
app/assets/javascripts/merge_conflicts/merge_conflict_store.js.es6
...s/javascripts/merge_conflicts/merge_conflict_store.js.es6
+1
-3
app/assets/javascripts/project.js
app/assets/javascripts/project.js
+2
-6
app/assets/javascripts/right_sidebar.js
app/assets/javascripts/right_sidebar.js
+1
-3
app/assets/javascripts/sidebar.js.es6
app/assets/javascripts/sidebar.js.es6
+1
-4
app/assets/javascripts/user.js.es6
app/assets/javascripts/user.js.es6
+1
-4
spec/javascripts/awards_handler_spec.js
spec/javascripts/awards_handler_spec.js
+0
-23
No files found.
app/assets/javascripts/activities.js
View file @
f8520f5d
...
@@ -24,9 +24,7 @@
...
@@ -24,9 +24,7 @@
var
filter
=
sender
.
attr
(
"
id
"
).
split
(
"
_
"
)[
0
];
var
filter
=
sender
.
attr
(
"
id
"
).
split
(
"
_
"
)[
0
];
$
(
'
.event-filter .active
'
).
removeClass
(
"
active
"
);
$
(
'
.event-filter .active
'
).
removeClass
(
"
active
"
);
Cookies
.
set
(
"
event_filter
"
,
filter
,
{
Cookies
.
set
(
"
event_filter
"
,
filter
);
path
:
gon
.
relative_url_root
||
'
/
'
});
sender
.
closest
(
'
li
'
).
toggleClass
(
"
active
"
);
sender
.
closest
(
'
li
'
).
toggleClass
(
"
active
"
);
};
};
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/awards_handler.js
View file @
f8520f5d
...
@@ -322,10 +322,7 @@
...
@@ -322,10 +322,7 @@
var
frequentlyUsedEmojis
;
var
frequentlyUsedEmojis
;
frequentlyUsedEmojis
=
this
.
getFrequentlyUsedEmojis
();
frequentlyUsedEmojis
=
this
.
getFrequentlyUsedEmojis
();
frequentlyUsedEmojis
.
push
(
emoji
);
frequentlyUsedEmojis
.
push
(
emoji
);
Cookies
.
set
(
'
frequently_used_emojis
'
,
frequentlyUsedEmojis
.
join
(
'
,
'
),
{
Cookies
.
set
(
'
frequently_used_emojis
'
,
frequentlyUsedEmojis
.
join
(
'
,
'
),
{
expires
:
365
});
path
:
gon
.
relative_url_root
||
'
/
'
,
expires
:
365
});
};
};
AwardsHandler
.
prototype
.
getFrequentlyUsedEmojis
=
function
()
{
AwardsHandler
.
prototype
.
getFrequentlyUsedEmojis
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/cycle_analytics.js.es6
View file @
f8520f5d
...
@@ -75,9 +75,7 @@
...
@@ -75,9 +75,7 @@
dismissLanding() {
dismissLanding() {
store.isHelpDismissed = true;
store.isHelpDismissed = true;
Cookies.set(COOKIE_NAME, true, {
Cookies.set(COOKIE_NAME, true);
path: gon.relative_url_root || '/'
});
}
}
initDropdown() {
initDropdown() {
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/merge_conflicts/merge_conflict_store.js.es6
View file @
f8520f5d
...
@@ -180,9 +180,7 @@
...
@@ -180,9 +180,7 @@
this.state.diffView = viewType;
this.state.diffView = viewType;
this.state.isParallel = viewType === VIEW_TYPES.PARALLEL;
this.state.isParallel = viewType === VIEW_TYPES.PARALLEL;
Cookies.set('diff_view', viewType, {
Cookies.set('diff_view', viewType);
path: gon.relative_url_root || '/'
});
},
},
getHeadHeaderLine(id) {
getHeadHeaderLine(id) {
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/project.js
View file @
f8520f5d
...
@@ -23,16 +23,12 @@
...
@@ -23,16 +23,12 @@
return
$
(
this
).
parents
(
'
form
'
).
submit
();
return
$
(
this
).
parents
(
'
form
'
).
submit
();
});
});
$
(
'
.hide-no-ssh-message
'
).
on
(
'
click
'
,
function
(
e
)
{
$
(
'
.hide-no-ssh-message
'
).
on
(
'
click
'
,
function
(
e
)
{
Cookies
.
set
(
'
hide_no_ssh_message
'
,
'
false
'
,
{
Cookies
.
set
(
'
hide_no_ssh_message
'
,
'
false
'
);
path
:
gon
.
relative_url_root
||
'
/
'
});
$
(
this
).
parents
(
'
.no-ssh-key-message
'
).
remove
();
$
(
this
).
parents
(
'
.no-ssh-key-message
'
).
remove
();
return
e
.
preventDefault
();
return
e
.
preventDefault
();
});
});
$
(
'
.hide-no-password-message
'
).
on
(
'
click
'
,
function
(
e
)
{
$
(
'
.hide-no-password-message
'
).
on
(
'
click
'
,
function
(
e
)
{
Cookies
.
set
(
'
hide_no_password_message
'
,
'
false
'
,
{
Cookies
.
set
(
'
hide_no_password_message
'
,
'
false
'
);
path
:
gon
.
relative_url_root
||
'
/
'
});
$
(
this
).
parents
(
'
.no-password-message
'
).
remove
();
$
(
this
).
parents
(
'
.no-password-message
'
).
remove
();
return
e
.
preventDefault
();
return
e
.
preventDefault
();
});
});
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/right_sidebar.js
View file @
f8520f5d
...
@@ -29,9 +29,7 @@
...
@@ -29,9 +29,7 @@
$
(
'
.page-with-sidebar
'
).
removeClass
(
'
right-sidebar-collapsed
'
).
addClass
(
'
right-sidebar-expanded
'
);
$
(
'
.page-with-sidebar
'
).
removeClass
(
'
right-sidebar-collapsed
'
).
addClass
(
'
right-sidebar-expanded
'
);
}
}
if
(
!
triggered
)
{
if
(
!
triggered
)
{
return
Cookies
.
set
(
"
collapsed_gutter
"
,
$
(
'
.right-sidebar
'
).
hasClass
(
'
right-sidebar-collapsed
'
),
{
return
Cookies
.
set
(
"
collapsed_gutter
"
,
$
(
'
.right-sidebar
'
).
hasClass
(
'
right-sidebar-collapsed
'
));
path
:
gon
.
relative_url_root
||
'
/
'
});
}
}
});
});
return
$
(
document
).
off
(
'
click
'
,
'
.js-issuable-todo
'
).
on
(
'
click
'
,
'
.js-issuable-todo
'
,
this
.
toggleTodo
);
return
$
(
document
).
off
(
'
click
'
,
'
.js-issuable-todo
'
).
on
(
'
click
'
,
'
.js-issuable-todo
'
,
this
.
toggleTodo
);
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/sidebar.js.es6
View file @
f8520f5d
...
@@ -62,10 +62,7 @@
...
@@ -62,10 +62,7 @@
if (!this.isPinned) {
if (!this.isPinned) {
this.isExpanded = false;
this.isExpanded = false;
}
}
Cookies.set(pinnedStateCookie, this.isPinned ? 'true' : 'false', {
Cookies.set(pinnedStateCookie, this.isPinned ? 'true' : 'false', { expires: 3650 });
path: gon.relative_url_root || '/',
expires: 3650
});
this.renderState();
this.renderState();
}
}
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/user.js.es6
View file @
f8520f5d
...
@@ -23,10 +23,7 @@
...
@@ -23,10 +23,7 @@
hideProjectLimitMessage() {
hideProjectLimitMessage() {
$('.hide-project-limit-message').on('click', e => {
$('.hide-project-limit-message').on('click', e => {
e.preventDefault();
e.preventDefault();
const path = gon.relative_url_root || '/';
Cookies.set('hide_project_limit_message', 'false');
Cookies.set('hide_project_limit_message', 'false', {
path: path
});
$(this).parents('.project-limit-message').remove();
$(this).parents('.project-limit-message').remove();
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
spec/javascripts/awards_handler_spec.js
View file @
f8520f5d
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
spyOn
(
jQuery
,
'
get
'
).
and
.
callFake
(
function
(
req
,
cb
)
{
spyOn
(
jQuery
,
'
get
'
).
and
.
callFake
(
function
(
req
,
cb
)
{
return
cb
(
window
.
emojiMenu
);
return
cb
(
window
.
emojiMenu
);
});
});
spyOn
(
Cookies
,
'
set
'
);
});
});
afterEach
(
function
()
{
afterEach
(
function
()
{
// restore original url root value
// restore original url root value
...
@@ -190,28 +189,6 @@
...
@@ -190,28 +189,6 @@
return
expect
(
$thumbsUpEmoji
.
data
(
"
original-title
"
)).
toBe
(
'
sam
'
);
return
expect
(
$thumbsUpEmoji
.
data
(
"
original-title
"
)).
toBe
(
'
sam
'
);
});
});
});
});
describe
(
'
::addEmojiToFrequentlyUsedList
'
,
function
()
{
it
(
'
should set a cookie with the correct default path
'
,
function
()
{
gon
.
relative_url_root
=
''
;
awardsHandler
.
addEmojiToFrequentlyUsedList
(
'
sunglasses
'
);
expect
(
Cookies
.
set
)
.
toHaveBeenCalledWith
(
'
frequently_used_emojis
'
,
'
sunglasses
'
,
{
path
:
'
/
'
,
expires
:
365
})
;
});
it
(
'
should set a cookie with the correct custom root path
'
,
function
()
{
gon
.
relative_url_root
=
'
/gitlab/subdir
'
;
awardsHandler
.
addEmojiToFrequentlyUsedList
(
'
alien
'
);
expect
(
Cookies
.
set
)
.
toHaveBeenCalledWith
(
'
frequently_used_emojis
'
,
'
alien
'
,
{
path
:
'
/gitlab/subdir
'
,
expires
:
365
})
;
});
});
describe
(
'
search
'
,
function
()
{
describe
(
'
search
'
,
function
()
{
return
it
(
'
should filter the emoji
'
,
function
()
{
return
it
(
'
should filter the emoji
'
,
function
()
{
$
(
'
.js-add-award
'
).
eq
(
0
).
click
();
$
(
'
.js-add-award
'
).
eq
(
0
).
click
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment