Settings save
This commit is contained in:
@@ -39,6 +39,5 @@ $ ->
|
||||
$(this).parent('li').toggleClass('open')
|
||||
false
|
||||
$('.dropdown-menu li a').live 'click', ->
|
||||
console.log(1)
|
||||
$(this).parent().parent().parent().toggleClass('open')
|
||||
false
|
||||
@@ -49,8 +49,11 @@ $('#settings-forms form').live 'submit', ->
|
||||
params = {}
|
||||
$(this).find('input, select').each ->
|
||||
if $(this).attr('name')
|
||||
params[$(this).attr('name')] = $(this).val()
|
||||
console.log(params)
|
||||
if $(this).attr('type') is 'checkbox'
|
||||
params[$(this).attr('name')] = ($(this).attr('checked') is 'checked')
|
||||
else
|
||||
params[$(this).attr('name')] = $(this).val()
|
||||
_session.query '/user/update/', { params: params }
|
||||
false
|
||||
|
||||
$('#settings-forms input[type$="submit"]').live 'mouseup', ->
|
||||
|
||||
Reference in New Issue
Block a user