mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
e5256bd815
Summary: Ref T11326. When an event is all-day, hide the time controls for the start/end dates. These aren't used and aren't helpful/useful. This got a little more complicated than it used to be because EditEngine forms may have only some of these controls present. Test Plan: Edited an all-day event; edited a normal event; swapped an event between normal and all-day. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11326 Differential Revision: https://secure.phabricator.com/D16327
17 lines
431 B
JavaScript
17 lines
431 B
JavaScript
/**
|
|
* @provides javelin-behavior-event-all-day
|
|
*/
|
|
|
|
JX.behavior('event-all-day', function(config) {
|
|
var all_day = JX.$(config.allDayID);
|
|
|
|
JX.DOM.listen(all_day, 'change', null, function() {
|
|
var is_all_day = !!parseInt(all_day.value, 10);
|
|
|
|
for (var ii = 0; ii < config.controlIDs.length; ii++) {
|
|
var control = JX.$(config.controlIDs[ii]);
|
|
JX.DOM.alterClass(control, 'no-time', is_all_day);
|
|
}
|
|
});
|
|
|
|
});
|