Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
redmine_v2
Overview
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
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
redmine_v2
Commits
8c2c7d39
Commit
8c2c7d39
authored
Nov 21, 2018
by
Phượng Lồ Nguyệt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajax update status of subtask
parent
14626963
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletions
+19
-1
Gemfile
+1
-0
app/helpers/issues_helper.rb
+1
-1
public/javascripts/application.js
+17
-0
No files found.
Gemfile
View file @
8c2c7d39
...
...
@@ -85,6 +85,7 @@ end
group
:development
do
gem
"
rdoc
"
,
"~> 4.3"
gem
"
yard
"
gem
'
byebug
'
,
'~> 9.0'
,
'>= 9.0.6'
end
group
:test
do
...
...
app/helpers/issues_helper.rb
View file @
8c2c7d39
...
...
@@ -97,7 +97,7 @@ module IssuesHelper
s
<<
content_tag
(
'tr'
,
content_tag
(
'td'
,
check_box_tag
(
"ids[]"
,
child
.
id
,
false
,
:id
=>
nil
),
:class
=>
'checkbox'
)
+
content_tag
(
'td'
,
link_to_issue
(
child
,
:project
=>
(
issue
.
project_id
!=
child
.
project_id
)),
:class
=>
'subject'
,
:style
=>
'width: 50%'
)
+
content_tag
(
'td'
,
h
(
child
.
status
),
:class
=>
'status'
)
+
content_tag
(
'td'
,
select_tag
(
"status"
,
options_from_collection_for_select
(
IssueStatus
.
all
,
"id"
,
"name"
,
child
.
status
.
id
),
id:
"status_
#{
child
.
id
}
"
,
class:
"select_status"
),
:class
=>
'status'
)
+
content_tag
(
'td'
,
link_to_user
(
child
.
assigned_to
),
:class
=>
'assigned_to'
)
+
content_tag
(
'td'
,
child
.
disabled_core_fields
.
include?
(
'done_ratio'
)
?
''
:
progress_bar
(
child
.
done_ratio
),
:class
=>
'done_ratio'
),
:class
=>
css
)
...
...
public/javascripts/application.js
View file @
8c2c7d39
...
...
@@ -855,3 +855,19 @@ $(document).ready(hideOnLoad);
$
(
document
).
ready
(
addFormObserversForDoubleSubmit
);
$
(
document
).
ready
(
defaultFocus
);
$
(
document
).
ready
(
setupTabs
);
// ******************** Ajax edit status of subtask ********************
$
(
document
).
ready
(
function
()
{
$
(
'.select_status'
).
change
(
function
()
{
var
status_id
=
$
(
this
).
val
(),
id
=
this
.
id
.
split
(
"_"
).
slice
(
-
1
)[
0
];
$
.
ajax
({
type
:
'post'
,
url
:
'/issues/bulk_update'
,
data
:
{
'ids[]'
:
id
,
'issue[status_id]'
:
status_id
},
success
:
function
(
html
)
{
}
});
});
})
// ******************** END Ajax edit status of subtask ********************
\ No newline at end of file
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