提交 9fd06180 编写于 作者: M Marin Jankovski

Update on the correct checkbox.

上级 16ebeede
$ -> $ ->
$(":checkbox").change -> $(":checkbox").change ->
id = $(this).val() name = $(this).attr("name")
checked = $(this).is(":checked") if name == "developers_can_push"
url = $(this).data("url") id = $(this).val()
$.ajax checked = $(this).is(":checked")
type: "PUT" url = $(this).data("url")
url: url $.ajax
dataType: "json" type: "PUT"
data: url: url
id: id dataType: "json"
developers_can_push: checked data:
id: id
developers_can_push: checked
success: -> success: ->
new Flash("Branch updated.", "notice") new Flash("Branch updated.", "notice")
location.reload true location.reload true
error: -> error: ->
new Flash("Failed to update branch!", "alert") new Flash("Failed to update branch!", "alert")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册