Settings save

This commit is contained in:
magnolia-fan
2011-09-15 09:20:50 +04:00
parent d50d584bf8
commit d0f5e35100
3 changed files with 17 additions and 11 deletions
-1
View File
@@ -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
+5 -2
View File
@@ -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', ->