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
iv
gitlab-ce
Commits
7b9b2ce3
Commit
7b9b2ce3
authored
Jun 29, 2016
by
Connor Shea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a helper function for getting the page path from JS.
parent
a99e5cd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/assets/javascripts/lib/utils/common_utils.js.coffee
app/assets/javascripts/lib/utils/common_utils.js.coffee
+5
-2
app/assets/javascripts/profile/profile.js.coffee
app/assets/javascripts/profile/profile.js.coffee
+1
-1
No files found.
app/assets/javascripts/lib/utils/common_utils.js.coffee
View file @
7b9b2ce3
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
w
.
gl
.
utils
.
isInGroupsPage
=
->
w
.
gl
.
utils
.
isInGroupsPage
=
->
return
$
(
'body'
).
data
(
'page'
).
split
(
':'
)[
0
]
is
'groups'
return
gl
.
utils
.
getPagePath
()
is
'groups'
w
.
gl
.
utils
.
isInProjectPage
=
->
w
.
gl
.
utils
.
isInProjectPage
=
->
return
$
(
'body'
).
data
(
'page'
).
split
(
':'
)[
0
]
is
'projects'
return
gl
.
utils
.
getPagePath
()
is
'projects'
w
.
gl
.
utils
.
getProjectSlug
=
->
w
.
gl
.
utils
.
getProjectSlug
=
->
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
e
.
stopImmediatePropagation
()
e
.
stopImmediatePropagation
()
return
false
return
false
gl
.
utils
.
getPagePath
=
->
return
$
(
'body'
).
data
(
'page'
).
split
(
':'
)[
0
]
jQuery
.
timefor
=
(
time
,
suffix
,
expiredLabel
)
->
jQuery
.
timefor
=
(
time
,
suffix
,
expiredLabel
)
->
...
...
app/assets/javascripts/profile/profile.js.coffee
View file @
7b9b2ce3
...
@@ -79,5 +79,5 @@ $ ->
...
@@ -79,5 +79,5 @@ $ ->
if
comment
&&
comment
.
length
>
1
&&
$title
.
val
()
==
''
if
comment
&&
comment
.
length
>
1
&&
$title
.
val
()
==
''
$title
.
val
(
comment
[
1
]).
change
()
$title
.
val
(
comment
[
1
]).
change
()
if
$
(
'body'
).
attr
(
'data-page'
).
split
(
':'
).
first
()
==
'profiles'
if
gl
.
utils
.
getPagePath
()
==
'profiles'
new
Profile
()
new
Profile
()
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