Skip to content
Browse files

Try to keep old asset links alive so to not screw people

  • Loading branch information...
1 parent eac8068 commit 0f3283aeacf49f5cae1107e483f5d0f6b35ffea4 @palewire palewire committed Mar 29, 2014
Showing with 64 additions and 0 deletions.
  1. +63 −0 _static/0.2.0/jquery.geocodify.css
  2. +1 −0 _static/0.2.0/jquery.geocodify.min.js
View
63 _static/0.2.0/jquery.geocodify.css
@@ -0,0 +1,63 @@
+.geocodifyInput {
+ width: 315px;
+ height: 14px;
+ font-size: 14px;
+ line-height: 20px;
+ border: 1px solid #ccc;
+ outline: none;
+ vertical-align: top;
+ padding: 9px 5px;
+ margin: 0;
+ position: relative;
+ z-index: 9002;
+ color: black;
+ font-family: inherit;
+ box-sizing:inherit;
+}
+
+.geocodifyInput:focus {
+ border: 1px solid #2262CC;
+}
+
+.geocodifyDropdown {
+ position: absolute;
+ display:block;
+ z-index: 9003;
+ width: 325px;
+ margin: 0 !important;
+ padding: 5px 0 !important;
+ background-color: white;
+ border-top-color: #D9D9D9;
+ border: 1px solid #ccc;
+ -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+}
+
+.geocodifyDropdown ul {
+ margin: 0 !important;
+ padding: 0 !important;
+}
+
+.geocodifyDropdown li {
+ display: block;
+ padding: 5px 0 5px 8px;
+ cursor: pointer;
+ margin: 0;
+ list-style-type: none;
+ text-align: left;
+ font-size: 100%;
+ font-family: inherit;
+}
+
+.selected {
+ color: white;
+ background-color: #2262CC;
+ background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
+ background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
+ background-image: -o-linear-gradient(top, #0088cc, #0077b3);
+ background-image: linear-gradient(to bottom, #0088cc, #0077b3);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)
+}
View
1 _static/0.2.0/jquery.geocodify.min.js
@@ -0,0 +1 @@
+(function(e){e.fn.geocodify=function(t){var n={regionBias:null,viewportBias:null,onSelect:function(e){alert("Jump to: "+e.formatted_address)},minimumCharacters:5,prepSearchString:null,filterResults:null,errorHandler:null,initialText:null,noResultsText:"No results found. Please refine your search.",acceptableAddressTypes:["street_address","route","intersection","political","country","administrative_area_level_1","administrative_area_level_2","administrative_area_level_3 ","colloquial_area","locality","sublocality","neighborhood","premise","subpremise","postal_code","natural_feature","airport","park","point_of_interest","post_box","street_number","floor","room"],keyCodes:{UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8}};return this.each(function(){var r=e(this),i=r.attr("id")+"-input",s,o=r.attr("id")+"-dropdown",u;if(t){e.extend(n,t)}r.empty();document.getElementById(r.attr("id")).setAttribute("autocomplete","off");e("<input>").attr({type:"text",id:i}).addClass("geocodifyInput").appendTo(r);document.getElementById(i).setAttribute("autocomplete","off");s=e("#"+i);if(n.initialText){if(n.initialText){s.attr("placeholder",n.initialText)}}e("<div>").attr({id:o}).addClass("geocodifyDropdown").hide().appendTo(r);u=e("#"+o);r.reset=function(){u.empty();u.hide()};r.previousSearch=null;r.searchCache={};r.google=new google.maps.Geocoder;r.fetch=function(e,t){if(e===r.previousSearch&&t!==true){return false}if(e===n.initialText){return false}r.previousSearch=e;var i=e.length,s={address:e};if(i<n.minimumCharacters&&t!==true){u.html("");u.hide();return false}if(n.prepSearchString){e=n.prepSearchString(e)}if(n.regionBias){s.region=n.regionBias}if(n.viewportBias){s.bounds=n.viewportBias}this.google.geocode(s,r.onGeocode(t))};r.onGeocode=function(t){return function(i,o){var a=[],f=0,l,c;r.reset();if(o!==google.maps.GeocoderStatus.OK){if(n.errorHandler){n.errorHandler(i,o);return false}}e.each(i,function(t,r){e.each(r.types,function(e,t){if((new RegExp(t)).test(n.acceptableAddressTypes.join("|"))){a.push(r);return false}})});if(n.filterResults){a=n.filterResults(a)}f=a.length;if(f===0){l=e("<ul>");c=e("<li>").html(n.noResultsText).appendTo(l);l.appendTo(u);u.show();e("li",u).css("cursor","default")}else if(f===1&&t){n.onSelect(a[0]);r.reset();r.previousSearch=i[0].formatted_address;s.val(a[0].formatted_address)}else{l=e("<ul>");e.each(a,function(t,i){e("<li>").html(i.formatted_address).click(function(){n.onSelect(i);r.reset();r.previousSearch=i.formatted_address;s.val(i.formatted_address)}).hover(function(){e(this).addClass("selected")},function(){e(this).removeClass("selected")}).appendTo(l)});l.appendTo(u);u.show()}}};setInterval(function(){r.fetch(s.val(),false)},250);r.submit(function(){return false});r.bind("keydown",function(t){var i,o;switch(t.keyCode){case n.keyCodes.UP:i=e("li",u);o=0;e.each(i,function(t,n){if(e(n).hasClass("selected")){o=t;e(n).removeClass("selected")}});if(o-1<0){break}e(i[o-1]).addClass("selected");break;case n.keyCodes.DOWN:i=e("li",u);o=-1;e.each(i,function(t,n){if(e(n).hasClass("selected")){o=t;e(n).removeClass("selected")}});if(o-1>=i.length){break}e(i[o+1]).addClass("selected");break;case n.keyCodes.RETURN:i=e("li.selected",u);if(i){i.click()}else{r.fetch(s.val(),true)}break;default:break}})})}})(jQuery)

0 comments on commit 0f3283a

Please sign in to comment.
Something went wrong with that request. Please try again.