<commit_before><html lang="pt-br">
	<head>
		<meta charset="UTF-8">
		<title>Component Test</title>
		<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
		<script src="../src/libs/jquery.js"></script>
		<script src="../src/libs/underscore.js"></script>
		<script src="../src/libs/backbone.js"></script>
		<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
		<style>
			body {
				background: #f5f5f5;
			}
			table {
				font-size: 12px;
				background: #ffffff;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<h2 class="text-info">Gridder</h2>
			<div id="gridPatos"></div>
		</div>


		<script src="../dist/gridder.js"></script>
		<script type="text/javascript">

			$(document).on('click', '.btn-teste', function(ev) {
				ev.preventDefault();

				alert(ev.currentTarget.id + ' clicked!');
			})

			var Gridder = baltazzar.gridder();

			var Patos = new Backbone.Collection([
				{ id: 1, nome: 'Hugo', apelido: 'Huguinho', hobby: { nome: 'J<NAME>'} },
				{ id: 2, nome: 'José', apelido: 'Zezinho', hobby: { nome: 'Nadar' } },
				{ id: 3, nome: 'Luiz', apelido: 'Luizinho', hobby: { nome: 'Ler' } }
			]);

			setTimeout(function() {
				Patos.reset();
			}, 3000);

			setTimeout(function() {
				Patos.add({id: 4, nome: '<NAME>', apelido: 'Donald'});
			}, 6000);

			var gridPatos = new Gridder({
				el: '#gridPatos',
				cssClasses: ['table-hover', 'table-condensed', 'table-fixed'],
				collection: Patos,
				headers: ['nome:Nome', 'apelido:Apelido', 'hobby.nome:Hobby']
			});

			gridPatos.changeValues({
				'Huguinho': '<span class="badge">Huguinho</span>',
				'Zezinho': '<span class="badge">Zezinho</span>',
				'Luizinho': '<span class="badge">Luizinho</span>',
				'Donald': '<span class="badge">Donald</span>'
			});

			gridPatos.addCols([
				{
					position: 'last',
					header: '',
					content: '<button class="btn btn-xs btn-danger btn-teste" id="{{id}}">Detalhes</button>'
				},
				{
					position: 'last',
					header: '',
					content: '<button class="btn btn-xs btn-primary btn-teste" id="{{id}}">Detalhes</button>'
				}
			]);

			gridPatos.getCols(function(col, model) {
				// console.log(col);
				// console.log(model);
			});

			gridPatos.getRows(function(row, model) {
				// console.log(row);
				// console.log(model);
			});
		</script>
	</body>
</html><commit_msg>Exemplo de uso do Gridder.<commit_after><html lang="pt-br">
	<head>
		<meta charset="UTF-8">
		<title>Component Test</title>
		<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
		<script src="../src/libs/jquery.js"></script>
		<script src="../src/libs/underscore.js"></script>
		<script src="../src/libs/backbone.js"></script>
		<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
		<style>
			body {
				background: #f5f5f5;
			}
			table {
				font-size: 12px;
				background: #ffffff;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<h2 class="text-info">Gridder</h2>
			<div id="gridPatos"></div>
		</div>

		<script src="../dist/gridder.js"></script>
		<script type="text/javascript">
			$(document).on('click', '.btn-teste', function(ev) {
				ev.preventDefault();

				alert(ev.currentTarget.id + ' clicked!');
			})

			var Gridder = baltazzar.gridder;

			var Patos = new Backbone.Collection([
				{ id: 1, nome: 'Hugo', apelido: 'Huguinho', hobby: { nome: '<NAME>'} },
				{ id: 2, nome: 'José', apelido: 'Zezinho', hobby: { nome: 'Nadar' } },
				{ id: 3, nome: 'Luiz', apelido: 'Luizinho', hobby: { nome: 'Ler' } }
			]);

			var gridPatos = new Gridder({
				el: '#gridPatos',
				cssClasses: ['table-hover', 'table-condensed', 'table-fixed'],
				collection: Patos,
				headers: ['nome:Nome', 'apelido:Apelido', 'hobby.nome:Hobby']
			});

			gridPatos.changeValues({
				'Huguinho': '<span class="badge">Huguinho</span>',
				'Zezinho': '<span class="badge">Zezinho</span>',
				'Luizinho': '<span class="badge">Luizinho</span>',
				'Donald': '<span class="badge">Donald</span>'
			});

			gridPatos.addCols([
				{
					position: 'last',
					header: '',
					content: '<button class="btn btn-xs btn-danger btn-teste" id="{{id}}">Detalhes</button>'
				},
				{
					position: 'last',
					header: '',
					content: '<button class="btn btn-xs btn-primary btn-teste" id="{{id}}">Detalhes</button>'
				}
			]);

			setInterval(function() {
				var oldPatos = Patos.toJSON();

				Patos.reset();

				setTimeout(function() {
					Patos.reset(oldPatos);
				}, 5000);

			}, 5000);
		</script>
	</body>
</html>
{'fraction_non_alphanumeric': 0.2193756727664155, 'fraction_numerical': 0.010979547900968783, 'mean_word_length': 3.3461178671655754, 'pattern_counts': {'":': 0, '<': 90, '<?xml version=': 0, '>': 90, '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': '6490077', 'n_tokens_mistral': 2109, 'n_tokens_neox': 1722, 'n_words': 299}