Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding project files

  • Loading branch information...
commit 6a9bc0a8841aa4093f85f7e9ff797fb2a61ba360 1 parent 3078963
@chanind authored
View
106 application.coffee
@@ -0,0 +1,106 @@
+window.MeetInTheMiddle =
+ setup: ->
+ @geocoder = new google.maps.Geocoder()
+ document.addEvent 'domready', =>
+ new OverText('js_place1')
+ new OverText('js_place2')
+ @loadMap()
+ $('js_searchform').addEvent 'submit', (evt) =>
+ evt.stop()
+ @performSearch()
+ loadMap: ->
+ mapOptions =
+ center: new google.maps.LatLng(-34.397, 150.644)
+ zoom: 11
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ @map = new google.maps.Map($('js_map'), mapOptions)
+ @infoWindow = new google.maps.InfoWindow()
+ @placesService = new google.maps.places.PlacesService(@map)
+ google.maps.event.addListener @map, 'dragend', => @loadPlaces()
+ google.maps.event.addListener @map, 'zoom_changed', => @loadPlaces()
+ document.body.addEvent 'mouseover', =>
+ @hlmarker.setMap(null) if @hlmarker
+
+ performSearch: ->
+ @hideErrors()
+ address1 = $('js_place1').value.trim()
+ address2 = $('js_place2').value.trim()
+ if address1 == '' || address2 == ''
+ @error("You can't leave place1 or place2 blank")
+ else
+ @geocode address1, (loc1) =>
+ if loc1
+ @geocode address2, (loc2) =>
+ if loc2
+ @searchNearCenter(loc1, loc2)
+ else
+ @error("Can't find #{address2}")
+ else
+ @error("Can't find #{address1}")
+
+ searchNearCenter: (loc1, loc2) ->
+ $('js_results').setStyle('visibility', 'visible')
+ @centerMarker.setMap(null) if @centerMarker
+ centerLat = (loc1.lat() + loc2.lat()) / 2
+ centerLng = (loc1.lng() + loc2.lng()) / 2
+ @centerPoint = new google.maps.LatLng(centerLat, centerLng)
+ @map.setCenter @centerPoint
+ @map.setZoom 11
+ @centerMarker = new google.maps.Marker
+ map: @map
+ position: @centerPoint
+ icon: 'purple.png'
+ @loadPlaces()
+
+ loadPlaces: ->
+ if @placeMarkers
+ @placeMarkers.each (marker) => marker.setMap(null)
+ @placeMarkers = []
+ $('js_list').empty()
+ request =
+ bounds: @map.getBounds()
+ types: ['restaurant','movie_theater', 'bowling_alley', 'bakery', 'cafe', 'zoo']
+ @placesService.search request, (results, status) =>
+ if status == google.maps.places.PlacesServiceStatus.OK
+ results.each (place) =>
+ marker = new google.maps.Marker
+ map: @map
+ position: place.geometry.location
+ @placeMarkers.push(marker)
+ listElmWrapper = new Element('div').inject($('js_list'))
+ listElm = new Element('div.resultelm').inject(listElmWrapper)
+ new Element('img', {src: place.icon}).inject(listElm)
+ new Element('div.header', {text: place.name}).inject(listElm)
+ new Element('div.types', {text: place.types.join(', ')}).inject(listElm)
+ new Element('div.rating', {text: "rating: #{place.rating} / 5"}).inject(listElm)
+ showPopup = () =>
+ @infoWindow.setContent(listElmWrapper.innerHTML)
+ @infoWindow.open(@map, marker)
+ google.maps.event.addListener marker, 'click', showPopup
+ listElm.addEvent 'click', showPopup
+ listElm.addEvent 'mouseover', (evt) =>
+ evt.stop()
+ @hlmarker.setMap(null) if @hlmarker
+ @hlmarker = new google.maps.Marker
+ map: @map
+ position: marker.getPosition()
+ icon: 'yellow.png'
+ zIndex: 1000
+ else if status == google.maps.places.PlacesServiceStatus.ZERO_RESULTS
+ $('js_list').grab(new Element('div', {text: '0 results :('}))
+
+ hideErrors: ->
+ $('js_errors').setStyle('display', 'none')
+
+ error: (msg) ->
+ $('js_errors').innerHTML = msg
+ $('js_errors').setStyle('display', 'block')
+
+ geocode: (address, callback) ->
+ @geocoder.geocode {'address': address}, (results, status) =>
+ if status == google.maps.GeocoderStatus.OK
+ callback(results[0].geometry.location)
+ else
+ callback(false)
+
+MeetInTheMiddle.setup()
View
161 application.js
@@ -0,0 +1,161 @@
+(function() {
+ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+ window.MeetInTheMiddle = {
+ setup: function() {
+ this.geocoder = new google.maps.Geocoder();
+ return document.addEvent('domready', __bind(function() {
+ new OverText('js_place1');
+ new OverText('js_place2');
+ this.loadMap();
+ return $('js_searchform').addEvent('submit', __bind(function(evt) {
+ evt.stop();
+ return this.performSearch();
+ }, this));
+ }, this));
+ },
+ loadMap: function() {
+ var mapOptions;
+ mapOptions = {
+ center: new google.maps.LatLng(-34.397, 150.644),
+ zoom: 11,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ };
+ this.map = new google.maps.Map($('js_map'), mapOptions);
+ this.infoWindow = new google.maps.InfoWindow();
+ this.placesService = new google.maps.places.PlacesService(this.map);
+ google.maps.event.addListener(this.map, 'dragend', __bind(function() {
+ return this.loadPlaces();
+ }, this));
+ google.maps.event.addListener(this.map, 'zoom_changed', __bind(function() {
+ return this.loadPlaces();
+ }, this));
+ return document.body.addEvent('mouseover', __bind(function() {
+ if (this.hlmarker) {
+ return this.hlmarker.setMap(null);
+ }
+ }, this));
+ },
+ performSearch: function() {
+ var address1, address2;
+ this.hideErrors();
+ address1 = $('js_place1').value.trim();
+ address2 = $('js_place2').value.trim();
+ if (address1 === '' || address2 === '') {
+ return this.error("You can't leave place1 or place2 blank");
+ } else {
+ return this.geocode(address1, __bind(function(loc1) {
+ if (loc1) {
+ return this.geocode(address2, __bind(function(loc2) {
+ if (loc2) {
+ return this.searchNearCenter(loc1, loc2);
+ } else {
+ return this.error("Can't find " + address2);
+ }
+ }, this));
+ } else {
+ return this.error("Can't find " + address1);
+ }
+ }, this));
+ }
+ },
+ searchNearCenter: function(loc1, loc2) {
+ var centerLat, centerLng;
+ $('js_results').setStyle('visibility', 'visible');
+ if (this.centerMarker) {
+ this.centerMarker.setMap(null);
+ }
+ centerLat = (loc1.lat() + loc2.lat()) / 2;
+ centerLng = (loc1.lng() + loc2.lng()) / 2;
+ this.centerPoint = new google.maps.LatLng(centerLat, centerLng);
+ this.map.setCenter(this.centerPoint);
+ this.map.setZoom(11);
+ this.centerMarker = new google.maps.Marker({
+ map: this.map,
+ position: this.centerPoint,
+ icon: 'purple.png'
+ });
+ return this.loadPlaces();
+ },
+ loadPlaces: function() {
+ var request;
+ if (this.placeMarkers) {
+ this.placeMarkers.each(__bind(function(marker) {
+ return marker.setMap(null);
+ }, this));
+ }
+ this.placeMarkers = [];
+ $('js_list').empty();
+ request = {
+ bounds: this.map.getBounds(),
+ types: ['restaurant', 'movie_theater', 'bowling_alley', 'bakery', 'cafe', 'zoo']
+ };
+ return this.placesService.search(request, __bind(function(results, status) {
+ if (status === google.maps.places.PlacesServiceStatus.OK) {
+ return results.each(__bind(function(place) {
+ var listElm, listElmWrapper, marker, showPopup;
+ marker = new google.maps.Marker({
+ map: this.map,
+ position: place.geometry.location
+ });
+ this.placeMarkers.push(marker);
+ listElmWrapper = new Element('div').inject($('js_list'));
+ listElm = new Element('div.resultelm').inject(listElmWrapper);
+ new Element('img', {
+ src: place.icon
+ }).inject(listElm);
+ new Element('div.header', {
+ text: place.name
+ }).inject(listElm);
+ new Element('div.types', {
+ text: place.types.join(', ')
+ }).inject(listElm);
+ new Element('div.rating', {
+ text: "rating: " + place.rating + " / 5"
+ }).inject(listElm);
+ showPopup = __bind(function() {
+ this.infoWindow.setContent(listElmWrapper.innerHTML);
+ return this.infoWindow.open(this.map, marker);
+ }, this);
+ google.maps.event.addListener(marker, 'click', showPopup);
+ listElm.addEvent('click', showPopup);
+ return listElm.addEvent('mouseover', __bind(function(evt) {
+ evt.stop();
+ if (this.hlmarker) {
+ this.hlmarker.setMap(null);
+ }
+ return this.hlmarker = new google.maps.Marker({
+ map: this.map,
+ position: marker.getPosition(),
+ icon: 'yellow.png',
+ zIndex: 1000
+ });
+ }, this));
+ }, this));
+ } else if (status === google.maps.places.PlacesServiceStatus.ZERO_RESULTS) {
+ return $('js_list').grab(new Element('div', {
+ text: '0 results :('
+ }));
+ }
+ }, this));
+ },
+ hideErrors: function() {
+ return $('js_errors').setStyle('display', 'none');
+ },
+ error: function(msg) {
+ $('js_errors').innerHTML = msg;
+ return $('js_errors').setStyle('display', 'block');
+ },
+ geocode: function(address, callback) {
+ return this.geocoder.geocode({
+ 'address': address
+ }, __bind(function(results, status) {
+ if (status === google.maps.GeocoderStatus.OK) {
+ return callback(results[0].geometry.location);
+ } else {
+ return callback(false);
+ }
+ }, this));
+ }
+ };
+ MeetInTheMiddle.setup();
+}).call(this);
View
43 index.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML>
+
+<html>
+ <head>
+ <title>Meet in the Middle</title>
+ <link rel="stylesheet" type="text/css" href="styles.css" />
+ </head>
+ <body>
+ <div class="main">
+ <div class="title">
+ Meet <span class="small">in the</span> Middle
+ </div>
+ <div class="subtitle">
+ Enter 2 addresses and we'll show you can meet in the middle
+ </div>
+ <div class="searchbox">
+ <form id="js_searchform" action="/" method="post">
+ <div class="half">
+ <div class="label">Place 1</div>
+ <input type="text" id="js_place1" title="Address, street, or city"/>
+ </div>
+ <div class="half">
+ <div class="label">Place 2</div>
+ <input type="text" id="js_place2" title="Address, street, or city" />
+ </div>
+ <input type="submit" class="search_button" value="Go" />
+ <div class="cleared"></div>
+ </form>
+ </div>
+ <div id="js_errors" class="errors" style="display:none">Could not find that location</div>
+ <div class="results" id="js_results" style="visibility:hidden">
+ <div class="map" id="js_map"></div>
+ <div class="list" id="js_list">
+ </div>
+ </div>
+ </div>
+ <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
+ <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.4.4/mootools-yui-compressed.js"></script>
+ <script type="text/javascript" src="mootools-more.js"></script>
+ <script type="text/javascript" src="application.js"></script>
+ </body>
+</html>
View
69 mootools-more.js
@@ -0,0 +1,69 @@
+// MooTools: the javascript framework.
+// Load this file's selection again by visiting: http://mootools.net/more/b1a4034ce0793306a67c36eb035b6f90
+// Or build this file again with packager using: packager build More/OverText
+/*
+---
+copyrights:
+ - [MooTools](http://mootools.net)
+
+licenses:
+ - [MIT License](http://mootools.net/license.txt)
+...
+*/
+MooTools.More={version:"1.4.0.1",build:"a4244edf2aa97ac8a196fc96082dd35af1abab87"};Class.Mutators.Binds=function(a){if(!this.prototype.initialize){this.implement("initialize",function(){});
+}return Array.from(a).concat(this.prototype.Binds||[]);};Class.Mutators.initialize=function(a){return function(){Array.from(this.Binds).each(function(b){var c=this[b];
+if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);};};Class.Occlude=new Class({occlude:function(c,b){b=document.id(b||this.element);var a=b.retrieve(c||this.property);
+if(a&&!this.occluded){return(this.occluded=a);}this.occluded=false;b.store(c||this.property,this);return this.occluded;}});(function(){var b=function(e,d){var f=[];
+Object.each(d,function(g){Object.each(g,function(h){e.each(function(i){f.push(i+"-"+h+(i=="border"?"-width":""));});});});return f;};var c=function(f,e){var d=0;
+Object.each(e,function(h,g){if(g.test(f)){d=d+h.toInt();}});return d;};var a=function(d){return !!(!d||d.offsetHeight||d.offsetWidth);};Element.implement({measure:function(h){if(a(this)){return h.call(this);
+}var g=this.getParent(),e=[];while(!a(g)&&g!=document.body){e.push(g.expose());g=g.getParent();}var f=this.expose(),d=h.call(this);f();e.each(function(i){i();
+});return d;},expose:function(){if(this.getStyle("display")!="none"){return function(){};}var d=this.style.cssText;this.setStyles({display:"block",position:"absolute",visibility:"hidden"});
+return function(){this.style.cssText=d;}.bind(this);},getDimensions:function(d){d=Object.merge({computeSize:false},d);var i={x:0,y:0};var h=function(j,e){return(e.computeSize)?j.getComputedSize(e):j.getSize();
+};var f=this.getParent("body");if(f&&this.getStyle("display")=="none"){i=this.measure(function(){return h(this,d);});}else{if(f){try{i=h(this,d);}catch(g){}}}return Object.append(i,(i.x||i.x===0)?{width:i.x,height:i.y}:{x:i.width,y:i.height});
+},getComputedSize:function(d){d=Object.merge({styles:["padding","border"],planes:{height:["top","bottom"],width:["left","right"]},mode:"both"},d);var g={},e={width:0,height:0},f;
+if(d.mode=="vertical"){delete e.width;delete d.planes.width;}else{if(d.mode=="horizontal"){delete e.height;delete d.planes.height;}}b(d.styles,d.planes).each(function(h){g[h]=this.getStyle(h).toInt();
+},this);Object.each(d.planes,function(i,h){var k=h.capitalize(),j=this.getStyle(h);if(j=="auto"&&!f){f=this.getDimensions();}j=g[h]=(j=="auto")?f[h]:j.toInt();
+e["total"+k]=j;i.each(function(m){var l=c(m,g);e["computed"+m.capitalize()]=l;e["total"+k]+=l;});},this);return Object.append(e,g);}});})();(function(b){var a=Element.Position={options:{relativeTo:document.body,position:{x:"center",y:"center"},offset:{x:0,y:0}},getOptions:function(d,c){c=Object.merge({},a.options,c);
+a.setPositionOption(c);a.setEdgeOption(c);a.setOffsetOption(d,c);a.setDimensionsOption(d,c);return c;},setPositionOption:function(c){c.position=a.getCoordinateFromValue(c.position);
+},setEdgeOption:function(d){var c=a.getCoordinateFromValue(d.edge);d.edge=c?c:(d.position.x=="center"&&d.position.y=="center")?{x:"center",y:"center"}:{x:"left",y:"top"};
+},setOffsetOption:function(f,d){var c={x:0,y:0},g=f.measure(function(){return document.id(this.getOffsetParent());}),e=g.getScroll();if(!g||g==f.getDocument().body){return;
+}c=g.measure(function(){var i=this.getPosition();if(this.getStyle("position")=="fixed"){var h=window.getScroll();i.x+=h.x;i.y+=h.y;}return i;});d.offset={parentPositioned:g!=document.id(d.relativeTo),x:d.offset.x-c.x+e.x,y:d.offset.y-c.y+e.y};
+},setDimensionsOption:function(d,c){c.dimensions=d.getDimensions({computeSize:true,styles:["padding","border","margin"]});},getPosition:function(e,d){var c={};
+d=a.getOptions(e,d);var f=document.id(d.relativeTo)||document.body;a.setPositionCoordinates(d,c,f);if(d.edge){a.toEdge(c,d);}var g=d.offset;c.left=((c.x>=0||g.parentPositioned||d.allowNegative)?c.x:0).toInt();
+c.top=((c.y>=0||g.parentPositioned||d.allowNegative)?c.y:0).toInt();a.toMinMax(c,d);if(d.relFixedPosition||f.getStyle("position")=="fixed"){a.toRelFixedPosition(f,c);
+}if(d.ignoreScroll){a.toIgnoreScroll(f,c);}if(d.ignoreMargins){a.toIgnoreMargins(c,d);}c.left=Math.ceil(c.left);c.top=Math.ceil(c.top);delete c.x;delete c.y;
+return c;},setPositionCoordinates:function(k,g,d){var f=k.offset.y,h=k.offset.x,e=(d==document.body)?window.getScroll():d.getPosition(),j=e.y,c=e.x,i=window.getSize();
+switch(k.position.x){case"left":g.x=c+h;break;case"right":g.x=c+h+d.offsetWidth;break;default:g.x=c+((d==document.body?i.x:d.offsetWidth)/2)+h;break;}switch(k.position.y){case"top":g.y=j+f;
+break;case"bottom":g.y=j+f+d.offsetHeight;break;default:g.y=j+((d==document.body?i.y:d.offsetHeight)/2)+f;break;}},toMinMax:function(c,d){var f={left:"x",top:"y"},e;
+["minimum","maximum"].each(function(g){["left","top"].each(function(h){e=d[g]?d[g][f[h]]:null;if(e!=null&&((g=="minimum")?c[h]<e:c[h]>e)){c[h]=e;}});});
+},toRelFixedPosition:function(e,c){var d=window.getScroll();c.top+=d.y;c.left+=d.x;},toIgnoreScroll:function(e,d){var c=e.getScroll();d.top-=c.y;d.left-=c.x;
+},toIgnoreMargins:function(c,d){c.left+=d.edge.x=="right"?d.dimensions["margin-right"]:(d.edge.x!="center"?-d.dimensions["margin-left"]:-d.dimensions["margin-left"]+((d.dimensions["margin-right"]+d.dimensions["margin-left"])/2));
+c.top+=d.edge.y=="bottom"?d.dimensions["margin-bottom"]:(d.edge.y!="center"?-d.dimensions["margin-top"]:-d.dimensions["margin-top"]+((d.dimensions["margin-bottom"]+d.dimensions["margin-top"])/2));
+},toEdge:function(c,d){var e={},g=d.dimensions,f=d.edge;switch(f.x){case"left":e.x=0;break;case"right":e.x=-g.x-g.computedRight-g.computedLeft;break;default:e.x=-(Math.round(g.totalWidth/2));
+break;}switch(f.y){case"top":e.y=0;break;case"bottom":e.y=-g.y-g.computedTop-g.computedBottom;break;default:e.y=-(Math.round(g.totalHeight/2));break;}c.x+=e.x;
+c.y+=e.y;},getCoordinateFromValue:function(c){if(typeOf(c)!="string"){return c;}c=c.toLowerCase();return{x:c.test("left")?"left":(c.test("right")?"right":"center"),y:c.test(/upper|top/)?"top":(c.test("bottom")?"bottom":"center")};
+}};Element.implement({position:function(d){if(d&&(d.x!=null||d.y!=null)){return(b?b.apply(this,arguments):this);}var c=this.setStyle("position","absolute").calculatePosition(d);
+return(d&&d.returnPos)?c:this.setStyles(c);},calculatePosition:function(c){return a.getPosition(this,c);}});})(Element.prototype.position);Element.implement({isDisplayed:function(){return this.getStyle("display")!="none";
+},isVisible:function(){var a=this.offsetWidth,b=this.offsetHeight;return(a==0&&b==0)?false:(a>0&&b>0)?true:this.style.display!="none";},toggle:function(){return this[this.isDisplayed()?"hide":"show"]();
+},hide:function(){var b;try{b=this.getStyle("display");}catch(a){}if(b=="none"){return this;}return this.store("element:_originalDisplay",b||"").setStyle("display","none");
+},show:function(a){if(!a&&this.isDisplayed()){return this;}a=a||this.retrieve("element:_originalDisplay")||"block";return this.setStyle("display",(a=="none")?"block":a);
+},swapClass:function(a,b){return this.removeClass(a).addClass(b);}});Document.implement({clearSelection:function(){if(window.getSelection){var a=window.getSelection();
+if(a&&a.removeAllRanges){a.removeAllRanges();}}else{if(document.selection&&document.selection.empty){try{document.selection.empty();}catch(b){}}}}});var OverText=new Class({Implements:[Options,Events,Class.Occlude],Binds:["reposition","assert","focus","hide"],options:{element:"label",labelClass:"overTxtLabel",positionOptions:{position:"upperLeft",edge:"upperLeft",offset:{x:4,y:2}},poll:false,pollInterval:250,wrap:false},property:"OverText",initialize:function(b,a){b=this.element=document.id(b);
+if(this.occlude()){return this.occluded;}this.setOptions(a);this.attach(b);OverText.instances.push(this);if(this.options.poll){this.poll();}},toElement:function(){return this.element;
+},attach:function(){var b=this.element,a=this.options,c=a.textOverride||b.get("alt")||b.get("title");if(!c){return this;}var d=this.text=new Element(a.element,{"class":a.labelClass,styles:{lineHeight:"normal",position:"absolute",cursor:"text"},html:c,events:{click:this.hide.pass(a.element=="label",this)}}).inject(b,"after");
+if(a.element=="label"){if(!b.get("id")){b.set("id","input_"+String.uniqueID());}d.set("for",b.get("id"));}if(a.wrap){this.textHolder=new Element("div.overTxtWrapper",{styles:{lineHeight:"normal",position:"relative"}}).grab(d).inject(b,"before");
+}return this.enable();},destroy:function(){this.element.eliminate(this.property);this.disable();if(this.text){this.text.destroy();}if(this.textHolder){this.textHolder.destroy();
+}return this;},disable:function(){this.element.removeEvents({focus:this.focus,blur:this.assert,change:this.assert});window.removeEvent("resize",this.reposition);
+this.hide(true,true);return this;},enable:function(){this.element.addEvents({focus:this.focus,blur:this.assert,change:this.assert});window.addEvent("resize",this.reposition);
+this.reposition();return this;},wrap:function(){if(this.options.element=="label"){if(!this.element.get("id")){this.element.set("id","input_"+String.uniqueID());
+}this.text.set("for",this.element.get("id"));}},startPolling:function(){this.pollingPaused=false;return this.poll();},poll:function(a){if(this.poller&&!a){return this;
+}if(a){clearInterval(this.poller);}else{this.poller=(function(){if(!this.pollingPaused){this.assert(true);}}).periodical(this.options.pollInterval,this);
+}return this;},stopPolling:function(){this.pollingPaused=true;return this.poll(true);},focus:function(){if(this.text&&(!this.text.isDisplayed()||this.element.get("disabled"))){return this;
+}return this.hide();},hide:function(c,a){if(this.text&&(this.text.isDisplayed()&&(!this.element.get("disabled")||a))){this.text.hide();this.fireEvent("textHide",[this.text,this.element]);
+this.pollingPaused=true;if(!c){try{this.element.fireEvent("focus");this.element.focus();}catch(b){}}}return this;},show:function(){if(this.text&&!this.text.isDisplayed()){this.text.show();
+this.reposition();this.fireEvent("textShow",[this.text,this.element]);this.pollingPaused=false;}return this;},test:function(){return !this.element.get("value");
+},assert:function(a){return this[this.test()?"show":"hide"](a);},reposition:function(){this.assert(true);if(!this.element.isVisible()){return this.stopPolling().hide();
+}if(this.text&&this.test()){this.text.position(Object.merge(this.options.positionOptions,{relativeTo:this.element}));}return this;}});OverText.instances=[];
+Object.append(OverText,{each:function(a){return OverText.instances.each(function(c,b){if(c.element&&c.text){a.call(OverText,c,b);}});},update:function(){return OverText.each(function(a){return a.reposition();
+});},hideAll:function(){return OverText.each(function(a){return a.hide(true,true);});},showAll:function(){return OverText.each(function(a){return a.show();
+});}});
View
BIN  purple.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
123 styles.css
@@ -0,0 +1,123 @@
+body{
+ text-align: center;
+ margin:0;
+ padding:0;
+ background:url('textured_black_bg.jpg') repeat;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ font-weight: 400;
+ line-height:18px;
+}
+.main{
+ color: #ccc;
+ width:950px;
+ margin:20px auto;
+ text-align: left;
+}
+.title{
+ font-size:50px;
+ font-weight:bold;
+ text-align: center;
+ line-height: 50px;
+}
+.subtitle{
+ text-align: center;
+}
+.small{
+ font-size:30px;
+}
+.cleared{
+ clear:both;
+}
+.half{
+ float:left;
+ width:45%;
+}
+.searchbox, .results{
+ border-radius: 10px;
+ background:#222;
+ border: 1px solid #111;
+ border-bottom-color: #444;
+ border-left-color: #444;
+ position: relative;
+}
+.searchbox{
+ margin-top:30px;
+ padding:30px;
+}
+.label{
+ font-size:18px;
+}
+.searchbox input[type=text]{
+ display:block;
+ padding:10px;
+ width:350px;
+ font-size:18px;
+ border-radius: 3px;
+}
+.overTxtLabel{
+ padding:10px;
+ font-size:18px;
+}
+.errors{
+ background:#e3e319;
+ color:black;
+ padding:5px;
+ border-radius: 5px;
+ margin:10px 0;
+ border:1px solid #222;
+}
+.search_button{
+ position:absolute;
+ bottom:30px;
+ right:30px;
+ text-decoration: none;
+ color:white;
+ font-size:24px;
+ padding:8px 30px;
+ border:1px solid #287928;
+ background:#28c328;
+ border-radius:3px;
+}
+.results{
+ height:300px;
+ margin-top:10px;
+ padding:10px;
+}
+.map{
+ width:600px;
+ height:300px;
+ border:1px solid #CCC;
+ float:left;
+}
+.list{
+ float:left;
+ width:310px;
+ margin-left:10px;
+ height:300px;
+ overflow-y:scroll;
+}
+.resultelm{
+ padding:10px 0 20px;
+ color: #333;
+}
+.list .resultelm{
+ color: #CCC;
+ border-bottom: 1px solid #CCC;
+ cursor:pointer;
+}
+.list .resultelm:hover{
+ background: #333333;
+}
+.resultelm img{
+ float:left;
+ width:50px;
+}
+.resultelm div{
+ margin-left:55px;
+}
+.resultelm .header{
+ font-size:18px;
+ font-weight:bold;
+ margin-bottom:15px;
+}
View
BIN  textured_black_bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  yellow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.