<commit_before>Views.settings.index = function(win, settings) {	

	var inputData = [
		{title:'row 2', owner : {}, header:'Connect to a device'},
		{title:'row 2', owner : {}},
		{title:'row 3', owner : {}},
		{title:'Add a new device', owner : {} , header:''},
	];
	
	var tableView = Titanium.UI.createTableView({
		data:inputData,
		style:Titanium.UI.iPhone.TableViewStyle.GROUPED
	});
		
	function createTableViewRow(r) {
		var row = Ti.UI.createTableViewRow({
			height:80,
			width:320
		});
		
		var title = Ti.UI.createLabel({
			left:100,
			top:17,
			height:20,
			width:190,
			text:r.host
		});
		
		var current = Ti.UI.createLabel({
			right:0,
			top:17,
			height:20,
			width:190,
			text:"*"
		});
		
		row.owner = r;
		row.add(title);
		if(r.current) row.add(current);
		
		return row;
	}
	
	var rows = map(createTableViewRow, settings);

	inputData.push(rows);
	
	tableView.addEventListener('click', function(e)
	{
		Views.settings.show(win, e.rowData.owner);
	});
	
	// var tableview = Titanium.UI.createTableView({ 
	// 	data:rows
	//  });
	// 
	// tableview.addEventListener('click', function(e) {
	// 	Views.settings.show(win, e.rowData.owner);
	// });
	// 

	win.add(tableView);	
};<commit_msg>settings index<commit_after>Views.settings.index = function(win, settings) {	

	var newRow = Ti.UI.createTableViewRow({
		title:"Add a new device",
		owner:{},
		header:""
	});
	
	var rows = map(createTableViewRow, settings);
	
	rows.push(newRow);
	
	var tableView = Titanium.UI.createTableView({
		data:rows,
		style:Titanium.UI.iPhone.TableViewStyle.GROUPED
	});
		
	function createTableViewRow(r) {
		var row = Ti.UI.createTableViewRow();
		
		var title = Ti.UI.createLabel({
			height:20,
			width:190,
			text:r.host
		});
		
		var current = Ti.UI.createLabel({
			right:0,
			top:17,
			height:20,
			width:190,
			text:"*"
		});
		
		row.owner = r;
		row.add(title);
		if(r.current) row.add(current);
		
		return row;
	}
	
	tableView.addEventListener('click', function(e)
	{
		Views.settings.show(win, e.rowData.owner);
	});

	win.add(tableView);	
};
{'fraction_non_alphanumeric': 0.17349397590361446, 'fraction_numerical': 0.018795180722891568, 'mean_word_length': 3.298136645962733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7369926', 'n_tokens_mistral': 920, 'n_tokens_neox': 763, 'n_words': 131}