<commit_before>function index_datum_dokumente_load(node, url_ajax) {
    var $holder = $("#stadtratsdokumente_holder"),
        topc = $("#main_navbar").height() * -1,
        url_std = $(node).attr("href");
    $holder.addClass("loading");
    $holder.prepend('<div class="loading_indicator"><span class="animate-spin icon-spin4"></span></div>');

    $holder.prepend('<div id="scroller" style="position: absolute; width: 1px; height: 1px; left: 0; top: ' + topc + 'px;"></div>');
    $("#scroller").scrollintoview();

    $("#listen_holder").addClass("nur_dokumente");

    if ($("html").hasClass("history")) {
        window.history.pushState(null, null, url_std);
    }

    $.getJSON(url_ajax, function (data) {
        $holder.html(data["html"]);
        $holder.removeClass("loading");
        $("#map").AntraegeKarte("setAntraegeData", data["geodata"], data["geodata_overflow"]);
    });

    return false;
}


function index_geo_dokumente_load(url, lng, lat, radius) {
    var $holder = $("#stadtratsdokumente_holder"),
        topc = $("#main_navbar").height() * -1,
        $ben_holder = $("#ben_map_infos");

    $ben_holder.find(".nichts").hide();
    $ben_holder.find(".infos").show();
    $(".ben_add_geo").prop("disabled", false);

    $ben_holder.find("input[name=geo_lng]").val(lng);
    $ben_holder.find("input[name=geo_lat]").val(lat);
    $ben_holder.find("input[name=geo_radius]").val(radius);

    $ben_holder.find(".radius_m").text(parseInt(radius));

    if (url != "") {
        $holder.addClass("loading");
        $holder.prepend('<div class="loading_indicator"><span class="animate-spin icon-spin4"></span></div>');

        $holder.prepend('<div id="scroller" style="position: absolute; width: 1px; height: 1px; left: 0; top: ' + topc + 'px;"></div>');
        //$("#scroller").scrollintoview();

        var done = false;
        $holder.parent().find("> .keine_dokumente").fadeOut(400, function () {
            $(this).hide();
            if (done) $holder.addClass("fullsize");
            else done = true;
        });

        $.getJSON(url, function (data) {
            if (done) $holder.addClass("fullsize");
            else done = true;
            $holder.html(data["html"]);
            $holder.removeClass("loading");
            $ben_holder.find(".zentrum_ort").text(data["naechster_ort"]);
            $ben_holder.find("input[name=krit_str]").val(data["krit_str"]);
            $("#map").AntraegeKarte("setAntraegeData", data["geodata"], data["geodata_overflow"]);
        });
    }

    return false;
}


