1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00
phorge-phorge/webroot/rsrc/js/application/calendar/event-all-day.js
lkassianik d249456a04 All day events should disable time editing in edit view
Summary: Closes T8021, All day events should disable time editing in edit view

Test Plan: Edit all day event, time text fields should be disabled. Unchecking all-day should show time fields.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8021

Differential Revision: https://secure.phabricator.com/D12774
2015-05-08 10:01:13 -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);
});
});