{I"
class:ETI"ProcessedAsset; FI"logical_path; TI"'forever_style_guide/list-toggle.js; FI"
pathname; TI"k/Users/AWeinstein/github/forever-style-guide/app/assets/javascripts/forever_style_guide/list-toggle.js; FI"content_type; TI"application/javascript; TI"
mtime; Tl+PN¿WI"length; TiÌI"digest; TI"%87ef7e37b13e83406006ae5c5a3501da; FI"source; TI"Ìvar setup_toggle_list = function () {
$(".list-group-toggler").click(function (e) {
e.preventDefault();
$(this).next('.list-group-item-child').toggleClass("is_open");
$(this).find('.list-group-toggle-trigger').toggleClass("fa-plus fa-minus");
});
$('.list-group-link').on('click', function (e) {
e.preventDefault();
if(!$(this).parent().hasClass('list-group-toggler')) {
var checkBox = $(this).next("input[type='checkbox']");
checkBox.prop('checked', !checkBox.prop('checked'));
if(checkBox.prop('checked')){
$(this).toggleClass('list-group-link-is_active');
$(this).append('');
$(this).parents('.list-group-item').addClass('is_active');
}
else {
$(this).toggleClass('list-group-link-is_active');
$(this).find('i').remove();
if( !$(this).parent().parents('.list-group-item').find('input:checkbox:checked').length) {
$(this).parent().parents('.list-group-item').removeClass('is_active');
}
}
$(this).parents('form[data-listToggle]').submit();
}
});
var activeListItems = $('.list-group-link-is_active');
if ($(activeListItems).length) {
$(activeListItems).append('');
$(activeListItems).next("input[type='checkbox']").prop('checked', true);
$(activeListItems).addClass('list-group-link-is_active');
$(activeListItems).parents('.list-group-item-child').addClass('is_open');
$(activeListItems).parents('.list-group-item')
.find('.list-group-toggle-trigger.fa')
.removeClass('fa-plus')
.addClass('fa-minus');
}
};
$(document).ready(setup_toggle_list);
$(document).on('page:load', setup_toggle_list);
; TI"dependency_digest; TI"%92503ba42486231e59330c106760b851; FI"required_paths; T[I"k/Users/AWeinstein/github/forever-style-guide/app/assets/javascripts/forever_style_guide/list-toggle.js; FI"dependency_paths; T[{I" path; TI"k/Users/AWeinstein/github/forever-style-guide/app/assets/javascripts/forever_style_guide/list-toggle.js; FI"
mtime; TI"2016-08-25T16:00:16-04:00; TI"digest; TI"%87ef7e37b13e83406006ae5c5a3501da; FI"
_version; TI"%2be930bcbfd3c3e00190e2193dda5c7c; F