diff options
| author | Anqi Xu | 2012-06-24 02:02:45 -0400 |
|---|---|---|
| committer | Anqi Xu | 2012-06-24 02:02:45 -0400 |
| commit | eb029dddd70cbb7541a892abb2eccea2671028f1 (patch) | |
| tree | 333c846d7bfba0bf74eb98d303d190357a39dff9 /Resources | |
| parent | 1efd8c8a45ad2963cad0814cbd7acc5e460ee372 (diff) | |
| parent | 14acf4b1d8ec42c1d3151cac33dbdc7fba61a2e0 (diff) | |
| download | LikeFeed-eb029dddd70cbb7541a892abb2eccea2671028f1.tar.bz2 | |
Merge branch 'master' of github.com:teddywing/LikeFeed
Diffstat (limited to 'Resources')
| -rw-r--r-- | Resources/friendship/ui/LikeList.js | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js index d60004f..8440e01 100644 --- a/Resources/friendship/ui/LikeList.js +++ b/Resources/friendship/ui/LikeList.js @@ -1,4 +1,17 @@ (function() { + function addCommas(nStr) + { + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; + } + function add_test_data(ll_view) { ll_view.appendRow( @@ -61,16 +74,19 @@ }); var fan_c = Ti.UI.createLabel({ - text: key.fan_count, + text: addCommas(key.fan_count), font:{fontSize:10,fontWeight:'bold'}, - color:'#3b5997', - //backgroundColor:'lightblue', - width:'auto', - textAlign:'center', - top:2, - left:thumb_icon.left + thumb_icon.width + 2, + //color:'#3b5997', + color:'white', + backgroundColor:'black', + width:50, + textAlign:'right', + top: 0, + opacity:0.65, + left: 0, height:'auto' }); + fan_c.top = 50-fan_c.height; if( fan_c.width < 10 ) fan_c.width = 10; @@ -80,17 +96,19 @@ width:'auto', textAlign:'left', top:2, - left:fan_c.left + fan_c.width + 2, + left: profile_icon.width + 2, height:'auto', wordWrap:'true' }); + key.description = key.description.replace(/<(?:.|\n)*?>/gm, ''); + var description = Ti.UI.createLabel({ text:key.description, font:{fontSize:12,fontWeight:'single'}, width:'auto', textAlign:'left', - top: title.height, + top: title.height - 1, left:profile_icon.width + 2, height:36, wordWrap:'true', @@ -102,10 +120,10 @@ row.height = 50; row.add( profile_icon ); - row.add( thumb_icon ); + // row.add( thumb_icon ); row.add(fan_c); row.add( title ); - row.add( description ); + // row.add( description ); return row; } |
