BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
67798492
Unverified
Commit
67798492
authored
Feb 13, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add placeholder support for project_users_select_tag
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f0f88390
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
project_users_select.js.coffee
app/assets/javascripts/project_users_select.js.coffee
+2
-1
selects_helper.rb
app/helpers/selects_helper.rb
+2
-1
_issues.html.haml
app/views/projects/issues/_issues.html.haml
+1
-1
No files found.
app/assets/javascripts/project_users_select.js.coffee
View file @
67798492
...
@@ -20,8 +20,9 @@ $ ->
...
@@ -20,8 +20,9 @@ $ ->
$
(
'.ajax-project-users-select'
).
each
(
i
,
select
)
->
$
(
'.ajax-project-users-select'
).
each
(
i
,
select
)
->
project_id
=
$
(
'body'
).
data
(
'project-id'
)
project_id
=
$
(
'body'
).
data
(
'project-id'
)
$
(
select
).
select2
$
(
select
).
select2
placeholder
:
"Search for a user"
placeholder
:
$
(
select
).
data
(
'placeholder'
)
||
"Search for a user"
multiple
:
$
(
select
).
hasClass
(
'multiselect'
)
multiple
:
$
(
select
).
hasClass
(
'multiselect'
)
minimumInputLength
:
0
minimumInputLength
:
0
query
:
(
query
)
->
query
:
(
query
)
->
...
...
app/helpers/selects_helper.rb
View file @
67798492
...
@@ -13,7 +13,8 @@ module SelectsHelper
...
@@ -13,7 +13,8 @@ module SelectsHelper
css_class
<<
"multiselect "
if
opts
[
:multiple
]
css_class
<<
"multiselect "
if
opts
[
:multiple
]
css_class
<<
(
opts
[
:class
]
||
''
)
css_class
<<
(
opts
[
:class
]
||
''
)
value
=
opts
[
:selected
]
||
''
value
=
opts
[
:selected
]
||
''
placeholder
=
opts
[
:placeholder
]
||
'Select user'
hidden_field_tag
(
id
,
value
,
class:
css_class
)
hidden_field_tag
(
id
,
value
,
class:
css_class
,
'data-placeholder'
=>
placeholder
)
end
end
end
end
app/views/projects/issues/_issues.html.haml
View file @
67798492
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
=
form_tag
bulk_update_project_issues_path
(
@project
),
method: :post
do
=
form_tag
bulk_update_project_issues_path
(
@project
),
method: :post
do
%span
Update selected issues with
%span
Update selected issues with
=
select_tag
(
'update[status]'
,
options_for_select
([
'open'
,
'closed'
]),
prompt:
"Status"
)
=
select_tag
(
'update[status]'
,
options_for_select
([
'open'
,
'closed'
]),
prompt:
"Status"
)
=
project_users_select_tag
(
'update[assignee_id]'
)
=
project_users_select_tag
(
'update[assignee_id]'
,
placeholder:
'Assignee'
)
=
select_tag
(
'update[milestone_id]'
,
bulk_update_milestone_options
,
prompt:
"Milestone"
)
=
select_tag
(
'update[milestone_id]'
,
bulk_update_milestone_options
,
prompt:
"Milestone"
)
=
hidden_field_tag
'update[issues_ids]'
,
[]
=
hidden_field_tag
'update[issues_ids]'
,
[]
=
hidden_field_tag
:status
,
params
[
:status
]
=
hidden_field_tag
:status
,
params
[
:status
]
...
...
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