From 0ac2b3432ed01d597c313fbfb18c770294a92a34 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 25 Mar 2015 14:59:25 -0700 Subject: [PATCH 1/7] Revert "Merge pull request #20 from yoshuawuyts/patch-1" This reverts commit f1392f14cbd4117658e244c77255998a7285fcae, reversing changes made to cea0fe9df2f997142987417b88b1752c144bad40. --- css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index 39e966f..0ee1c73 100644 --- a/css/style.css +++ b/css/style.css @@ -12,7 +12,7 @@ table {text-align: left; width: 100%} th {padding: 10px 0px;} - td, text {padding: 3px 18px 3px 0px; font-size: 14px;} + td, text {padding: 3px 20px 3px 0px; font-size: 14px;} #tableFilter {margin: 12px 0px; border: none; border-bottom: 1px solid #333; background-color: transparent; padding: 0px; font-family: Merriweather; color: #fff; font-size: 13px; height: 22px;} .noMatches {margin-left: 20px; font-size: 11px; font-style: italic; visibility: hidden;} @@ -50,4 +50,4 @@ .leaflet-popup-content {font-family: Merriweather;} .leaflet-popup-content h2 {margin-bottom: 4px;} - img.petThumbs {height: 80px; width: 80px; border-radius: 1000px;} + img.petThumbs {height: 80px; width: 80px; border-radius: 1000px;} \ No newline at end of file From 4bd6385d92a8b37782e9fc6fd0006ebcd989485b Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 25 Mar 2015 15:18:08 -0700 Subject: [PATCH 2/7] fix for overlapping buttons --- css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index 0ee1c73..5b8c2b5 100644 --- a/css/style.css +++ b/css/style.css @@ -12,7 +12,7 @@ table {text-align: left; width: 100%} th {padding: 10px 0px;} - td, text {padding: 3px 20px 3px 0px; font-size: 14px;} + td, text {padding: 3px 0 3px 0; font-size: 14px;} #tableFilter {margin: 12px 0px; border: none; border-bottom: 1px solid #333; background-color: transparent; padding: 0px; font-family: Merriweather; color: #fff; font-size: 13px; height: 22px;} .noMatches {margin-left: 20px; font-size: 11px; font-style: italic; visibility: hidden;} @@ -50,4 +50,4 @@ .leaflet-popup-content {font-family: Merriweather;} .leaflet-popup-content h2 {margin-bottom: 4px;} - img.petThumbs {height: 80px; width: 80px; border-radius: 1000px;} \ No newline at end of file + img.petThumbs {height: 80px; width: 80px; border-radius: 1000px;} From 8c65460501b5528c6aeb02abfd8ab824c991e235 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sat, 28 Mar 2015 23:05:21 -0700 Subject: [PATCH 3/7] fix zoom, add todo --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index f0a821b..def31d3 100644 --- a/index.html +++ b/index.html @@ -152,10 +152,11 @@ }) // set it and pan to it $('#latestSpot').html(latestSpot) - map.panTo([theLatestSpot.lat, theLatestSpot.long]) + map.setView([theLatestSpot.lat, theLatestSpot.long], 14) // when someone clicks on a row, highlight it and // re-center the map + // TODO show popup, change marker color $('.spotRow').live("click", function(event) { $('.spotRow').removeClass("selectedRow") var rowNumber = $(this).closest("tr").attr("id") @@ -167,7 +168,7 @@ $('#latestSpot').css("display", "none") $('#selectedSpot').html(selectedSpot).css("display", "inline") var selectedCoords = [dataElement[0].lat, dataElement[0].long] - map.panTo(selectedCoords) + map.setView(selectedCoords, 14) }) // so that the first map and info that loads From a0a41e01aa8a83938324690ad8d2d89d6caa8a46 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Fri, 3 Apr 2015 12:42:20 +0800 Subject: [PATCH 4/7] Hide state if no state, fixes #25 --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index def31d3..a55d75c 100644 --- a/index.html +++ b/index.html @@ -71,7 +71,7 @@

MOST RECENT SPOT

{{name}}

{{address}}

-

{{city}}, {{state}} {{#postcode}}, {{postcode}} {{/postcode}}

+

{{city}}{{#state}}, {{state}}{{/state}}{{#postcode}}, {{postcode}}{{/postcode}}

  • Wifi: {{wifipassword}}
  • Outlets: {{outlets}}
  • @@ -97,7 +97,7 @@

    SELECTED SPOT

    {{name}}

    {{address}}

    -

    {{city}}, {{state}} {{#postcode}}, {{postcode}} {{/postcode}}

    +

    {{city}}{{#state}}, {{state}}{{/state}}{{#postcode}}, {{postcode}}{{/postcode}}

    • Wifi: {{wifipassword}}
    • Outlets: {{outlets}}
    • From 44c23bf97f0358a874f02aab684fd2bbeba7e460 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Fri, 3 Apr 2015 12:46:44 +0800 Subject: [PATCH 5/7] Dont change the color of the most recently added spot's marker --- index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.html b/index.html index def31d3..b726d6d 100644 --- a/index.html +++ b/index.html @@ -135,8 +135,6 @@ // useful bits from the original data var optionsJSON = ["name", "address", "city", "rowNumber"] var geoJSON = Sheetsee.createGeoJSON(gData, optionsJSON) - // change the color of the most recently added spot's marker - geoJSON[geoJSON.length - 1].properties["marker-color"] = "#FF4646" // create map, tilelayer (map background), markers and popups var map = Sheetsee.loadMap("map") From 2dc740a27f3b9a3cff2798c35d2d8b379c2648f3 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Fri, 3 Apr 2015 13:02:42 +0800 Subject: [PATCH 6/7] Add basic hash method --- index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.html b/index.html index def31d3..f2ef0cd 100644 --- a/index.html +++ b/index.html @@ -218,6 +218,17 @@ numberOfSpots: gData.length }) $('#theNumberofSpots').html(theNumberofSpots) + + filterOnHash() + } + + window.onhashchange = filterOnHash + + function filterOnHash() { + if(window.location.hash) { + $('#tableFilter').val(window.location.hash.substring(1)).keyup() + $('.spotRow').first().click() + } } From 2d30417f38099c12bfdfb980f25f130643120f36 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Fri, 3 Apr 2015 13:07:04 +0800 Subject: [PATCH 7/7] Change hash when filtering, select first after filter --- index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index f2ef0cd..392eee9 100644 --- a/index.html +++ b/index.html @@ -219,17 +219,16 @@ }) $('#theNumberofSpots').html(theNumberofSpots) - filterOnHash() - } - - window.onhashchange = filterOnHash - - function filterOnHash() { if(window.location.hash) { $('#tableFilter').val(window.location.hash.substring(1)).keyup() $('.spotRow').first().click() } } + + $(document).on('keyup', '#tableFilter', function() { + window.location.hash = $(this).val() + $('.spotRow').first().click() + })