<commit_before>﻿// Notifier control
var notifier = null;
// View ID. Must be defined in Table.aspx
var viewID = viewID || 0;
// Current data refresh rate
var refrRate = refrRate || 1000;
// Localized phrases
var phrases = phrases || {};

// Set widths of the item links to fill cells
function setItemLinkWidths() {
    var cellWidth = $("#divTblWrapper td.cap:first").width();
    $("#divTblWrapper td.cap").each(function () {
        var cell = $(this);
        cell.children("a.lbl").outerWidth(cellWidth - 
            cell.children("img.icon").outerWidth(true) - 
            cell.children("span.cmd").outerWidth(true));
    });
}

// Show hint associated with the icon
function showHint(imgIcon) {
    var iconOffset = imgIcon.offset();
    var hint = imgIcon.siblings("span.hint");
    var hintTop = iconOffset.top + imgIcon.height();
    var hintHeight = hint.outerHeight();

    if (hintTop + hintHeight > $(document).height()) {
        hintTop = iconOffset.top - hintHeight;
        if (hintTop < 0) {
            hintTop = 0;
        }
    }

    hint.css({
        "display": "inline-block",
        "left": iconOffset.left + imgIcon.outerWidth(true),
        "top": hintTop
    });
}

// Hide hint associated with the icon
function hideHint(imgIcon) {
    imgIcon.siblings("span.hint").css("display", "none");
}


$(document).ready(function () {
    scada.clientAPI.rootPath = "../../";
    styleIOS();
    updateLayout();
    setItemLinkWidths();
    notifier = new scada.Notifier("#divNotif");
    notifier.startClearingNotifications();

    if (DEBUG_MODE) {
        initDebugTools();
    } else {
        // TODO: start updating
    }

    // update layout on window and table area resize
    $(window).on("resize " + scada.EventTypes.UPDATE_LAYOUT, function () {
        updateLayout();
    });

    // show and hide hint on hover
    $("#divTblWrapper img.icon").hover(
        function () {
            showHint($(this));
        }, function () {
            hideHint($(this));
        }
    );
});<commit_msg>PlgTable: add to the prev<commit_after>﻿// Notifier control
var notifier = null;
// View ID. Must be defined in Table.aspx
var viewID = viewID || 0;
// Current data refresh rate
var refrRate = refrRate || 1000;
// Localized phrases
var phrases = phrases || {};

// Set widths of the item links to fill cells
function setItemLinkWidths() {
    var cellWidth = $("#divTblWrapper td.cap:first").width();
    $("#divTblWrapper td.cap").each(function () {
        var cell = $(this);
        cell.children("a.lbl").outerWidth(cellWidth - 
            cell.children("img.icon").outerWidth(true) - 
            cell.children("span.cmd").outerWidth(true));
    });
}

// Show hint associated with the icon
function showHint(imgIcon) {
    var iconOffset = imgIcon.offset();
    var hint = imgIcon.siblings("span.hint");
    var hintTop = iconOffset.top + imgIcon.height();
    var hintHeight = hint.outerHeight();

    if (hintTop + hintHeight > $(document).height()) {
        hintTop = iconOffset.top - hintHeight;
        if (hintTop < 0) {
            hintTop = 0;
        }
    }

    hint.css({
        "display": "inline-block",
        "left": iconOffset.left + imgIcon.outerWidth(true),
        "top": hintTop
    });
}

// Hide hint associated with the icon
function hideHint(imgIcon) {
    imgIcon.siblings("span.hint").css("display", "none");
}


$(document).ready(function () {
    scada.clientAPI.rootPath = "../../";
    styleIOS();
    updateLayout();
    setItemLinkWidths();
    notifier = new scada.Notifier("#divNotif");
    notifier.startClearingNotifications();

    if (DEBUG_MODE) {
        initDebugTools();
    } else {
        // TODO: start updating
    }

    // update layout on window and table area resize
    $(window).on("resize " + scada.EventTypes.UPDATE_LAYOUT, function () {
        updateLayout();
    });

    // show and hide hint on hover and click
    $("#divTblWrapper img.icon").hover(
        function () {
            showHint($(this));
        }, function () {
            hideHint($(this));
        }
    );

    $("span.hint").click(function () {
        $(this).css("display", "none");
    });
});
{'fraction_non_alphanumeric': 0.15563549160671464, 'fraction_numerical': 0.003357314148681055, 'mean_word_length': 2.53774385072095, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, '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': '527130', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1235, 'n_words': 297}