<commit_before>// -------------------------------------------------------------------------------------------------
// OpenSeaMap Water Depth - Web frontend for depth data handling.
//
// Written in 2013 by <NAME> <EMAIL>
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed without any warranty.
//
// You should have received a copy of the CC0 Public Domain Dedication along
// with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
// -------------------------------------------------------------------------------------------------

OSeaM.views.GaugeMeasurement = OSeaM.View.extend({
    tagName: 'tr',
    events: {
        'click .icon-trash' : 'onDelete'
    },
    initialize: function() {
        this.model.on('change:id',       this.render,           this);
    },
    render: function() {
        var template = OSeaM.loadTemplate('gaugemeasurement');
        var content = $(template({
        	date : this.model.get('date'),
        	value : this.model.get('value')
        }));
        OSeaM.frontend.translate(content);
        this.$el.html(content);
        return this;
    },
    onDelete: function() {
    	if(confirm('Do you really want to delete that value ?')) {
    		this.model.destroy();
    	}
    }
});<commit_msg>F: fix showing time in gauge values<commit_after>// -------------------------------------------------------------------------------------------------
// OpenSeaMap Water Depth - Web frontend for depth data handling.
//
// Written in 2013 by <NAME> <EMAIL>
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed without any warranty.
//
// You should have received a copy of the CC0 Public Domain Dedication along
// with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
// -------------------------------------------------------------------------------------------------

OSeaM.views.GaugeMeasurement = OSeaM.View.extend({
    tagName: 'tr',
    events: {
        'click .icon-trash' : 'onDelete'
    },
    initialize: function() {
        this.model.on('change:id',       this.render,           this);
    },
    render: function() {
        var template = OSeaM.loadTemplate('gaugemeasurement');
        var dateX = new Date(this.model.get('timestamp'));
        var content = $(template({
        	date : dateX.getUTCFullYear() +"-"+
            ("0" + (dateX.getMonth()+1)).slice(-2) +"-"+
            ("0" + dateX.getDay()).slice(-2) + " " +
            ("0" + dateX.getHours()).slice(-2) + ":" +
            ("0" + dateX.getMinutes()).slice(-2),
        	value : this.model.get('value')
        }));
        OSeaM.frontend.translate(content);
        this.$el.html(content);
        return this;
    },
    onDelete: function() {
    	if(confirm('Do you really want to delete that value ?')) {
    		this.model.destroy();
    	}
    }
});
{'fraction_non_alphanumeric': 0.25119236883942764, 'fraction_numerical': 0.007313195548489666, 'mean_word_length': 1.6436974789915966, 'pattern_counts': {'":': 1, '<': 9, '<?xml version=': 0, '>': 9, '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': '3384712', 'n_tokens_mistral': 856, 'n_tokens_neox': 827, 'n_words': 234}