Skip to content

Commit

Permalink
Trigger event manually when iCheck input has changed (#5166)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelVella authored and kunicmarko20 committed Aug 28, 2018
1 parent da170a3 commit 031a0cc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Resources/public/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,16 @@ var Admin = {
if (window.SONATA_CONFIG && window.SONATA_CONFIG.USE_ICHECK) {
Admin.log('[core|setup_icheck] configure iCheck on', subject);

jQuery("input[type='checkbox']:not('label.btn>input'), input[type='radio']:not('label.btn>input')", subject).iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue'
});
jQuery("input[type='checkbox']:not('label.btn>input'), input[type='radio']:not('label.btn>input')", subject)
.iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue'
})
// See https://github.com/fronteed/iCheck/issues/244
.on('ifToggled', function (e) {
$(e.target).trigger('change');
})
;
}
},
/**
Expand Down

0 comments on commit 031a0cc

Please sign in to comment.