1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00
phorge-phorge/webroot/rsrc/js/application/calendar/behavior-recurring-edit.js

22 lines
538 B
JavaScript
Raw Normal View History

/**
* @provides javelin-behavior-recurring-edit
*/
JX.behavior('recurring-edit', function(config) {
var checkbox = JX.$(config.isRecurring);
JX.DOM.listen(checkbox, 'change', null, function() {
var frequency = JX.$(config.frequency);
var end_date = JX.$(config.recurrenceEndDate);
frequency.disabled = checkbox.checked ? false : true;
end_date.disabled = checkbox.checked ? false : true;
if (end_date.disabled) {
JX.DOM.alterClass(end_date, 'datepicker-disabled', !checkbox.checked);
}
});
});