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
Jérome Perrin
gitlab-ce
Commits
f8520f5d
Commit
f8520f5d
authored
Oct 24, 2016
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
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 @@
var
filter
=
sender
.
attr
(
"
id
"
).
split
(
"
_
"
)[
0
];
$
(
'
.event-filter .active
'
).
removeClass
(
"
active
"
);
Cookies
.
set
(
"
event_filter
"
,
filter
,
{
path
:
gon
.
relative_url_root
||
'
/
'
});
Cookies
.
set
(
"
event_filter
"
,
filter
);
sender
.
closest
(
'
li
'
).
toggleClass
(
"
active
"
);
};
...
...
app/assets/javascripts/awards_handler.js
View file @
f8520f5d
...
...
@@ -322,10 +322,7 @@
var
frequentlyUsedEmojis
;
frequentlyUsedEmojis
=
this
.
getFrequentlyUsedEmojis
();
frequentlyUsedEmojis
.
push
(
emoji
);
Cookies
.
set
(
'
frequently_used_emojis
'
,
frequentlyUsedEmojis
.
join
(
'
,
'
),
{
path
:
gon
.
relative_url_root
||
'
/
'
,
expires
:
365
});
Cookies
.
set
(
'
frequently_used_emojis
'
,
frequentlyUsedEmojis
.
join
(
'
,
'
),
{
expires
:
365
});
};
AwardsHandler
.
prototype
.
getFrequentlyUsedEmojis
=
function
()
{
...
...
app/assets/javascripts/cycle_analytics.js.es6
View file @
f8520f5d
...
...
@@ -75,9 +75,7 @@
dismissLanding() {
store.isHelpDismissed = true;
Cookies.set(COOKIE_NAME, true, {
path: gon.relative_url_root || '/'
});
Cookies.set(COOKIE_NAME, true);
}
initDropdown() {
...
...
app/assets/javascripts/merge_conflicts/merge_conflict_store.js.es6
View file @
f8520f5d
...
...
@@ -180,9 +180,7 @@
this.state.diffView = viewType;
this.state.isParallel = viewType === VIEW_TYPES.PARALLEL;
Cookies.set('diff_view', viewType, {
path: gon.relative_url_root || '/'
});
Cookies.set('diff_view', viewType);
},
getHeadHeaderLine(id) {
...
...
app/assets/javascripts/project.js
View file @
f8520f5d
...
...
@@ -23,16 +23,12 @@
return
$
(
this
).
parents
(
'
form
'
).
submit
();
});
$
(
'
.hide-no-ssh-message
'
).
on
(
'
click
'
,
function
(
e
)
{
Cookies
.
set
(
'
hide_no_ssh_message
'
,
'
false
'
,
{
path
:
gon
.
relative_url_root
||
'
/
'
});
Cookies
.
set
(
'
hide_no_ssh_message
'
,
'
false
'
);
$
(
this
).
parents
(
'
.no-ssh-key-message
'
).
remove
();
return
e
.
preventDefault
();
});
$
(
'
.hide-no-password-message
'
).
on
(
'
click
'
,
function
(
e
)
{
Cookies
.
set
(
'
hide_no_password_message
'
,
'
false
'
,
{
path
:
gon
.
relative_url_root
||
'
/
'
});
Cookies
.
set
(
'
hide_no_password_message
'
,
'
false
'
);
$
(
this
).
parents
(
'
.no-password-message
'
).
remove
();
return
e
.
preventDefault
();
});
...
...
app/assets/javascripts/right_sidebar.js
View file @
f8520f5d
...
...
@@ -29,9 +29,7 @@
$
(
'
.page-with-sidebar
'
).
removeClass
(
'
right-sidebar-collapsed
'
).
addClass
(
'
right-sidebar-expanded
'
);
}
if
(
!
triggered
)
{
return
Cookies
.
set
(
"
collapsed_gutter
"
,
$
(
'
.right-sidebar
'
).
hasClass
(
'
right-sidebar-collapsed
'
),
{
path
:
gon
.
relative_url_root
||
'
/
'
});
return
Cookies
.
set
(
"
collapsed_gutter
"
,
$
(
'
.right-sidebar
'
).
hasClass
(
'
right-sidebar-collapsed
'
));
}
});
return
$
(
document
).
off
(
'
click
'
,
'
.js-issuable-todo
'
).
on
(
'
click
'
,
'
.js-issuable-todo
'
,
this
.
toggleTodo
);
...
...
app/assets/javascripts/sidebar.js.es6
View file @
f8520f5d
...
...
@@ -62,10 +62,7 @@
if (!this.isPinned) {
this.isExpanded = false;
}
Cookies.set(pinnedStateCookie, this.isPinned ? 'true' : 'false', {
path: gon.relative_url_root || '/',
expires: 3650
});
Cookies.set(pinnedStateCookie, this.isPinned ? 'true' : 'false', { expires: 3650 });
this.renderState();
}
...
...
app/assets/javascripts/user.js.es6
View file @
f8520f5d
...
...
@@ -23,10 +23,7 @@
hideProjectLimitMessage() {
$('.hide-project-limit-message').on('click', e => {
e.preventDefault();
const path = gon.relative_url_root || '/';
Cookies.set('hide_project_limit_message', 'false', {
path: path
});
Cookies.set('hide_project_limit_message', 'false');
$(this).parents('.project-limit-message').remove();
});
}
...
...
spec/javascripts/awards_handler_spec.js
View file @
f8520f5d
...
...
@@ -44,7 +44,6 @@
spyOn
(
jQuery
,
'
get
'
).
and
.
callFake
(
function
(
req
,
cb
)
{
return
cb
(
window
.
emojiMenu
);
});
spyOn
(
Cookies
,
'
set
'
);
});
afterEach
(
function
()
{
// restore original url root value
...
...
@@ -190,28 +189,6 @@
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
()
{
return
it
(
'
should filter the emoji
'
,
function
()
{
$
(
'
.js-add-award
'
).
eq
(
0
).
click
();
...
...
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