<commit_before>;(function($){
    // add select2 render
    $.fn.exform.renders.push(
      function(f){
        f.find('.controls select.select').select2();
        f.find('.controls .select-search').each(function(){
            var $el = $(this);
            $el.select2({
                minimumInputLength: 1,
                initSelection: function(elem, callback){
                    callback({id: elem.val(), '__str__': $el.data('label')});
                },
                ajax: {
                    url: $el.data('search-url'),
                    dataType: 'json',
                    data: function (term, page) {
                        return {
                            '_q_' : term,
                            '_cols': 'id.__str__',
                            'p': page - 1
                        };
                    },
                    results: function (data, page) {
                        return {results: data.objects, more: data.has_more};
                    }
                },
                formatResult: function(item){return item['__str__']},
                formatSelection: function(item){return item['__str__']}
            });
        })
      });
    $(function() {
        $('.exform').exform();
        var action_bar = $('.form-actions');
        var height=action_bar[0].offsetTop + action_bar.outerHeight();
        var onchange = function(){
            var s=(document.body.scrollTop||document.documentElement.scrollTop) + window.innerHeight;
            if(s<height){action_bar.addClass('fixed');}
            else{action_bar.removeClass('fixed');}
        }
        window.onscroll=onchange;
        onchange();
    });
<commit_msg>do not make fixed action bar when no action bar in the page.<commit_after>;(function($){
    // add select2 render
    $.fn.exform.renders.push(
      function(f){
        f.find('.controls select.select').select2();
        f.find('.controls .select-search').each(function(){
            var $el = $(this);
            $el.select2({
                minimumInputLength: 1,
                initSelection: function(elem, callback){
                    callback({id: elem.val(), '__str__': $el.data('label')});
                },
                ajax: {
                    url: $el.data('search-url'),
                    dataType: 'json',
                    data: function (term, page) {
                        return {
                            '_q_' : term,
                            '_cols': 'id.__str__',
                            'p': page - 1
                        };
                    },
                    results: function (data, page) {
                        return {results: data.objects, more: data.has_more};
                    }
                },
                formatResult: function(item){return item['__str__']},
                formatSelection: function(item){return item['__str__']}
            });
        })
      });
    $(function() {
        $('.exform').exform();
        var action_bar = $('.form-actions');
        if(action_bar.length){
            var height=action_bar[0].offsetTop + action_bar.outerHeight();
            var onchange = function(){
                var s=(document.body.scrollTop||document.documentElement.scrollTop) + window.innerHeight;
                if(s<height){action_bar.addClass('fixed');}
                else{action_bar.removeClass('fixed');}
            }
            window.onscroll=onchange;
            onchange();
        }
    });

{'fraction_non_alphanumeric': 0.14049114791547687, 'fraction_numerical': 0.0034266133637921186, 'mean_word_length': 1.321404903909874, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3202016', 'n_tokens_mistral': 913, 'n_tokens_neox': 873, 'n_words': 159}