function ckeditor_init($element, mode) {
    var options = {
        removePlugins: 'save,backup,about,pastefromword,pastetext,print,preview,templates,newpage',
        extraPlugins: 'a11yhelp,codemirror,enterkey,font,format,justify,basicstyles,blockquote,colorbutton,colordialog,elementspath,filebrowser,horizontalrule,htmlwriter,image,indent,indentblock,indentlist,link,list,listblock,pastefromword,resize,showborders,specialchar,stylescombo,tab,table,tabletools,magicline,floatingspace,removeformat,flash,tableresize,maximize,sourcedialog',
        // wordcount,
        docType: '<!DOCTYPE HTML>',
        removeButtons: 'Anchor,Redo',
        contentsLangDirection: 'lrt',

        allowedContent: true,
        floatSpaceDockedOffsetY: 45,
        floatSpaceDockedOffsetX: 0,

        codemirror: {
            showSearchButton: false
        },

        toolbarGroups: [
            {name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
            {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align']},
            {name: 'colors'},
            {name: 'links'},
            {name: 'clipboard', groups: ['clipboard', 'undo']},
            '/',
            {name: 'tools'},
            {name: 'document', groups: ['mode', 'document', 'doctools']},
            {name: 'styles'},
            {name: 'others'},
            {name: 'editing', groups: ['find', 'selection', 'spellchecker']},
            {name: 'about'},
            '/',
            {name: 'forms'},
            {name: 'insert'}
        ],
        indentClasses: ['indent1', 'indent2', 'indent3', 'indent4', 'indent5', 'indent6', 'indent7', 'indent8', 'indent9', 'indent10', 'indent11', 'indent12', 'indent13', 'indent14', 'indent15']

    };
    if (mode == "inline") {
        $element.attr("contenteditable", true);
        CKEDITOR.inline($element[0], options);
    }
    else CKEDITOR.replace($element[0], options);
}


$(function () {

    $.datepicker.regional['de'] = {
        clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
        closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
        prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen',
        nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen',
        currentText: 'heute', currentStatus: '',
        monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
            'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
        monthNamesShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun',
            'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
        monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
        weekHeader: 'Wo', weekStatus: 'Woche des Monats',<commit_msg>Leere SPAN-Elemente möglich machen (Icons)<commit_after>function index_datum_dokumente_load(node, url_ajax) {
    var $holder = $("#stadtratsdokumente_holder"),
        topc = $("#main_navbar").height() * -1,
        url_std = $(node).attr("href");
    $holder.addClass("loading");
    $holder.prepend('<div class="loading_indicator"><span class="animate-spin icon-spin4"></span></div>');

    $holder.prepend('<div id="scroller" style="position: absolute; width: 1px; height: 1px; left: 0; top: ' + topc + 'px;"></div>');
    $("#scroller").scrollintoview();

    $("#listen_holder").addClass("nur_dokumente");

    if ($("html").hasClass("history")) {
        window.history.pushState(null, null, url_std);
    }

    $.getJSON(url_ajax, function (data) {
        $holder.html(data["html"]);
        $holder.removeClass("loading");
        $("#map").AntraegeKarte("setAntraegeData", data["geodata"], data["geodata_overflow"]);
    });

    return false;
}


function index_geo_dokumente_load(url, lng, lat, radius) {
    var $holder = $("#stadtratsdokumente_holder"),
        topc = $("#main_navbar").height() * -1,
        $ben_holder = $("#ben_map_infos");

    $ben_holder.find(".nichts").hide();
    $ben_holder.find(".infos").show();
    $(".ben_add_geo").prop("disabled", false);

    $ben_holder.find("input[name=geo_lng]").val(lng);
    $ben_holder.find("input[name=geo_lat]").val(lat);
    $ben_holder.find("input[name=geo_radius]").val(radius);

    $ben_holder.find(".radius_m").text(parseInt(radius));

    if (url != "") {
        $holder.addClass("loading");
        $holder.prepend('<div class="loading_indicator"><span class="animate-spin icon-spin4"></span></div>');

        $holder.prepend('<div id="scroller" style="position: absolute; width: 1px; height: 1px; left: 0; top: ' + topc + 'px;"></div>');
        //$("#scroller").scrollintoview();

        var done = false;
        $holder.parent().find("> .keine_dokumente").fadeOut(400, function () {
            $(this).hide();
            if (done) $holder.addClass("fullsize");
            else done = true;
        });

        $.getJSON(url, function (data) {
            if (done) $holder.addClass("fullsize");
            else done = true;
            $holder.html(data["html"]);
            $holder.removeClass("loading");
            $ben_holder.find(".zentrum_ort").text(data["naechster_ort"]);
            $ben_holder.find("input[name=krit_str]").val(data["krit_str"]);
            $("#map").AntraegeKarte("setAntraegeData", data["geodata"], data["geodata_overflow"]);
        });
    }

    return false;
}


function ckeditor_init($element, mode) {
    var options = {
        removePlugins: 'save,backup,about,pastefromword,pastetext,print,preview,templates,newpage',
        extraPlugins: 'a11yhelp,codemirror,enterkey,font,format,justify,basicstyles,blockquote,colorbutton,colordialog,elementspath,filebrowser,horizontalrule,htmlwriter,image,indent,indentblock,indentlist,link,list,listblock,pastefromword,resize,showborders,specialchar,stylescombo,tab,table,tabletools,magicline,floatingspace,removeformat,flash,tableresize,maximize,sourcedialog',
        // wordcount,
        docType: '<!DOCTYPE HTML>',
        removeButtons: 'Anchor,Redo',
        contentsLangDirection: 'lrt',

        allowedContent: true,
        floatSpaceDockedOffsetY: 45,
        floatSpaceDockedOffsetX: 0,

        codemirror: {
            showSearchButton: false
        },

        toolbarGroups: [
            {name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
            {name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align']},
            {name: 'colors'},
            {name: 'links'},
            {name: 'clipboard', groups: ['clipboard', 'undo']},
            '/',
            {name: 'tools'},
            {name: 'document', groups: ['mode', 'document', 'doctools']},
            {name: 'styles'},
            {name: 'others'},
            {name: 'editing', groups: ['find', 'selection', 'spellchecker']},
            {name: 'about'},
            '/',
            {name: 'forms'},
            {name: 'insert'}
        ],
        indentClasses: ['indent1', 'indent2', 'indent3', 'indent4', 'indent5', 'indent6', 'indent7', 'indent8', 'indent9', 'indent10', 'indent11', 'indent12', 'indent13', 'indent14', 'indent15']

    };
    CKEDITOR.dtd.$removeEmpty.span = 0;
    if (mode == "inline") {
        $element.attr("contenteditable", true);
        CKEDITOR.inline($element[0], options);
    }
    else CKEDITOR.replace($element[0], options);
}


$(function () {

    $.datepicker.regional['de'] = {
        clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
        closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
        prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen',
        nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen',
        currentText: 'heute', currentStatus: '',
        monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni',
            'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
        monthNamesShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun',
            'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
        monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
        weekHeader: 'Wo', weekStatus: 'Woche des Monats',
{'fraction_non_alphanumeric': 0.1905075807514832, 'fraction_numerical': 0.008192861851398437, 'mean_word_length': 3.317073170731707, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, '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': '4354292', 'n_tokens_mistral': 3515, 'n_tokens_neox': 3410, 'n_words': 577}