From 57a8b654ba871d4a9c22f102e8e5e7479bf15b68 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 5 Feb 2016 21:25:20 +0800 Subject: [PATCH 1/5] smoother 'added by me' filtering --- app/assets/javascripts/src/Metamaps.GlobalUI.js.erb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb index b08217a7..7cc97da0 100644 --- a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb +++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb @@ -655,14 +655,11 @@ Metamaps.GlobalUI.Search = { self.limitMapsToMe = !self.limitMapsToMe; } - // set the value of the search equal to itself to retrigger the autocomplete event - self.isOpen = false; + // set the value of the search equal to itself to retrigger the + // autocomplete event var searchQuery = $('.sidebarSearchField.tt-input').val(); $(".sidebarSearchField").typeahead('val', '') - $(".sidebarSearchField").focus().typeahead('val', searchQuery).focus(); - setTimeout(function () { - self.isOpen = true; - }, 2000); + .typeahead('val', searchQuery); }); // when the user clicks minimize section, hide the results for that section From 67da49c1be07147a0e8e61afc049c595541de10b Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 5 Feb 2016 22:13:23 +0800 Subject: [PATCH 2/5] max height on search results so they scroll --- app/assets/stylesheets/search.scss.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/search.scss.erb b/app/assets/stylesheets/search.scss.erb index efd196cb..1d7ec7c4 100644 --- a/app/assets/stylesheets/search.scss.erb +++ b/app/assets/stylesheets/search.scss.erb @@ -136,6 +136,7 @@ top: 40px !important; background: #F5F5F5; width: 472px; + max-height: 25em; overflow-y: auto; overflow-x: visible; box-shadow: 0 10px 10px rgba(0,0,0,0.19), 0 6px 3px rgba(0,0,0,0.23); From 785e7dda4b746431409c95fd38c4f70951a5110a Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 6 Feb 2016 09:34:51 +0800 Subject: [PATCH 3/5] create 503.html for server maintenance --- public/404.html | 20 ++++---- public/503.html | 128 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 10 deletions(-) create mode 100644 public/503.html diff --git a/public/404.html b/public/404.html index da435ea6..d07c1069 100644 --- a/public/404.html +++ b/public/404.html @@ -26,16 +26,16 @@ } body { - background: #d8d9da url(https://s3.amazonaws.com/metamaps-assets/site/shattered_%402X.png); - font-family: 'din-regular', helvetica, sans-serif; - color: #424242; - text-align: justify; - font-size: 18px; - line-height: 18px; - } - .dialog a { - color:#c04f4f; - } + background: #d8d9da url(https://s3.amazonaws.com/metamaps-assets/site/shattered_%402X.png); + font-family: 'din-regular', helvetica, sans-serif; + color: #424242; + text-align: justify; + font-size: 18px; + line-height: 18px; + } + .dialog a { + color:#c04f4f; + } .title{ font-size:50px; line-height: 50px; diff --git a/public/503.html b/public/503.html new file mode 100644 index 00000000..408ba46e --- /dev/null +++ b/public/503.html @@ -0,0 +1,128 @@ + + + + Down for maintenance (503) + + + + + +
+
+

503 - Down for Maintenance

+

Metamaps is offline!

+

Don't worry, this is intentional. We're probably just turning on some great new features.

+

In the meantime, you can visit our blog, or aimlessly search YouTube until we're back online.

+ GO TO OUR TWITTER FEED + GO TO OUR BLOG + +
+
+
+
+ + From ea11ce69e5ad71785d99753eb1c5e4bf320f3394 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 6 Feb 2016 09:42:33 +0800 Subject: [PATCH 4/5] update public dir, including 503.html' --- public/404.html | 0 public/422.html | 0 public/500.html | 0 public/503.html | 0 public/famous/main.js | 0 public/famous/templates.js | 0 public/favicon.ico | Bin public/robots.txt | 0 8 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 public/404.html mode change 100644 => 100755 public/422.html mode change 100644 => 100755 public/500.html mode change 100644 => 100755 public/503.html mode change 100644 => 100755 public/famous/main.js mode change 100644 => 100755 public/famous/templates.js mode change 100644 => 100755 public/favicon.ico mode change 100644 => 100755 public/robots.txt diff --git a/public/404.html b/public/404.html old mode 100644 new mode 100755 diff --git a/public/422.html b/public/422.html old mode 100644 new mode 100755 diff --git a/public/500.html b/public/500.html old mode 100644 new mode 100755 diff --git a/public/503.html b/public/503.html old mode 100644 new mode 100755 diff --git a/public/famous/main.js b/public/famous/main.js old mode 100644 new mode 100755 diff --git a/public/famous/templates.js b/public/famous/templates.js old mode 100644 new mode 100755 diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 diff --git a/public/robots.txt b/public/robots.txt old mode 100644 new mode 100755 From 246c34495930d86afef310c35bffccab9e08a698 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 6 Feb 2016 09:42:40 +0800 Subject: [PATCH 5/5] add rake perms:fix task for public dir --- lib/tasks/perms.rake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/tasks/perms.rake diff --git a/lib/tasks/perms.rake b/lib/tasks/perms.rake new file mode 100644 index 00000000..70cd60f0 --- /dev/null +++ b/lib/tasks/perms.rake @@ -0,0 +1,16 @@ +require 'dotenv/tasks' + +namespace :perms do + desc "Update the Unix permissions on the public directory" + task :fix => :environment do + # e.g. rake perms:fix user=mmstaging group=mmstaging + # e.g. rake perms:fix group=www-data #probably don't need this one + # e.g. rake perms:fix + user = ENV['user'] || 'metamaps' + group = ENV['group'] || 'metamaps' + public_dir = Rails.root.join('public').to_s + system "chown -R #{user}:#{group} #{public_dir}" + system "find #{public_dir} -type d -exec chmod 755 '{}' \\;" + system "find #{public_dir} -type f -exec chmod 644 '{}' \\;" + end +end