From 02239cf690b8c43ed8d612cd92ac03eb7f97d620 Mon Sep 17 00:00:00 2001
From: Nikita Bernstein
Date: Sat, 23 Jun 2012 23:54:50 -0400
Subject: Display message when 0 items are returned.
---
Resources/friendship/ui/LikeList.js | 3 ++-
tiapp.xml | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js
index ce01096..55fafe1 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -58,7 +58,8 @@
*/
Ti.API.addEventListener( "processPosts", function( list ) {
- //Ti.UI.createAlertDialog( {title:"Items: " + list.list.length} ).show();
+ if( list.list.length == 0 )
+ Ti.UI.createAlertDialog( {title:"Sorry, but the request returned 0 items."} ).show();
for ( key in list.list ) {
ll_view.appendRow( create_row( list.list[key] ) );
}
diff --git a/tiapp.xml b/tiapp.xml
index 6c7786d..9cc4a2f 100644
--- a/tiapp.xml
+++ b/tiapp.xml
@@ -7,7 +7,7 @@
false
false
- 2.0.2.GA
+ 1.6.2
com.likefeed.LikeFeed
LikeFeed
1.0
--
cgit v1.2.3
From 765a9132f8ace733a4c05cdfbe8d172b22aad0d1 Mon Sep 17 00:00:00 2001
From: Nikita Bernstein
Date: Sun, 24 Jun 2012 01:09:01 -0400
Subject: Updated displaying the rows
---
Resources/friendship/ui/LikeList.js | 77 +++++++++++++++++++++++++++++++++---
Resources/images/thumbup.png | Bin 0 -> 6806 bytes
2 files changed, 72 insertions(+), 5 deletions(-)
create mode 100644 Resources/images/thumbup.png
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js
index 55fafe1..f373c4a 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -1,4 +1,29 @@
(function() {
+ function add_test_data(ll_view)
+ {
+ ll_view.appendRow(
+ create_row( {
+ 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",
+ page_url: "http://www.google.com",
+ website: "http://www.google.com"
+ } )
+ );
+
+ ll_view.appendRow(
+ create_row( {
+ 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: "2",
+ page_url: "http://www.google.com",
+ website: "http://www.google.com"
+ } )
+ );
+ }
+
function create_row( key )
{
// Ti.UI.createAlertDialog( {title:"key " + key.name} ).show();
@@ -14,7 +39,6 @@
});
/*
- description
fan_count
page_url
website
@@ -28,20 +52,60 @@
top:0
});
- var content = Ti.UI.createLabel({
+ var thumb_icon = Ti.UI.createImageView({
+ image:"images/thumbup.png",
+ width:15,
+ height:15,
+ left:profile_icon.width + 2,
+ top:2
+ });
+
+ var fan_c = Ti.UI.createLabel({
+ text: 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,
+ height:'auto'
+ });
+
+ if( fan_c.width < 10 ) fan_c.width = 10;
+
+ var title = Ti.UI.createLabel({
text:key.name,
font:{fontSize:12,fontWeight:'bold'},
width:'auto',
textAlign:'left',
top:2,
- left:52,
- height:26
+ left:fan_c.left + fan_c.width + 2,
+ height:'auto',
+ wordWrap:'true'
});
+ var description = Ti.UI.createLabel({
+ text:key.description,
+ font:{fontSize:12,fontWeight:'single'},
+ width:'auto',
+ textAlign:'left',
+ top: title.height,
+ left:profile_icon.width + 2,
+ height:36,
+ wordWrap:'true',
+ html:true
+ });
+
+
+
row.height = 50;
row.add( profile_icon );
- row.add( content );
+ row.add( thumb_icon );
+ row.add(fan_c);
+ row.add( title );
+ row.add( description );
return row;
}
@@ -56,6 +120,9 @@
}));
});
*/
+
+ // add_test_data( ll_view );
+
Ti.API.addEventListener( "processPosts", function( list ) {
if( list.list.length == 0 )
diff --git a/Resources/images/thumbup.png b/Resources/images/thumbup.png
new file mode 100644
index 0000000..52d5920
Binary files /dev/null and b/Resources/images/thumbup.png differ
--
cgit v1.2.3
From 665d6d299e0ff4c9019475a53a08458dc22f729a Mon Sep 17 00:00:00 2001
From: Nikita Bernstein
Date: Sun, 24 Jun 2012 01:19:12 -0400
Subject: Trying to resolve
---
Resources/friendship/ui/LikeList.js | 137 ------------------------------------
1 file changed, 137 deletions(-)
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js
index f373c4a..e69de29 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -1,137 +0,0 @@
-(function() {
- function add_test_data(ll_view)
- {
- ll_view.appendRow(
- create_row( {
- 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",
- page_url: "http://www.google.com",
- website: "http://www.google.com"
- } )
- );
-
- ll_view.appendRow(
- create_row( {
- 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: "2",
- page_url: "http://www.google.com",
- website: "http://www.google.com"
- } )
- );
- }
-
- function create_row( key )
- {
- // Ti.UI.createAlertDialog( {title:"key " + key.name} ).show();
-
- // Reason for Factory: templating format of the row
- var row = Ti.UI.createTableViewRow();
-
- row.addEventListener('click', function(e) {
- Ti.UI.currentTabGroup.activeTab.open(fs.ui.createWebViewWin({
- title: key.name,
- url: key.page_url
- }));
- });
-
- /*
- fan_count
- page_url
- website
- */
-
- var profile_icon = Ti.UI.createImageView({
- image:key.pic_square,
- width:50,
- height:50,
- left:0,
- top:0
- });
-
- var thumb_icon = Ti.UI.createImageView({
- image:"images/thumbup.png",
- width:15,
- height:15,
- left:profile_icon.width + 2,
- top:2
- });
-
- var fan_c = Ti.UI.createLabel({
- text: 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,
- height:'auto'
- });
-
- if( fan_c.width < 10 ) fan_c.width = 10;
-
- var title = Ti.UI.createLabel({
- text:key.name,
- font:{fontSize:12,fontWeight:'bold'},
- width:'auto',
- textAlign:'left',
- top:2,
- left:fan_c.left + fan_c.width + 2,
- height:'auto',
- wordWrap:'true'
- });
-
- var description = Ti.UI.createLabel({
- text:key.description,
- font:{fontSize:12,fontWeight:'single'},
- width:'auto',
- textAlign:'left',
- top: title.height,
- left:profile_icon.width + 2,
- height:36,
- wordWrap:'true',
- html:true
- });
-
-
-
- row.height = 50;
-
- row.add( profile_icon );
- row.add( thumb_icon );
- row.add(fan_c);
- row.add( title );
- row.add( description );
-
- 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
- }));
- });
- */
-
- // add_test_data( ll_view );
-
-
- Ti.API.addEventListener( "processPosts", function( list ) {
- if( list.list.length == 0 )
- Ti.UI.createAlertDialog( {title:"Sorry, but the request returned 0 items."} ).show();
- for ( key in list.list ) {
- ll_view.appendRow( create_row( list.list[key] ) );
- }
- });
-
- return ll_view;
- };
- })();
--
cgit v1.2.3
From 0e8de45a18994c14522f77156a5ac8fb3d2bdd99 Mon Sep 17 00:00:00 2001
From: Nikita Bernstein
Date: Sun, 24 Jun 2012 01:21:14 -0400
Subject: Restoring
---
Resources/friendship/ui/LikeList.js | 137 ++++++++++++++++++++++++++++++++++++
1 file changed, 137 insertions(+)
diff --git a/Resources/friendship/ui/LikeList.js b/Resources/friendship/ui/LikeList.js
index e69de29..f373c4a 100644
--- a/Resources/friendship/ui/LikeList.js
+++ b/Resources/friendship/ui/LikeList.js
@@ -0,0 +1,137 @@
+(function() {
+ function add_test_data(ll_view)
+ {
+ ll_view.appendRow(
+ create_row( {
+ 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",
+ page_url: "http://www.google.com",
+ website: "http://www.google.com"
+ } )
+ );
+
+ ll_view.appendRow(
+ create_row( {
+ 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: "2",
+ page_url: "http://www.google.com",
+ website: "http://www.google.com"
+ } )
+ );
+ }
+
+ function create_row( key )
+ {
+ // Ti.UI.createAlertDialog( {title:"key " + key.name} ).show();
+
+ // Reason for Factory: templating format of the row
+ var row = Ti.UI.createTableViewRow();
+
+ row.addEventListener('click', function(e) {
+ Ti.UI.currentTabGroup.activeTab.open(fs.ui.createWebViewWin({
+ title: key.name,
+ url: key.page_url
+ }));
+ });
+
+ /*
+ fan_count
+ page_url
+ website
+ */
+
+ var profile_icon = Ti.UI.createImageView({
+ image:key.pic_square,
+ width:50,
+ height:50,
+ left:0,
+ top:0
+ });
+
+ var thumb_icon = Ti.UI.createImageView({
+ image:"images/thumbup.png",
+ width:15,
+ height:15,
+ left:profile_icon.width + 2,
+ top:2
+ });
+
+ var fan_c = Ti.UI.createLabel({
+ text: 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,
+ height:'auto'
+ });
+
+ if( fan_c.width < 10 ) fan_c.width = 10;
+
+ var title = Ti.UI.createLabel({
+ text:key.name,
+ font:{fontSize:12,fontWeight:'bold'},
+ width:'auto',
+ textAlign:'left',
+ top:2,
+ left:fan_c.left + fan_c.width + 2,
+ height:'auto',
+ wordWrap:'true'
+ });
+
+ var description = Ti.UI.createLabel({
+ text:key.description,
+ font:{fontSize:12,fontWeight:'single'},
+ width:'auto',
+ textAlign:'left',
+ top: title.height,
+ left:profile_icon.width + 2,
+ height:36,
+ wordWrap:'true',
+ html:true
+ });
+
+
+
+ row.height = 50;
+
+ row.add( profile_icon );
+ row.add( thumb_icon );
+ row.add(fan_c);
+ row.add( title );
+ row.add( description );
+
+ 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
+ }));
+ });
+ */
+
+ // add_test_data( ll_view );
+
+
+ Ti.API.addEventListener( "processPosts", function( list ) {
+ if( list.list.length == 0 )
+ Ti.UI.createAlertDialog( {title:"Sorry, but the request returned 0 items."} ).show();
+ for ( key in list.list ) {
+ ll_view.appendRow( create_row( list.list[key] ) );
+ }
+ });
+
+ return ll_view;
+ };
+ })();
--
cgit v1.2.3