Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spinners to all AJAX requests and prevent accidental double-clicks
- Loading branch information
Showing
11 changed files
with
474 additions
and
306 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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
class AddressesController < ApplicationController | ||
respond_to :json | ||
|
||
def show | ||
@address = Address.find_lat_lng("#{params[:address]}, #{params[:city_state]}") | ||
unless @address.blank? | ||
respond_with @address | ||
render(:json => @address) | ||
else | ||
render :json => {"errors" => {"address" => ["Could not find address."]}} | ||
render(:json => {"errors" => {"address" => ["Could not find address."]}}) | ||
end | ||
end | ||
end |
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
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
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
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
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,6 @@ | ||
<div id="loader" style="display: none;"> | ||
<img src="/images/ajax-loader.gif" /> | ||
</div> | ||
<div id="info_window"> | ||
<%= yield %> | ||
</div> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.