<commit_before>/**
 * Created by U648170 on 10-8-2015.
 */

// Set up tinyMCE (rich-text textarea)
var tinymcesetup = function() {
    tinymce.init({
        mode: "textareas",
        selector: ".tinymce",
        width: "90%",
        height: 300,
        plugins: [
            "advlist autolink lists charmap print preview hr spellchecker",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "save contextmenu directionality template paste textcolor"
        ],
        content_css: "js/tinymce/skins/lightgray/content.min.css",
        toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
        style_formats: [
            {title: 'Bold text', inline: 'b'},<commit_msg>changed header and added feature to test<commit_after>/**
 Copyright  2014, <NAME>
 This file is part of Journal Club Manager.

 Journal Club Manager is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Journal Club Manager is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with Journal Club Manager.  If not, see <http://www.gnu.org/licenses/>.
 */

// TO TEST: loading object to bind on every ajax request
var loader = function(el,type,callback) {
    this.el = el;
    jQuery.ajax({
        url: 'php/form.php',
        data: {get_app_status: true},
        type: type,
        async: true,
        context: this,
        beforeSend: this.loadingDiv(),
        complete: this.removeLoading(),
        success: function(data) {
            var json = jQuery.parseJSON(data);
            callback(json);
        }
    });

    this.loadingDiv = function loadingDiv() {
        $(this.el)
            .fadeOut(200)
            .append("<div class='loadingDiv' style='width: 100%; height: 100%;'></div>")
            .show();
    };

    this.removeLoading = function() {
        this.el.children('.loadingDiv')
            .fadeOut('slow')
            .remove();
        this.el.fadeIn(200);
    };
};

// Set up tinyMCE (rich-text textarea)
var tinymcesetup = function() {
    tinymce.init({
        mode: "textareas",
        selector: ".tinymce",
        width: "90%",
        height: 300,
        plugins: [
            "advlist autolink lists charmap print preview hr spellchecker",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "save contextmenu directionality template paste textcolor"
        ],
        content_css: "js/tinymce/skins/lightgray/content.min.css",
        toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
        style_formats: [
            {title: 'Bold text', inline: 'b'},
{'fraction_non_alphanumeric': 0.09622302158273381, 'fraction_numerical': 0.011990407673860911, 'mean_word_length': 2.6114718614718613, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '5746812', 'n_tokens_mistral': 940, 'n_tokens_neox': 890, 'n_words': 323}