1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-27 16:00:59 +01:00
phorge-phorge/webroot/rsrc/js/application/calendar/behavior-event-all-day.js
lkassianik 8166f25c0d First step towards a Javelin behavior for Calendar day view
Summary: Ref T8300, First step towards a Javelin behavior for Calendar day view

Test Plan: No user facing changes.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8300

Differential Revision: https://secure.phabricator.com/D12978
2015-05-22 14:30:15 -07:00

16 lines
405 B
JavaScript

/**
* @provides javelin-behavior-event-all-day
*/
JX.behavior('event-all-day', function(config) {
var checkbox = JX.$(config.allDayID);
JX.DOM.listen(checkbox, 'change', null, function() {
var start = JX.$(config.startDateID);
var end = JX.$(config.endDateID);
JX.DOM.alterClass(start, 'no-time', checkbox.checked);
JX.DOM.alterClass(end, 'no-time', checkbox.checked);
});
});