/
splash_info_table_view_row.coffee
61 lines (52 loc) · 1.1 KB
/
splash_info_table_view_row.coffee
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
49
50
51
52
53
54
55
56
57
58
59
60
61
class SplashInfoTableViewRow extends Citrus.Object
constructor: (splash) ->
@row = Titanium.UI.createTableViewRow {
className: "codeInfoRow"
height: "auto"
}
@splash = splash
@row.object = this
if splash.photo?
text_offset = 74
photo = Ti.UI.createImageView {
image: splash.photo
height: 60
width: 60
top: 4
left: 7
}
@row.add(photo)
else
text_offset = 5
title = Ti.UI.createLabel {
color:'#000'
text: splash.name
font:{fontSize:30, fontWeight:'bold'}
top:4
left:text_offset
height:'auto'
width:'auto'
}
@row.add(title)
description = Ti.UI.createLabel {
color:'#000'
text: splash.text
font:{fontSize:20, fontWeight:'bold'}
top:40
left: text_offset
height:'auto'
width:'auto'
}
@row.add(description)
# if @account.name?
# realName = Ti.UI.createLabel {
# color:'#333'
# text: @account.name
# font:{fontSize:15, fontWeight:'bold'}
# top:30
# left:70
# height:'auto'
# width:'auto'
# }
# @row.add(realName)
Citrus.SplashInfoTableViewRow = SplashInfoTableViewRow