add remove nginx conf

This commit is contained in:
Yudong
2014-07-19 03:19:13 +08:00
parent 8a91866c27
commit 00ee9b01a4
2 changed files with 19 additions and 2 deletions

View File

@@ -29,6 +29,23 @@ $ ->
$.post '/plugin/phpfpm/switch/', JSON.stringify {enable: enable}
.success ->
location.reload()
#nginx
# $ '.nginx-edit-button'
# .on 'click', (e) ->
# ($ '#nginxModal').modal 'show'
$ '.nginx-remove-btn'
.on 'click', (e) ->
e.preventDefault()
id = ($(@).closet 'tr').data 'id'
$.post '/plugin/nginx/update_site', JSON.stringify {
action: 'delete'
id: id
type: $('#nginxConfigType').find('.active a').attr('href').substr 1
}
.success ->
location.reload()
$ '#nginxSave'
.on 'click', (e) ->

View File

@@ -13,9 +13,9 @@ table.table.table-hover
td= site.server_name.join(', ')
td fastcgi_pass: ~#{site.location['/'].fastcgi_pass.match(/unix:\/\/\/home\/[^\/]+(.*)/)[1]}
td(style= 'width: 150px;')
button.btn.btn-info.btn-xs
button.nginx-edit-btn.btn.btn-info.btn-xs
span.glyphicon.glyphicon-edit
button.btn.btn-danger.btn-xs
button.nginx-remove-btn.btn.btn-danger.btn-xs
span.glyphicon.glyphicon-remove-sign
.modal.fade#nginxModal(tabindex='-1', role='dialog', aria-hidden='true', aria-labelledby='nginxModalLabel')