Commit ab98db73a35172d723adf474d9dc50b5d613a9bf
1 parent
bca72eac
Exists in
master
and in
4 other branches
Issues tracker settings enableds/disableds without page reloading now
Showing
1 changed file
with
15 additions
and
0 deletions
Show diff stats
app/assets/javascripts/projects.js.coffee
| ... | ... | @@ -18,3 +18,18 @@ $ -> |
| 18 | 18 | # Ref switcher |
| 19 | 19 | $('.project-refs-select').on 'change', -> |
| 20 | 20 | $(@).parents('form').submit() |
| 21 | + | |
| 22 | + $('#project_issues_enabled').change -> | |
| 23 | + if ($(this).is(':checked') == true) | |
| 24 | + $('#project_issues_tracker').removeAttr('disabled') | |
| 25 | + else | |
| 26 | + $('#project_issues_tracker').attr('disabled', 'disabled') | |
| 27 | + | |
| 28 | + $('#project_issues_tracker').change() | |
| 29 | + | |
| 30 | + $('#project_issues_tracker').change -> | |
| 31 | + if ($(this).val() == gon.default_issues_tracker || $(this).is(':disabled')) | |
| 32 | + $('#project_issues_tracker_id').attr('disabled', 'disabled') | |
| 33 | + else | |
| 34 | + $('#project_issues_tracker_id').removeAttr('disabled') | |
| 35 | + | ... | ... |