-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to version 2 of foursquare API; UI changes; added nearby speci…
…als and where have i been features; fixed a million bugs and probably created some new ones
- Loading branch information
Showing
500 changed files
with
33,813 additions
and
1,740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
search now does livesearch as you type; fixed display bug in nearby venues list; fixed a bug that incorrectly said you unlocked a mayor special if you checked into another venue that you actually were the mayor of; fixed a bug that showed the search field if you tapped the gesture area or swiped back; added forward swipe gesture to refresh nearby venues and friends' checkins a la Bad Kitty; can now attach videos to check-ins and shouts; extended log-in timeout to 15 seconds instead of 10; supports setting ringtone from Free Music Ringtones app; added ability to launch venues from a url or venue ID by passing them as launchParams; added character counter below shout and checkin text fields; photohost list on shout and checkin now remember last host selected; User twitter profiles can be opened in Bad Kitty, TweetMe, or web browser; fixed a bug where after adding a tip, venue info items would repopulate; GPS accuracy slider preference now correctly shows its setting when initially launching preference dialog; GPS accuracy slider preference now shows value while slider and not just when sliding is finished; fixed a bug that would prevent login if you changed your password; twitter links that g to web browser now open in mobile.twitter.com (nicer) instead of m.twitter.com; tapping a nearby special now opens that venue's detail scene; app reports stats to Metrix; created AJAX wrapper functions that trap server errors and siplay messages accordingly; if user unchecks Show Your Friends checkbox, app now unselects Share with Twitter and Facebook; changed wording on Duplicate Venue error to be less confusing; fixed double special bug; fixed live search to not do 3 http requests when pressing enter; tips and todos are now tabbed instead of being in one list; when adding a venue, you can now search Google for the address; friend requests are now displayed in the navigation menu; added preference to opt-out of metrix statistics sending; tapping the foursquare logo scrolls the scene back to the top; added preference to let dashbopard notifications autoclose after a user-defined amount of time; fixed 0m Accuracy GPS bug; removed old buttons from nav header; restored tappability to Better Accuracy Refresh button; back gesture now moves though Category picker tree; LiveSearch is now after 2 characters and the delay is shorter; when swiping back during a photoupload on a checkin or shout, a warning asks if you'd like to cancel the upload and checkin or shout; banner notification when upload starts now refers to Media instead of Photo; User Info scenes now use commandmenu buttons instead of tabs; created templates for Who's Here list of users and looks nicer and cleaner; venue detail commands are now command buttons and not tabs; tips on venue detail now shows time created; tips on venue detail is cleaned up; seraching google now fills in venue phone number when addign a venue; resolved 0m accuracy bug; better pinch and squeeze zoom on maps; when adding a new venue, users can adjust the lat, long of the venue by tapping on a google map; tapping icons on friend and venue maps actualy shows info window; empty tips and todos lists now let the suer know that there aren't any items; empty tips on venue detail now alerts user in a friendlier way; added icon next to friend requests in navmenu; fixed a bug on Pixi where tapping a badge on another suer's profile, the tooltip would be udner the commandmenu and unreadable; badges look like stickers; when editing a venue, dialog inputs previous category and icon; tapping refresh button after performing a venue search now simply reloads nearby venues instead of grabbing new location; loading hsitory or friends on user profile now scrolls back to the top of the scene; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
foursquare "2.0" changelog | ||
tapping a tag in venue detail scene pops the scene and performs a search for the tag; | ||
added venue search support in Just Type; | ||
add JT Quick Action to send a shout; | ||
removed unused images from package; | ||
rewrote most of the AppAssistant for speed; | ||
removed lots of comments and useless code; | ||
VenueDetail: shows badge showing number of tips and people checked-in on command menu; | ||
User-facing references to TweetPhoto changed to Plixi; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Foursquare</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.palm.pdt.nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function StageAssistant() { | ||
} | ||
|
||
StageAssistant.prototype.setup = function() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"id": "com.zhephree.foursquare", | ||
"version": "1.0.0", | ||
"vendor": "Zhephree", | ||
"type": "web", | ||
"main": "index.html", | ||
"title": "Foursquare", | ||
"icon": "icon.png" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | ||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | ||
<head> | ||
<title>Foursquare</title> | ||
<script src="/usr/palm/frameworks/mojo/mojo.js" type="text/javascript" x-mojo-version="1" /> | ||
|
||
<!-- application stylesheet should come in after the one loaded by the framework --> | ||
<link href="stylesheets/foursquare.css" media="screen" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<h2>This text verifies your application is running.</h2> | ||
<p> | ||
To create a fully functional Palm application create a scene and remove this text from index.html. | ||
See the documentation on Palm Applications for more information on creating applications and scenes. | ||
</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ | ||
{ | ||
"source": "app\/assistants\/stage-assistant.js" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Put Application specific CSS here. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.swp | ||
*.ipk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Foursquare</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.palm.pdt.nature</nature> | ||
</natures> | ||
</projectDescription> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span style="color: #1f1f1f; font-size: 10pt; -webkit-border-image: url(images/menu-badge.png) 0 10 0 10 round !important; border-width: 10px;">3</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
function AboutAssistant() { | ||
if(_globals.debugMode){ | ||
this.debugTaps=0; | ||
}else{ | ||
this.debugTaps=0; | ||
} | ||
} | ||
|
||
AboutAssistant.prototype.setup = function() { | ||
this.controller.get("about-header").innerHTML="ABOUT FOURSQUARE v"+Mojo.appInfo.version; | ||
// this.controller.get("about-main").style.background="#1e1e1e url(images/darker-bg.png) repeat left top"; | ||
//zBar.hideToolbar(); | ||
this.controller.document.getElementsByTagName("body")[0].style.background="url(../images/grey-bg.png) top left"; | ||
NavMenu.setup(this,{buttons:'empty'}); | ||
|
||
this.handleDebugTapBound=this.handleDebugTap.bind(this); | ||
Mojo.Event.listen(this.controller.get("legal-head"),Mojo.Event.hold,this.handleDebugTapBound); | ||
|
||
|
||
if(_globals.debugMode){this.controller.get("legal-head").innerHTML+="debug";} | ||
} | ||
AboutAssistant.prototype.getUA = function(event) { | ||
var request = new Ajax.Request("http://zhephree.com/foursquare/ua.php", { | ||
method: 'get', | ||
evalJSON: 'true', | ||
requestHeaders: {Authorization:auth,"User-Agent":"tetsing user agent"}, | ||
onSuccess: this.yay.bind(this) | ||
}); | ||
|
||
} | ||
|
||
AboutAssistant.prototype.handleDebugTap = function(event){ | ||
var str="debug"; | ||
if(!_globals.debugMode){ | ||
_globals.debugMode=true; | ||
Mojo.Controller.getAppController().showBanner("Debug Mode enabled!", {source: 'notification'}); | ||
}else{ | ||
_globals.debugMode=false; | ||
Mojo.Controller.getAppController().showBanner("Debug Mode disabled!", {source: 'notification'}); | ||
} | ||
}; | ||
|
||
AboutAssistant.prototype.yay = function(event) { | ||
logthis(event.responseText); | ||
} | ||
AboutAssistant.prototype.activate = function(event) { | ||
} | ||
|
||
|
||
AboutAssistant.prototype.deactivate = function(event) { | ||
} | ||
|
||
AboutAssistant.prototype.cleanup = function(event) { | ||
/* this function should do any cleanup needed before the scene is destroyed as | ||
a result of being popped off the scene stack */ | ||
// zBar.showToolbar(); | ||
Mojo.Event.stopListening(this.controller.get("legal-head"),Mojo.Event.tap,this.handeDebugTapBound); | ||
|
||
} |
117 changes: 117 additions & 0 deletions
117
Foursquare-v1-api/app/assistants/add-tip-dialog-assistant.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
function AddTipDialogAssistant(sceneAssistant,a,vid,t) { | ||
this.sceneAssistant = sceneAssistant; | ||
this.auth=a; | ||
this.vid=vid; | ||
this.type=t; | ||
} | ||
AddTipDialogAssistant.prototype.setup = function(widget) { | ||
this.widget = widget; | ||
|
||
// Setup button and event handler | ||
this.sceneAssistant.controller.setupWidget("tipokButton", | ||
this.attributes = {type : Mojo.Widget.activityButton}, | ||
this.OKButtonModel = { | ||
buttonLabel: "Add", | ||
disabled: false | ||
} | ||
); | ||
this.tipokTappedBound=this.tipokTapped.bindAsEventListener(this); | ||
|
||
this.sceneAssistant.controller.setupWidget("cancelButton", | ||
this.cancelattributes = {}, | ||
this.CancelButtonModel = { | ||
buttonLabel: "Nevermind", | ||
disabled: false | ||
} | ||
); | ||
|
||
this.cancelTappedBound=this.cancelTapped.bindAsEventListener(this); | ||
|
||
this.tipKeyPressBound=this.tipKeyPress.bindAsEventListener(this); | ||
|
||
|
||
Mojo.Event.listen(this.sceneAssistant.controller.get('tipokButton'), Mojo.Event.tap, this.tipokTappedBound); | ||
Mojo.Event.listen(this.sceneAssistant.controller.get('cancelButton'), Mojo.Event.tap, this.cancelTappedBound); | ||
Mojo.Event.listen(this.sceneAssistant.controller.document, "keyup", this.tipKeyPressBound); | ||
|
||
if(this.type=="tip"){ | ||
var hint="Try the surf-n-turf!"; | ||
}else{ | ||
var hint="Add a note (optional)"; | ||
} | ||
|
||
this.sceneAssistant.controller.setupWidget('newtip', this.tipAttributes = {hintText:hint,multiline:true,focus:true}, | ||
this.tipModel = {value:'', disabled:false}); | ||
var t=(this.type=="todo")? "To-do": this.type; | ||
this.sceneAssistant.controller.get("addtip-title").innerHTML="Add a "+t; | ||
} | ||
|
||
AddTipDialogAssistant.prototype.activate = function() { | ||
this.sceneAssistant.controller.get('newtip').mojo.focus(); | ||
} | ||
|
||
AddTipDialogAssistant.prototype.tipKeyPress = function(event) { | ||
logthis("keypress"); | ||
try{ | ||
var charsLeft=200-this.sceneAssistant.controller.get("newtip").mojo.getValue().length; | ||
|
||
this.sceneAssistant.controller.get("charCount").innerHTML=charsLeft; | ||
if(charsLeft<0){ | ||
if(!this.sceneAssistant.controller.get("charCount").hasClassName("negative")){ | ||
this.sceneAssistant.controller.get("charCount").addClassName("negative"); | ||
} | ||
}else{ | ||
if(this.sceneAssistant.controller.get("charCount").hasClassName("negative")){ | ||
this.sceneAssistant.controller.get("charCount").removeClassName("negative"); | ||
} | ||
} | ||
}catch(e){ | ||
|
||
} | ||
}; | ||
|
||
|
||
AddTipDialogAssistant.prototype.tipokTapped = function() { | ||
logthis("oktapped"); | ||
var params={ | ||
vid: this.vid, | ||
type: this.type | ||
}; | ||
|
||
if(this.tipModel.value==''){ | ||
params.text='I want to visit this place.'; | ||
}else{ | ||
params.text=this.tipModel.value; | ||
} | ||
|
||
foursquarePost(this.sceneAssistant,{ | ||
endpoint: 'addtip.json', | ||
requiresAuth: true, | ||
parameters: params, | ||
onSuccess: this.tipSuccess.bind(this), | ||
onFailure: this.tipFailed.bind(this) | ||
|
||
}); | ||
} | ||
|
||
AddTipDialogAssistant.prototype.tipSuccess = function() { | ||
Mojo.Controller.getAppController().showBanner("Successfully added your "+this.type+"!", {source: 'notification'}); | ||
//this.sceneAssistant.controller.get("okButton").mojo.deactivate(); | ||
this.sceneAssistant.getVenueInfo(); | ||
this.widget.mojo.close(); | ||
} | ||
|
||
AddTipDialogAssistant.prototype.tipFailed = function() { | ||
Mojo.Controller.getAppController().showBanner("Error adding your "+this.type, {source: 'notification'}); | ||
|
||
} | ||
AddTipDialogAssistant.prototype.cancelTapped = function() { | ||
this.widget.mojo.close(); | ||
} | ||
|
||
AddTipDialogAssistant.prototype.cleanup = function() { | ||
Mojo.Event.stopListening(this.sceneAssistant.controller.get('tipokButton'), Mojo.Event.tap, this.tipokTappedBound); | ||
Mojo.Event.stopListening(this.sceneAssistant.controller.get('cancelButton'), Mojo.Event.tap, this.cancelTappedBound); | ||
Mojo.Event.stopListening(this.sceneAssistant.controller.document, "keyup", this.tipKeyPressBound); | ||
|
||
} |
Oops, something went wrong.