mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
f7b0c09ac4
Summary: This feels a little cleaner: - Clean up transaction log a bit. - Use a checkbox instead of a two-option dropdown. This is a little messy because the browser doesn't send anything if the user submits a form with an un-clicked checkbox. We now send a dummy value ("Hey, there's definitely a checkbox in this form!") so the server can figure out what to do. Test Plan: - Edited all-dayness of an event. - Viewed transaction log. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D16776
17 lines
419 B
JavaScript
17 lines
419 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 = !!all_day.checked;
|
|
|
|
for (var ii = 0; ii < config.controlIDs.length; ii++) {
|
|
var control = JX.$(config.controlIDs[ii]);
|
|
JX.DOM.alterClass(control, 'no-time', is_all_day);
|
|
}
|
|
});
|
|
|
|
});
|