All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.butterfaces-ts.butterfaces-table.jquery.ts Maven / Gradle / Ivy

The newest version!
///
///

(function ($: any) {
    $.fn.selectTableRow = function (data: any) {

        return this.each(function () {
            let $originalElement = $(this);

            console.log("Selected row: " + data.rowIndex);
            console.log($originalElement.find("tr[rowindex=" + data.rowIndex + "]"));

            $originalElement.find("tr").removeClass("butter-table-row-selected");
            let listItems = $originalElement.find("tr[rowindex=" + data.rowIndex + "]");
            $(listItems[listItems.length - 1]).addClass("butter-table-row-selected");
        });
    };
}(jQuery));

(function ($: any) {
    $.fn.sortTableRow = function (renderIds :any, disableRenderIds :any, columnNumber :any) {
        return this.each(function () {
            let $table = $(this);

            // let rows = $table.find("tbody > tr").length;
            // let columns = $table.find("thead th").length;

            ButterFaces.Ajax.sendRequest($table.attr("id"), "sort_" + columnNumber, renderIds, columnNumber, disableRenderIds);
        });
    };
}(jQuery));




© 2015 - 2025 Weber Informatics LLC | Privacy Policy