aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/friendship/ui/ApplicationWindow.js14
-rw-r--r--Resources/friendship/ui/LikeList.js57
-rw-r--r--Resources/friendship/ui/WebView.js1
-rw-r--r--Resources/friendship/ui/ui.js4
-rw-r--r--Resources/images/refresh.pngbin30136 -> 3120 bytes
-rw-r--r--tiapp.xml2
6 files changed, 56 insertions, 22 deletions
diff --git a/Resources/friendship/ui/ApplicationWindow.js b/Resources/friendship/ui/ApplicationWindow.js
index b07838e..8f4835b 100644
--- a/Resources/friendship/ui/ApplicationWindow.js
+++ b/Resources/friendship/ui/ApplicationWindow.js
@@ -3,19 +3,19 @@
var tab_group = Ti.UI.createTabGroup();
Ti.UI.currentTabGroup = tab_group;
- var login_button = Ti.Facebook.createLoginButton();
+// var login_button = Ti.Facebook.createLoginButton();
var refresh_button = Ti.UI.createButton({
image: 'images/refresh.png',
- width: 10.0,
- height: 10.0,
- }); // TODO: figure out how to resize buttons
+ height: 5
+ });
refresh_button.addEventListener('click', fs.ui.refreshLikeList);
var win = Ti.UI.createWindow({
- //title: 'FriendShip',
+ barColor: fs.ui.styles.navBarColour,
+ title: 'Sphnx',
tabBarHidden: true,
- leftNavButton: refresh_button,
- rightNavButton: login_button, // TODO: remove before deployment
+ leftNavButton: refresh_button
+// rightNavButton: login_button
});
var loading = fs.ui.createLoadingView();
win.add(loading);
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js
index 775c408..c00ccff 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -19,9 +19,10 @@
pic_square: "images/fb_test_profile.jpg",
name: "Test Name",
description: "Description Description Description Description Description Description Description Description Description Description Description Description ",
- fan_count: "15",
+ fan_count: "1000000000000000",
page_url: "http://www.google.com",
- website: "http://www.google.com"
+ website: "http://www.google.com",
+ type: "SHOW"
} )
);
@@ -32,7 +33,8 @@
description: "Description Description Description Description Description Description Description Description Description Description Description Description ",
fan_count: "2",
page_url: "http://www.google.com",
- website: "http://www.google.com"
+ website: "http://www.google.com",
+ type: "BOOK"
} )
);
}
@@ -74,7 +76,7 @@
});
var fan_c = Ti.UI.createLabel({
- text: addCommas(key.fan_count),
+ text: addCommas( (key.fan_count >= 10000000) ? Math.round((key.fan_count / 1000000)) + 'M' : key.fan_count ),
font:{fontSize:10,fontWeight:'bold'},
//color:'#3b5997',
color:'white',
@@ -84,23 +86,49 @@
top: 0,
opacity:0.65,
left: 0,
- height:'auto'
+ height:'12'
});
fan_c.top = 50-fan_c.height;
if( fan_c.width < 10 ) fan_c.width = 10;
+
+ var item_type = Ti.UI.createLabel({
+ text: " " + key.type + " ",
+ font:{fontSize:11,fontWeight:'single'},
+ color:'white',
+ backgroundColor: '#b0d3a4',
+ width:'auto',
+ textAlign:'left',
+ top:2,
+ left: profile_icon.width + 2,
+ height:'auto'
+ });
+
+ var liked_by = Ti.UI.createLabel({
+ text: " Friend Bob ",
+ font:{fontSize:11,fontWeight:'bold'},
+ color: 'white',
+ backgroundColor:"#d1d5e0",
+ width:'auto',
+ textAlign:'left',
+ top:2,
+ left: item_type.left + item_type.width + 2,
+ height:'auto'
+ });
+
var title = Ti.UI.createLabel({
text:key.name,
font:{fontSize:12,fontWeight:'bold'},
width:'auto',
textAlign:'left',
- top:2,
- left: profile_icon.width + 2,
+ top:item_type.height + 2,
+ left: profile_icon.width + 4,
height:'auto',
wordWrap:'true'
});
+
key.description = key.description.replace(/<(?:.|\n)*?>/gm, '');
var description = Ti.UI.createLabel({
@@ -108,11 +136,8 @@
font:{fontSize:12,fontWeight:'single'},
width:'auto',
textAlign:'left',
- top: title.height - 1,
- left:profile_icon.width + 2,
- height:36,
- wordWrap:'true',
- html:true
+ top: title.top + title.height-5,
+ left:profile_icon.width + 4
});
@@ -123,7 +148,9 @@
// row.add( thumb_icon );
row.add(fan_c);
row.add( title );
- // row.add( description );
+ row.add(liked_by);
+ row.add( item_type );
+ row.add( description );
return row;
}
@@ -134,7 +161,9 @@
var loading = fs.ui.createLoadingView();
ll_view.add(loading);
- // Ti.App.fireEvent('app:show.loader');
+ add_test_data( ll_view );
+
+ //Ti.App.fireEvent('app:show.loader');
Ti.API.addEventListener("processFriendIDs", function(e) {
fs.data.friends = e.data;
diff --git a/Resources/friendship/ui/WebView.js b/Resources/friendship/ui/WebView.js
index 6b3ad16..d1c8e50 100644
--- a/Resources/friendship/ui/WebView.js
+++ b/Resources/friendship/ui/WebView.js
@@ -3,6 +3,7 @@
var options = _args || {}
var win = Ti.UI.createWindow({
+ barColor: fs.ui.styles.navBarColour,
title: (options['title']) ? options['title'] : '',
backButtonTitle: 'Back'
});
diff --git a/Resources/friendship/ui/ui.js b/Resources/friendship/ui/ui.js
index f810b87..501d2f3 100644
--- a/Resources/friendship/ui/ui.js
+++ b/Resources/friendship/ui/ui.js
@@ -1,5 +1,9 @@
(function() {
fs.ui = {};
+
+ fs.ui.styles = {
+ navBarColour: '#ac0b24'
+ };
})();
Ti.include(
diff --git a/Resources/images/refresh.png b/Resources/images/refresh.png
index 864e9c8..aed91d8 100644
--- a/Resources/images/refresh.png
+++ b/Resources/images/refresh.png
Binary files differ
diff --git a/tiapp.xml b/tiapp.xml
index 6c7786d..9cc4a2f 100644
--- a/tiapp.xml
+++ b/tiapp.xml
@@ -7,7 +7,7 @@
<target device="android">false</target>
<target device="blackberry">false</target>
</deployment-targets>
- <sdk-version>2.0.2.GA</sdk-version>
+ <sdk-version>1.6.2</sdk-version>
<id>com.likefeed.LikeFeed</id>
<name>LikeFeed</name>
<version>1.0</version>