<commit_before>﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>jsGrid - Custom Row Renderer</title>
    <link rel="stylesheet" type="text/css" href="demos.css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,400' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" type="text/css" href="../css/jsgrid.css" />
    <link rel="stylesheet" type="text/css" href="../css/theme.css" />

    <script src="../external/jquery/jquery-1.8.3.js"></script>

    <script src="../src/jsgrid.core.js"></script>
    <script src="../src/jsgrid.load-indicator.js"></script>
    <script src="../src/jsgrid.load-strategies.js"></script>
    <script src="../src/jsgrid.sort-strategies.js"></script>
    <script src="../src/jsgrid.field.js"></script>

    <style>
        .client-photo { float: left; margin: 0 20px 0 10px; }
        .client-photo img { border-radius: 50%; border: 1px solid #ddd; }
        .client-info { margin-top: 10px; }
        .client-info p { line-height: 25px; }
    </style>
</head>
<body>
    <h1>Custom Row Renderer</h1>
    <div id="jsGrid"></div>

    <script>
        $(function() {

            $("#jsGrid").jsGrid({
                height: "80%",
                width: "50%",
                autoload: true,
                paging: true,
                controller: {
                    loadData: function() {
                        var deferred = $.Deferred();

                        $.ajax({
                            url: 'http://api.randomuser.me/?results=40',
                            dataType: 'json',
                            success: function(data){
                                deferred.resolve(data.results);
                            }
                        });

                        return deferred.promise();
                    }
                },
                rowRenderer: function(item) {
                    var user = item.user;
                    var $photo = $("<div>").addClass("client-photo").append($("<img>").attr("src", user.picture.medium));
                    var $info = $("<div>").addClass("client-info")
                        .append($("<p>").append($("<strong>").text(user.name.first.capitalize() + " " + user.name.last.capitalize())))<commit_msg>Demos: Fix custom row renderer scenario<commit_after>﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>jsGrid - Custom Row Renderer</title>
    <link rel="stylesheet" type="text/css" href="demos.css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,400' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" type="text/css" href="../css/jsgrid.css" />
    <link rel="stylesheet" type="text/css" href="../css/theme.css" />

    <script src="../external/jquery/jquery-1.8.3.js"></script>

    <script src="../src/jsgrid.core.js"></script>
    <script src="../src/jsgrid.load-indicator.js"></script>
    <script src="../src/jsgrid.load-strategies.js"></script>
    <script src="../src/jsgrid.sort-strategies.js"></script>
    <script src="../src/jsgrid.field.js"></script>

    <style>
        .client-photo { float: left; margin: 0 20px 0 10px; }
        .client-photo img { border-radius: 50%; border: 1px solid #ddd; }
        .client-info { margin-top: 10px; }
        .client-info p { line-height: 25px; }
    </style>
</head>
<body>
    <h1>Custom Row Renderer</h1>
    <div id="jsGrid"></div>

    <script>
        $(function() {

            $("#jsGrid").jsGrid({
                height: "80%",
                width: "50%",
                autoload: true,
                paging: true,
                controller: {
                    loadData: function() {
                        var deferred = $.Deferred();

                        $.ajax({
                            url: 'http://api.randomuser.me/?results=40',
                            dataType: 'json',
                            success: function(data){
                                deferred.resolve(data.results);
                            }
                        });

                        return deferred.promise();
                    }
                },
                rowRenderer: function(item) {
                    var user = item;
                    var $photo = $("<div>").addClass("client-photo").append($("<img>").attr("src", user.picture.large));
                    var $info = $("<div>").addClass("client-info")
                        .append($("<p>").append($("<strong>").text(user.name.first.capitalize() + " " + user.name.last.capitalize())))
{'fraction_non_alphanumeric': 0.18283742992669255, 'fraction_numerical': 0.014230271668822769, 'mean_word_length': 1.6799537839399192, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '3926308', 'n_tokens_mistral': 1441, 'n_tokens_neox': 1326, 'n_words': 228}