diff options
| author | Teddy Wing | 2012-06-23 21:44:45 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2012-06-23 21:44:45 -0400 | 
| commit | c678acdf82f6b3dac4a9fd7bce9f204f8c0afd78 (patch) | |
| tree | 3d3983ed26d6534102e033c6e6cee2e19c04c9e7 /Resources/friendship/ui | |
| parent | b102a3b2a54ffd210f8b1c1f228570e6e3dcc63b (diff) | |
| download | LikeFeed-c678acdf82f6b3dac4a9fd7bce9f204f8c0afd78.tar.bz2 | |
Login window: set up login window that displays on launch and on non-logged-in. Display the right stuff it you're logged in already.
Note: the login window looks like shit, I wonder if there are some things we can do to pretty it up.
Diffstat (limited to 'Resources/friendship/ui')
| -rw-r--r-- | Resources/friendship/ui/LoginWindow.js | 24 | 
1 files changed, 23 insertions, 1 deletions
diff --git a/Resources/friendship/ui/LoginWindow.js b/Resources/friendship/ui/LoginWindow.js index cbb803b..1d9befc 100644 --- a/Resources/friendship/ui/LoginWindow.js +++ b/Resources/friendship/ui/LoginWindow.js @@ -5,7 +5,7 @@  		Titanium.Facebook.addEventListener('login', function(e) {  			if (e.success) { -				alert('Logged in'); +				fs.app.mainTabGroup.open();  			}  		});  		Titanium.Facebook.addEventListener('logout', function(e) { @@ -18,4 +18,26 @@  			style: 'wide'  		});  	}; +	 +	fs.ui.createLoginWindow = function() { +		var tab_group = Ti.UI.createTabGroup(); +		var win = Ti.UI.createWindow({ +			title: 'FriendShip', +			tabBarHidden: true +		}); +		var view = Ti.UI.createView({ +			backgroundColor: '#fff' +		}); +		 +		var tab = Ti.UI.createTab({ +			window: win +		}); +		tab_group.addTab(tab); +		 +		view.add(createFBLoginButton()); +		win.add(view); +		 +		return tab_group; +	} +	  })();  | 
