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
Tatuya Kamada
gitlab-ce
Commits
eb99feb4
Commit
eb99feb4
authored
Jan 23, 2013
by
Andrey Kumanyaev
Committed by
Dmitriy Zaporozhets
Jan 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple refactoring
parent
a5ce8696
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+4
-4
app/assets/javascripts/merge_requests.js.coffee
app/assets/javascripts/merge_requests.js.coffee
+9
-9
spec/factories/user_team_project_relationships.rb
spec/factories/user_team_project_relationships.rb
+3
-3
spec/factories/user_team_user_relationships.rb
spec/factories/user_team_user_relationships.rb
+3
-3
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
eb99feb4
...
@@ -4,11 +4,11 @@ window.dashboardPage = ->
...
@@ -4,11 +4,11 @@ window.dashboardPage = ->
event
.
preventDefault
()
event
.
preventDefault
()
toggleFilter
$
(
this
)
toggleFilter
$
(
this
)
reloadActivities
()
reloadActivities
()
reloadActivities
=
->
reloadActivities
=
->
$
(
".content_list"
).
html
''
$
(
".content_list"
).
html
''
Pager
.
init
20
,
true
Pager
.
init
20
,
true
toggleFilter
=
(
sender
)
->
toggleFilter
=
(
sender
)
->
sender
.
parent
().
toggleClass
"inactive"
sender
.
parent
().
toggleClass
"inactive"
event_filters
=
$
.
cookie
(
"event_filter"
)
event_filters
=
$
.
cookie
(
"event_filter"
)
...
@@ -17,11 +17,11 @@ toggleFilter = (sender) ->
...
@@ -17,11 +17,11 @@ toggleFilter = (sender) ->
event_filters
=
event_filters
.
split
(
","
)
event_filters
=
event_filters
.
split
(
","
)
else
else
event_filters
=
new
Array
()
event_filters
=
new
Array
()
index
=
event_filters
.
indexOf
(
filter
)
index
=
event_filters
.
indexOf
(
filter
)
if
index
is
-
1
if
index
is
-
1
event_filters
.
push
filter
event_filters
.
push
filter
else
else
event_filters
.
splice
index
,
1
event_filters
.
splice
index
,
1
$
.
cookie
"event_filter"
,
event_filters
.
join
(
","
)
$
.
cookie
"event_filter"
,
event_filters
.
join
(
","
)
app/assets/javascripts/merge_requests.js.coffee
View file @
eb99feb4
#
#
# * Filter merge requests
# * Filter merge requests
#
#
@
merge_requestsPage
=
->
@
merge_requestsPage
=
->
$
(
'#assignee_id'
).
chosen
()
$
(
'#assignee_id'
).
chosen
()
$
(
'#milestone_id'
).
chosen
()
$
(
'#milestone_id'
).
chosen
()
...
@@ -8,16 +8,16 @@
...
@@ -8,16 +8,16 @@
$
(
this
).
closest
(
'form'
).
submit
()
$
(
this
).
closest
(
'form'
).
submit
()
class
MergeRequest
class
MergeRequest
constructor
:
(
@
opts
)
->
constructor
:
(
@
opts
)
->
this
.
$el
=
$
(
'.merge-request'
)
this
.
$el
=
$
(
'.merge-request'
)
@
diffs_loaded
=
false
@
diffs_loaded
=
false
@
commits_loaded
=
false
@
commits_loaded
=
false
this
.
activateTab
(
@
opts
.
action
)
this
.
activateTab
(
@
opts
.
action
)
this
.
bindEvents
()
this
.
bindEvents
()
this
.
initMergeWidget
()
this
.
initMergeWidget
()
this
.
$
(
'.show-all-commits'
).
on
'click'
,
=>
this
.
$
(
'.show-all-commits'
).
on
'click'
,
=>
this
.
showAllCommits
()
this
.
showAllCommits
()
...
@@ -28,7 +28,7 @@ class MergeRequest
...
@@ -28,7 +28,7 @@ class MergeRequest
initMergeWidget
:
->
initMergeWidget
:
->
this
.
showState
(
@
opts
.
current_state
)
this
.
showState
(
@
opts
.
current_state
)
if
this
.
$
(
'.automerge_widget'
).
length
and
@
opts
.
check_enable
if
this
.
$
(
'.automerge_widget'
).
length
and
@
opts
.
check_enable
$
.
get
@
opts
.
url_to_automerge_check
,
(
data
)
=>
$
.
get
@
opts
.
url_to_automerge_check
,
(
data
)
=>
this
.
showState
(
data
.
state
)
this
.
showState
(
data
.
state
)
...
@@ -42,12 +42,12 @@ class MergeRequest
...
@@ -42,12 +42,12 @@ class MergeRequest
bindEvents
:
->
bindEvents
:
->
this
.
$
(
'.nav-tabs'
).
on
'click'
,
'a'
,
(
event
)
=>
this
.
$
(
'.nav-tabs'
).
on
'click'
,
'a'
,
(
event
)
=>
a
=
$
(
event
.
currentTarget
)
a
=
$
(
event
.
currentTarget
)
href
=
a
.
attr
(
'href'
)
href
=
a
.
attr
(
'href'
)
History
.
replaceState
{
path
:
href
},
document
.
title
,
href
History
.
replaceState
{
path
:
href
},
document
.
title
,
href
event
.
preventDefault
()
event
.
preventDefault
()
this
.
$
(
'.nav-tabs'
).
on
'click'
,
'li'
,
(
event
)
=>
this
.
$
(
'.nav-tabs'
).
on
'click'
,
'li'
,
(
event
)
=>
this
.
activateTab
(
$
(
event
.
currentTarget
).
data
(
'action'
))
this
.
activateTab
(
$
(
event
.
currentTarget
).
data
(
'action'
))
...
...
spec/factories/user_team_project_relationships.rb
View file @
eb99feb4
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
FactoryGirl
.
define
do
FactoryGirl
.
define
do
factory
:user_team_project_relationship
do
factory
:user_team_project_relationship
do
project
_id
1
project
user_team
_id
1
user_team
greatest_access
1
greatest_access
{
UsersProject
::
MASTER
}
end
end
end
end
spec/factories/user_team_user_relationships.rb
View file @
eb99feb4
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
FactoryGirl
.
define
do
FactoryGirl
.
define
do
factory
:user_team_user_relationship
do
factory
:user_team_user_relationship
do
user
_id
1
user
user_team
_id
1
user_team
group_admin
false
group_admin
false
permission
1
permission
{
UsersProject
::
MASTER
}
end
end
end
end
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