<commit_before>// Event handler for updating the current activities on the subject coordinator dashboards
SC.updateCurrentActivities = function(href) {
    new Ajax.Request(href, {
        postBody: $('current-activities-form').serialize()
    });
}

SC.registerCurrentActivitiesUpdaters = function(href) {
    Event.observe(window, 'load', function() {
        var handler = function() { SC.updateCurrentActivities(href) }
        $('toDate').observe('change', handler)
        $$('input.activity-type').each(function(input) {
            input.observe('click', handler)
        })

        var handler1 = function(evt) {
            Event.stop(evt)
        }
        $('current-activities-form').observe('submit', handler1)
    })
}
<commit_msg>Fix for bug # 364 - "Enter" key now works for "Activities for the next X days". Clicking outside the textbox also updates the information, if Enter wasn't pressed.<commit_after>// Event handler for updating the current activities on the subject coordinator dashboards
SC.updateCurrentActivities = function(href) {
    new Ajax.Request(href, {
        postBody: $('current-activities-form').serialize()
    });
}

SC.registerCurrentActivitiesUpdaters = function(href) {
    Event.observe(window, 'load', function() {
        var handler = function() { SC.updateCurrentActivities(href) }

        $('toDate').observe('change', handler)
        var browser=navigator.appName;
        if (browser=="Microsoft Internet Explorer") {
            $('toDate').observe('keypress', function(e) {
                if(e.keyCode == 13) {
                    SC.updateCurrentActivities(href)
                }
            })
        }

        $$('input.activity-type').each(function(input) {
            input.observe('click', handler)
        })

        var handler1 = function(evt) {
            Event.stop(evt)
        }
        $('current-activities-form').observe('submit', handler1)
    })
}

{'fraction_non_alphanumeric': 0.13464526152252718, 'fraction_numerical': 0.004660797514241326, 'mean_word_length': 2.7153846153846155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5428300', 'n_tokens_mistral': 545, 'n_tokens_neox': 529, 'n_words': 115}