<commit_before><!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Liste des ecritures</title>
    <link rel="stylesheet" type="text/css" href="css/styles.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href="js/jtable/themes/metro/blue/jtable.min.css" />
    <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/>
    <script type="text/javascript" src="js/jquery-1.11.2.js"></script>
    <script type="text/javascript" src="js/jquery-ui.js"></script>
    <script type="text/javascript" src="js/jtable/jquery.jtable.js"></script>
    <script type="text/javascript" src="js/jtable/localization/jquery.jtable.fr.js">
    <script type="text/javascript" charset="utf-8" src="js/jquery.validationEngine.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.validationEngine-fr.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/api.rest.js"></script>
  </head>

  <body>
    <script type="text/javascript">
        var cachedTagOptions = null;
        var cachedCategorieOptions = null;
        api_rest = new ApiRest('ecriture');
        id_compte = $(location).attr("search").replace("?id=","");
        var uriRest = 'compte';
        var idRest="/" + id_compte + "/ecriture";
        $(document).ready(function () {
            $('#lst_ecriture').jtable({
                title: 'Liste des ecritures',
                ajaxSettings: { type: 'POST' },
                editinline:{enable:true},
                paging: true,
                actions: {
                    listAction: api_rest.listData,
                    createAction: api_rest.createData,
                    updateAction: api_rest.updateData,
                    deleteAction: api_rest.deleteData 
                },
                fields: {
                    id: {
                        key: true,
                        list: false
                    },
                    nom: {
                        title: 'Nom',
                        width: '20%'
                    },
                    tag: {
                        title: '',
                        width: '5%',
                        sorting: false,
                        edit: false,
                        create: false,
                        display: function (tagData) {
                            var $img = $('<img src="list_metro.png" title="Tag" />');
                            var restTag = new ApiRestChild();
                            $img.click(function() {
                                $('#lst_ecriture').jtable('openChildTable',
                                    $img.closest('tr'), //Parent row
                                    {
                                        title: 'Tag',
                                        actions: {
                                            listAction: function(postData, jtParams) {
                                                return restTag.listData('ecriture/' + tagData.record.id + '/tag');
                                            },
                                            createAction: function(postData) {
                                                return restTag.createData('ecriture/' + tagData.record.id + '/tag', postData);
                                            },
                                            updateAction: function(postData) {
                                                return restTag.updateData('tag', postData);
                                            },
                                            deleteAction: function(postData) {
                                                return restTag.deleteData('tag', postData);
                                            },
                                        },
                                        fields: {
                                            ecriture_id: {
                                                type: 'hidden',
                                                defaultValue: tagData.record.id
                                            },
                                            id: {
                                                title: 'Nom du Tag',
                                                width: '20%',
                                                options: function(data) {
                                                    if (cachedTagOptions) { //Check for cache
                                                        return cachedTagOptions;
                                                    }
                                                    var options = [];
                                                    $.ajax({ //Not found in cache, get from server
                                                        url: 'http://localhost:8080/tag?attribut=id,nom,valeur',
                                                        type: 'GET',
                                                        dataType: 'json',
                                                        async: false,
                                                        success: function (data) {
                                                            var jsonData = {};
                                                            $.map(data, function(n, i) {
                                                                                jsonData[n['id']] = n['nom'];
                                                                            });
                                                            options = jsonData;
                                                        }
                                                    });
                                                    return cachedTagOptions = options; //Cache results and return options
                                                },
                                                list: 'false'
                                            },
                                            valeur: {
                                                title: 'valeur',
                                                width: '10%'
                                            },
                                        }
                                     },
                                    function (data) { //opened handler
                                        data.childTable.jtable('load');
                                    }
                                );
                            });
                            return $img;
                        }
                    },
                    date: {
                        title: 'Date',
                        width: '10%',
                        type: 'date'<commit_msg>Modifie web view<commit_after><!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Liste des ecritures</title>
    <link rel="stylesheet" type="text/css" href="css/styles.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href="js/jtable/themes/metro/blue/jtable.min.css" />
    <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/>
    <script type="text/javascript" src="js/jquery-1.11.2.js"></script>
    <script type="text/javascript" src="js/jquery-ui.js"></script>
    <script type="text/javascript" src="js/jtable/jquery.jtable.js"></script>
    <script type="text/javascript" src="js/jtable/localization/jquery.jtable.fr.js">
    <script type="text/javascript" charset="utf-8" src="js/jquery.validationEngine.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.validationEngine-fr.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/api.rest.js"></script>
  </head>

  <body>
    <script type="text/javascript">
        var cachedTagOptions = null;
        var cachedCategorieOptions = null;
        api_rest = new ApiRest('ecriture');
        id_compte = $(location).attr("search").replace("?id=","");
        var uriRest = 'compte';
        var idRest="/" + id_compte + "/ecriture";
        $(document).ready(function () {
            $('#lst_ecriture').jtable({
                title: 'Liste des ecritures',
                ajaxSettings: { type: 'POST' },
                editinline:{enable:true},
                paging: true,
                actions: {
                    listAction: api_rest.listData,
                    createAction: api_rest.createData,
                    updateAction: api_rest.updateData,
                    deleteAction: api_rest.deleteData 
                },
                fields: {
                    id: {
                        key: true,
                        list: false
                    },
                    nom: {
                        title: 'Nom',
                        width: '20%'
                    },
                    tag: {
                        title: '',
                        width: '5%',
                        sorting: false,
                        edit: false,
                        create: false,
                        display: function (tagData) {
                            var $img = $('<img src="list_metro.png" title="Tag" />');
                            var restTag = new ApiRestChild();
                            $img.click(function() {
                                $('#lst_ecriture').jtable('openChildTable',
                                    $img.closest('tr'), //Parent row
                                    {
                                        title: 'Tag',
                                        actions: {
                                            listAction: function(postData, jtParams) {
                                                return restTag.listData('ecriture/' + tagData.record.id + '/tag');
                                            },
                                            createAction: function(postData) {
                                                return restTag.createData('ecriture/' + tagData.record.id + '/tag', postData);
                                            },
                                            //updateAction: function(postData) {
                                            //    return restTag.updateData('tag', postData);
                                            //},
                                            deleteAction: function(postData) {
                                                return restTag.deleteData('ecriture/' + tagData.record.id + '/tag', postData);
                                            },
                                        },
                                        fields: {
                                            ecriture_id: {
                                                type: 'hidden',
                                                defaultValue: tagData.record.id
                                            },
                                            tag_id: {
                                                title: 'Nom du Tag',
                                                width: '20%',
                                                options: function(data) {
                                                    if (cachedTagOptions) { //Check for cache
                                                        return cachedTagOptions;
                                                    }
                                                    var options = [];
                                                    $.ajax({ //Not found in cache, get from server
                                                        url: 'http://localhost:8080/tag',
                                                        type: 'GET',
                                                        dataType: 'json',
                                                        async: false,
                                                        success: function (data) {
                                                            var jsonData = {};
                                                            $.map(data, function(n, i) {
                                                                                jsonData[n['id']] = n['nom'];
                                                                            });
                                                            options = jsonData;
                                                        }
                                                    });
                                                    return cachedTagOptions = options; //Cache results and return options
                                                },
                                                list: 'false'
                                            },
                                            valeur: {
                                                title: 'valeur',
                                                width: '10%',
                                                edit: false,
                                                create: false,
                                            },
                                        }
                                     },
                                    function (data) { //opened handler
                                        data.childTable.jtable('load');
                                    }
                                );
                            });
                            return $img;
                        }
                    },
                    date: {
                        title: 'Date',
                        width: '10%',
                        type: 'date'
{'fraction_non_alphanumeric': 0.09489103766777313, 'fraction_numerical': 0.0030307403665752633, 'mean_word_length': 0.6528324388789505, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 210, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6166135', 'n_tokens_mistral': 2535, 'n_tokens_neox': 2424, 'n_words': 483}