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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
5cca2d3b
Commit
5cca2d3b
authored
May 23, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Ruby based on feedback
parent
fac08c3b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
20 deletions
+11
-20
app/assets/javascripts/issuable.js.coffee
app/assets/javascripts/issuable.js.coffee
+2
-2
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-13
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+5
-5
No files found.
app/assets/javascripts/issuable.js.coffee
View file @
5cca2d3b
issuable_created
=
false
issuable_created
=
false
@
Issuable
=
@
Issuable
=
init
:
->
init
:
->
if
not
issuable_created
unless
issuable_created
issuable_created
=
true
issuable_created
=
true
Issuable
.
initTemplates
()
Issuable
.
initTemplates
()
Issuable
.
initSearch
()
Issuable
.
initSearch
()
...
@@ -28,7 +28,7 @@ issuable_created = false
...
@@ -28,7 +28,7 @@ issuable_created = false
$input
=
$
(
"input[name='
#{
$search
.
attr
(
'name'
)
}
']"
,
$form
)
$input
=
$
(
"input[name='
#{
$search
.
attr
(
'name'
)
}
']"
,
$form
)
if
$input
.
length
is
0
if
$input
.
length
is
0
$form
.
append
"<input type='hidden' name='
#{
$search
.
attr
(
'name'
)
}
' value='
#{
$search
.
val
(
)
}
'/>"
$form
.
append
"<input type='hidden' name='
#{
$search
.
attr
(
'name'
)
}
' value='
#{
_
.
escape
(
$search
.
val
()
)
}
'/>"
else
else
$input
.
val
$search
.
val
()
$input
.
val
$search
.
val
()
...
...
app/helpers/application_helper.rb
View file @
5cca2d3b
...
@@ -263,7 +263,8 @@ module ApplicationHelper
...
@@ -263,7 +263,8 @@ module ApplicationHelper
assignee_id:
params
[
:assignee_id
],
assignee_id:
params
[
:assignee_id
],
author_id:
params
[
:author_id
],
author_id:
params
[
:author_id
],
sort:
params
[
:sort
],
sort:
params
[
:sort
],
issue_search:
params
[
:issue_search
]
issue_search:
params
[
:issue_search
],
label_name:
params
[
:label_name
]
}
}
options
=
exist_opts
.
merge
(
options
)
options
=
exist_opts
.
merge
(
options
)
...
@@ -276,19 +277,9 @@ module ApplicationHelper
...
@@ -276,19 +277,9 @@ module ApplicationHelper
params
=
options
.
compact
params
=
options
.
compact
pa
th
=
request
.
path
pa
rams
.
delete
(
:label_name
)
unless
add_label
if
!
params
.
nil?
"
#{
request
.
path
}
?
#{
params
.
to_param
}
"
path
<<
"?
#{
params
.
to_param
}
"
if
add_label
if
params
[
:label_name
].
present?
and
params
[
:label_name
].
respond_to?
(
'any?'
)
params
[
:label_name
].
each
do
|
label
|
path
<<
"&label_name[]=
#{
label
}
"
end
end
end
end
path
end
end
def
outdated_browser?
def
outdated_browser?
...
...
spec/features/issues/filter_issues_spec.rb
View file @
5cca2d3b
...
@@ -159,7 +159,7 @@ describe 'Filter issues', feature: true do
...
@@ -159,7 +159,7 @@ describe 'Filter issues', feature: true do
before
do
before
do
create
(
:issue
,
title:
"Bug"
,
project:
project
)
create
(
:issue
,
title:
"Bug"
,
project:
project
)
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_label
=
create
(
:label
,
project:
project
,
title:
'bug'
)
milestone
=
create
(
:milestone
,
title:
"8"
,
project:
project
)
milestone
=
create
(
:milestone
,
title:
"8"
,
project:
project
)
issue
=
create
(
:issue
,
issue
=
create
(
:issue
,
...
@@ -168,7 +168,7 @@ describe 'Filter issues', feature: true do
...
@@ -168,7 +168,7 @@ describe 'Filter issues', feature: true do
milestone:
milestone
,
milestone:
milestone
,
author:
user
,
author:
user
,
assignee:
user
)
assignee:
user
)
issue
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
issue
.
labels
<<
bug_label
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
end
end
...
@@ -264,12 +264,12 @@ describe 'Filter issues', feature: true do
...
@@ -264,12 +264,12 @@ describe 'Filter issues', feature: true do
describe
'filter issues and sort'
,
js:
true
do
describe
'filter issues and sort'
,
js:
true
do
before
do
before
do
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_label
=
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_one
=
create
(
:issue
,
title:
"Frontend"
,
project:
project
)
bug_one
=
create
(
:issue
,
title:
"Frontend"
,
project:
project
)
bug_two
=
create
(
:issue
,
title:
"Bug 2"
,
project:
project
)
bug_two
=
create
(
:issue
,
title:
"Bug 2"
,
project:
project
)
bug_one
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
bug_one
.
labels
<<
bug_label
bug_two
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
bug_two
.
labels
<<
bug_label
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
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