Files
RootPanel/plugin/mysql/static/script/panel.coffee
2014-07-27 17:50:49 +08:00

12 lines
360 B
CoffeeScript

$ ->
$('#widget-mysql .update-password button').click ->
$.post '/plugin/mysql/update_password/', JSON.stringify
password: $('#widget-mysql .update-password input').val()
.fail (jqXHR) ->
if jqXHR.responseJSON?.error
alert jqXHR.responseJSON.error
else
alert jqXHR.statusText
.success ->
location.reload()