aboutsummaryrefslogtreecommitdiffstats
path: root/Resources/friendship/ui/LikeList.js
blob: 7ed3fe2f23c7676edc123d56389a51b61063467e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(function() {
	function create_row( title )
	{
		// Reason for Factory: templating format of the row
		var row = Ti.UI.createTableViewRow();
		
		var profile_icon = Ti.UI.createImageView({
			image:"images/fb_test_profile.jpg",
			width:50,
			height:50,
			left:0,
			top:0
		});

		var content = Ti.UI.createLabel({
			text:title,
			font:{fontSize:12,fontWeight:'bold'},
			width:'auto',
			textAlign:'left',
			top:2,
			left:52,
			height:26
		});

		row.height = 50;
		
		row.add( profile_icon );
		row.add( content );
		
		return row;
	}
	
	fs.ui.createLikeList = function() {
		var ll_view = Ti.UI.createTableView();
		
		ll_view.addEventListener('click', function(e) {
			Ti.UI.currentTabGroup.activeTab.open(fs.ui.createWebViewWin({
				title: e.title,
				url: e.url
			}));
		});
		
		ll_view.appendRow( create_row( 'OMG, I like totally like Skrillex.') );
		ll_view.appendRow( create_row( 'Seriously, this is amazing.  You totally need to party.') );
		
		return ll_view;
	};
 })();