new.js.erb
13 lines
| 583 B
| text/plain
|
TextLexer
|
r13116 | $('#ajax-modal').html('<%= escape_javascript(render :partial => 'principal_memberships/new_modal') %>'); | ||
showModal('ajax-modal', '700px'); | ||||
$('.projects-selection').on('click', 'input[type=checkbox]', function(e){ | ||||
if (!$(this).is(':checked')) { | ||||
if ($(this).closest('li').find('ul input[type=checkbox]:not(:checked)').length > 0) { | ||||
$(this).closest('li').find('ul input[type=checkbox]:not(:checked)').attr('checked', 'checked'); | ||||
e.preventDefault(); | ||||
} else { | ||||
$(this).closest('li').find('ul input[type=checkbox]:checked').removeAttr('checked'); | ||||
} | ||||
} | ||||
}); | ||||