Improve protected branches page UX
This commit is contained in:
parent
429a43ca6a
commit
3a11165648
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
$ ->
|
$ ->
|
||||||
$(".protected-branches-list :checkbox").change ->
|
$(".protected-branches-list :checkbox").change (e) ->
|
||||||
name = $(this).attr("name")
|
name = $(this).attr("name")
|
||||||
if name == "developers_can_push"
|
if name == "developers_can_push"
|
||||||
id = $(this).val()
|
id = $(this).val()
|
||||||
|
@ -14,8 +14,8 @@ $ ->
|
||||||
developers_can_push: checked
|
developers_can_push: checked
|
||||||
|
|
||||||
success: ->
|
success: ->
|
||||||
new Flash("Branch updated.", "notice")
|
row = $(e.target)
|
||||||
location.reload true
|
row.closest('tr').effect('highlight')
|
||||||
|
|
||||||
error: ->
|
error: ->
|
||||||
new Flash("Failed to update branch!", "alert")
|
new Flash("Failed to update branch!", "alert")
|
||||||
|
|
Loading…
Reference in a new issue