Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

new icons + PushThatButton => Push It

  • Loading branch information...
commit 308bcfee6e41304a2a2a75eaaf944afaa9a073eb 1 parent 0a7a16f
@ldiqual authored
View
15 PushThatButton2.xcodeproj/project.pbxproj
@@ -30,8 +30,6 @@
C0ABBAC515373299009E9C0F /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBAC415373299009E9C0F /* icon.png */; };
C0ABBAC715373299009E9C0F /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBAC615373299009E9C0F /* icon@2x.png */; };
C0ABBAC915373299009E9C0F /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBAC815373299009E9C0F /* icon-72.png */; };
- C0ABBACC15373299009E9C0F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBACB15373299009E9C0F /* Default.png */; };
- C0ABBACE15373299009E9C0F /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBACD15373299009E9C0F /* Default@2x.png */; };
C0ABBAD015373299009E9C0F /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBACF15373299009E9C0F /* Capture.bundle */; };
C0ABBAD215373299009E9C0F /* Cordova.plist in Resources */ = {isa = PBXBuildFile; fileRef = C0ABBAD115373299009E9C0F /* Cordova.plist */; };
C0ABBAD615373299009E9C0F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C0ABBAD515373299009E9C0F /* AppDelegate.m */; };
@@ -42,7 +40,7 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
- C0ABBA8915373298009E9C0F /* PushThatButton2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PushThatButton2.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ C0ABBA8915373298009E9C0F /* Push It.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Push It.app"; sourceTree = BUILT_PRODUCTS_DIR; };
C0ABBA8D15373298009E9C0F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
C0ABBA8F15373298009E9C0F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
C0ABBA9115373298009E9C0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@@ -127,7 +125,7 @@
C0ABBA8A15373298009E9C0F /* Products */ = {
isa = PBXGroup;
children = (
- C0ABBA8915373298009E9C0F /* PushThatButton2.app */,
+ C0ABBA8915373298009E9C0F /* Push It.app */,
);
name = Products;
sourceTree = "<group>";
@@ -282,7 +280,7 @@
);
name = PushThatButton2;
productName = PushThatButton2;
- productReference = C0ABBA8915373298009E9C0F /* PushThatButton2.app */;
+ productReference = C0ABBA8915373298009E9C0F /* Push It.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -326,8 +324,6 @@
C0ABBAC515373299009E9C0F /* icon.png in Resources */,
C0ABBAC715373299009E9C0F /* icon@2x.png in Resources */,
C0ABBAC915373299009E9C0F /* icon-72.png in Resources */,
- C0ABBACC15373299009E9C0F /* Default.png in Resources */,
- C0ABBACE15373299009E9C0F /* Default@2x.png in Resources */,
C0ABBAD015373299009E9C0F /* Capture.bundle in Resources */,
C0ABBAD215373299009E9C0F /* Cordova.plist in Resources */,
C0ABBADB15373299009E9C0F /* MainViewController.xib in Resources */,
@@ -491,7 +487,7 @@
"-weak_library",
/usr/lib/libSystem.B.dylib,
);
- PRODUCT_NAME = "$(TARGET_NAME)";
+ PRODUCT_NAME = "Push It";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
@@ -522,7 +518,7 @@
"-weak_library",
/usr/lib/libSystem.B.dylib,
);
- PRODUCT_NAME = "$(TARGET_NAME)";
+ PRODUCT_NAME = "Push It";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
@@ -548,6 +544,7 @@
C0ABBAE415373299009E9C0F /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
View
BIN  PushThatButton2.xcodeproj/project.xcworkspace/xcuserdata/ldiqual.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
BIN  PushThatButton2/Resources/icons/icon-72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  PushThatButton2/Resources/icons/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  PushThatButton2/Resources/icons/icon@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
120 www/README
@@ -0,0 +1,120 @@
+Push That Button
+================
+
+We use this library on GitHub when rendering your README or any other
+rich text file.
+
+Markups
+-------
+
+The following markups are supported. The dependencies listed are required if
+you wish to run the library.
+
+* [.markdown](http://daringfireball.net/projects/markdown/) -- `gem install redcarpet` (https://github.com/tanoku/redcarpet)
+* [.textile](http://www.textism.com/tools/textile/) -- `gem install RedCloth`
+* [.rdoc](http://rdoc.sourceforge.net/) -- `gem install rdoc -v 3.6.1`
+* [.org](http://orgmode.org/) -- `gem install org-ruby`
+* [.creole](http://wikicreole.org/) -- `gem install creole`
+* [.mediawiki](http://www.mediawiki.org/wiki/Help:Formatting) -- `gem install wikicloth`
+* [.rst](http://docutils.sourceforge.net/rst.html) -- `easy_install docutils`
+* [.asciidoc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc`
+* [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML`
+ comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
+
+
+Contributing
+------------
+
+Want to contribute? Great! There are two ways to add markups.
+
+
+### Commands
+
+If your markup is in a language other than Ruby, drop a translator
+script in `lib/github/commands` which accepts input on STDIN and
+returns HTML on STDOUT. See [rest2html][r2h] for an example.
+
+Once your script is in place, edit `lib/github/markups.rb` and tell
+GitHub Markup about it. Again we look to [rest2html][r2hc] for
+guidance:
+
+ command(:rest2html, /re?st(.txt)?/)
+
+Here we're telling GitHub Markup of the existence of a `rest2html`
+command which should be used for any file ending in `rest`,
+`rst`, `rest.txt` or `rst.txt`. Any regular expression will do.
+
+Finally add your tests. Create a `README.extension` in `test/markups`
+along with a `README.extension.html`. As you may imagine, the
+`README.extension` should be your known input and the
+`README.extension.html` should be the desired output.
+
+Now run the tests: `rake`
+
+If nothing complains, congratulations!
+
+
+### Classes
+
+If your markup can be translated using a Ruby library, that's
+great. Check out Check `lib/github/markups.rb` for some
+examples. Let's look at Markdown:
+
+ markup(:markdown, /md|mkdn?|markdown/) do |content|
+ Markdown.new(content).to_html
+ end
+
+We give the `markup` method three bits of information: the name of the
+file to `require`, a regular expression for extensions to match, and a
+block to run with unformatted markup which should return HTML.
+
+If you need to monkeypatch a RubyGem or something, check out the
+included RDoc example.
+
+Tests should be added in the same manner as described under the
+`Commands` section.
+
+
+Installation
+-----------
+
+ gem install github-markup
+
+
+Usage
+-----
+
+ require 'github/markup'
+ GitHub::Markup.render('README.markdown', "* One\n* Two")
+
+Or, more realistically:
+
+ require 'github/markup'
+ GitHub::Markup.render(file, File.read(file))
+
+
+Testing
+-------
+
+To run the tests:
+
+ $ rake
+
+To add tests see the `Commands` section earlier in this
+README.
+
+
+Contributing
+------------
+
+1. Fork it.
+2. Create a branch (`git checkout -b my_markup`)
+3. Commit your changes (`git commit -am "Added Snarkdown"`)
+4. Push to the branch (`git push origin my_markup`)
+5. Create an [Issue][1] with a link to your branch
+6. Enjoy a refreshing Diet Coke and wait
+
+
+[r2h]: http://github.com/github/markup/tree/master/lib/github/commands/rest2html
+[r2hc]: http://github.com/github/markup/tree/master/lib/github/markups.rb#L13
+[1]: http://github.com/github/markup/issues
View
2  www/index.html
@@ -18,7 +18,7 @@
var debug = false;
</script>
<script src="http://localhost:8080/target/target-script-min.js#anonymous"></script>
- <script type="text/javascript" charset="utf-8" src="javascripts/cordova-1.6.0.js"></script>
+ <script type="text/javascript" charset="utf-8" src="javascripts/cordova-1.6.0.js"></script>
<script type="text/javascript" src="javascripts/jquery/jquery-1.7.1.js"></script>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyDQWO6d3uFsjjeBEllD6C3bGhbX3-11GRM&sensor=false">
View
58 www/javascripts/app.js
@@ -8,7 +8,7 @@ Function.prototype.bind = function(context) {
var App = $.inherit({
options: {
- searchRadius: 5000,
+ searchRadius: 2000, // In meters
toogleInterval: 1000,
placeTypes: [
"restaurant",
@@ -29,6 +29,7 @@ var App = $.inherit({
__constructor: function(options) {
console.log("App launched");
+
// Merge options
$.extend(this.options, options);
@@ -154,43 +155,52 @@ var App = $.inherit({
// Google Places
// Search places around the current location
- var places = new google.maps.places.PlacesService(this.map);
+ var places = new google.maps.places.PlacesService(this.map);
this.searchType(places, 0);
},
+ /*
+ * Search for places according to a type.
+ * Will be recursively called with a different type index,
+ * until placeTypes.length is reached
+ */
searchType: function(places, typeIndex) {
+ console.log("Searching for type "+ this.options.placeTypes[typeIndex]);
+
var request = {
types: [this.options.placeTypes[typeIndex]],
location: this.location,
- radius: this.options.searchRadius
+ radius: this.options.searchRadius
};
- places.search(request, function(results, status) {
- /*
- switch (status) {
- case google.maps.places.PlacesServiceStatus.OK: console.log('OK'); break;
- case google.maps.places.PlacesServiceStatus.INVALID_REQUEST: console.log('INVALID_REQUEST'); break;
- case google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT: console.log('OVER_QUERY_LIMIT'); break;
- case google.maps.places.PlacesServiceStatus.REQUEST_DENIED: console.log('REQUEST_DENIED'); break;
- case google.maps.places.PlacesServiceStatus.UNKNOWN_ERROR: console.log('UNKNOWN_ERROR'); break;
- case google.maps.places.PlacesServiceStatus.ZERO_RESULTS: console.log('ZERO_RESULTS'); break;
- default: console.log("big error");
- }
- */
-
+ places.search(request, function(results, status) {
// Handling results
this.results[this.options.placeTypes[typeIndex]] = results;
if (typeIndex < this.options.placeTypes.length - 1) {
- // Next category
this.searchType(places, typeIndex + 1);
} else {
- // All categories have been loaded -> init list
+ var empty = true;
+ for (var name in this.results) {
+ if (this.results[name].length != 0) {
+ empty = false;
+ break;
+ }
+ }
+ if (empty) {
+ if (!debug) {
+ navigator.notification.alert("Can't find any good stuff around you :-(");
+ }
+ return;
+ }
+
this.initList();
}
}.bind(this))
},
- // Populate the places list
- initList: function() {
+ /*
+ * Populate the places list
+ */
+ initList: function() {
console.log('Populating list');
var listPage = $('#list-page').page();
@@ -239,6 +249,9 @@ var App = $.inherit({
$.mobile.changePage(this.pages.categories);
},
+ /*
+ * Get directions to the place, make some markers
+ */
loadPlace: function(place) {
// Remove the previous markers
for (var i=0; i<this.placeMarkers.length; i++) {
@@ -267,10 +280,11 @@ var App = $.inherit({
console.log("Can't compute route to this point");
}
}.bind(this));
-
- //this.map.panTo(this.location);
},
+ /*
+ * Place route on the map, and show it
+ */
showRoute: function(result) {
this.directionsRenderer.setMap(this.map);
this.directionsRenderer.setDirections(result);
Please sign in to comment.
Something went wrong with that request. Please try again.