<commit_before>/* This file is part of Indico.
 * Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
 *
 * Indico is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 *
 * Indico 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Indico; if not, see <http://www.gnu.org/licenses/>.
 */

/**
 * Constants
 */
// Calendar starting hour
var START_H = 6;
// Width of the calendar
var DAY_WIDTH_PX = 35 * 12 * 2;
// Room types, used for selecting proper CSS classes
var barClasses = ['barBlocked', 'barPreB', 'barPreConc', 'barUnaval', 'barCand', 'barPreC', 'barConf'];

var calendarLegend = Html.div({style:{clear: 'both', padding: pixels(5), marginBottom: pixels(10), border: "1px solid #eaeaea", borderRadius: pixels(2)}},
        Html.div( {className:'barLegend', style:{color: 'black'}}, $T('Legend:')),
        Html.div( {className:'barLegend barCand'}, $T('Available')),
        Html.div( {className:'barLegend barConf'}, $T('Conflict')),
        Html.div( {className:'barLegend barUnaval'}, $T('Booked')),
        Html.div( {className:'barLegend barPreB', style:{color: 'black'}}, $T('PRE-Booking')),
        Html.div( {className:'barLegend barPreC', style:{color: 'white'}}, $T('Conflict with PRE-Booking')),
        Html.div( {className:'barLegend barPreConc', style:{color: 'white'}}, $T('Concurrent PRE-Bookings')),
        Html.div( {className:'barLegend barBlocked'}, $T('Blocked')));


function compare_alphanum(elem1, elem2) {
    var i_elem1 = parseInt(elem1),
        i_elem2 = parseInt(elem2);

    elem1 = isNaN(i_elem1) ? elem1.toLowerCase() : i_elem1;
    elem2 = isNaN(i_elem2) ? elem2.toLowerCase() : i_elem2;

    return elem1 == elem2 ? 0 : (elem1 < elem2 ? -1 : 1);
}<commit_msg>Fix JS error when sorting RB summary by owner<commit_after>/* This file is part of Indico.
 * Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
 *
 * Indico is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 *
 * Indico 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Indico; if not, see <http://www.gnu.org/licenses/>.
 */

/**
 * Constants
 */
// Calendar starting hour
var START_H = 6;
// Width of the calendar
var DAY_WIDTH_PX = 35 * 12 * 2;
// Room types, used for selecting proper CSS classes
var barClasses = ['barBlocked', 'barPreB', 'barPreConc', 'barUnaval', 'barCand', 'barPreC', 'barConf'];

var calendarLegend = Html.div({style:{clear: 'both', padding: pixels(5), marginBottom: pixels(10), border: "1px solid #eaeaea", borderRadius: pixels(2)}},
        Html.div( {className:'barLegend', style:{color: 'black'}}, $T('Legend:')),
        Html.div( {className:'barLegend barCand'}, $T('Available')),
        Html.div( {className:'barLegend barConf'}, $T('Conflict')),
        Html.div( {className:'barLegend barUnaval'}, $T('Booked')),
        Html.div( {className:'barLegend barPreB', style:{color: 'black'}}, $T('PRE-Booking')),
        Html.div( {className:'barLegend barPreC', style:{color: 'white'}}, $T('Conflict with PRE-Booking')),
        Html.div( {className:'barLegend barPreConc', style:{color: 'white'}}, $T('Concurrent PRE-Bookings')),
        Html.div( {className:'barLegend barBlocked'}, $T('Blocked')));


function compare_alphanum(elem1, elem2) {
    var i_elem1 = parseInt(elem1),
        i_elem2 = parseInt(elem2);

    elem1 = isNaN(i_elem1) ? (elem1 || '').toLowerCase() : i_elem1;
    elem2 = isNaN(i_elem2) ? (elem2 || '').toLowerCase() : i_elem2;

    return elem1 == elem2 ? 0 : (elem1 < elem2 ? -1 : 1);
}
{'fraction_non_alphanumeric': 0.14727272727272728, 'fraction_numerical': 0.018636363636363635, 'mean_word_length': 4.159437280187573, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2889342', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1361, 'n_words': 462}