diff --git a/.gitignore b/.gitignore index 11cdd9386..f97bae752 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ public/lib node_modules todo.txt .sass-cache +.byebug_history \ No newline at end of file diff --git a/Gemfile b/Gemfile index c66b8dc55..b0e564c20 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'rake', '~> 12.3.2' gem "will_paginate", "3.1.7" gem "will_paginate-bootstrap" gem "friendly_id" - +gem 'popper_js', '~> 1.11', '>= 1.11.1' # dependencies group :dependencies do gem 'mysql2', '< 0.4' @@ -43,6 +43,7 @@ group :test do end group :development do + gem "byebug" gem "jshintrb" gem "therubyracer" end diff --git a/Gemfile.lock b/Gemfile.lock index ca1e2ab2b..6dcf3f726 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -101,6 +101,7 @@ GEM rack rake (>= 0.8.1) polyglot (0.3.5) + popper_js (1.14.5) power_assert (1.1.4) rack (1.4.7) rack-cache (1.8.0) @@ -197,6 +198,7 @@ DEPENDENCIES open_id_authentication paperclip (~> 4.3.7) passenger + popper_js (~> 1.11, >= 1.11.1) rails (~> 3.2) rake (~> 12.3.2) rdiscount (= 2.2.0.1) diff --git a/app/assets/bower.json b/app/assets/bower.json index a97e5995c..605644e21 100644 --- a/app/assets/bower.json +++ b/app/assets/bower.json @@ -10,7 +10,7 @@ "leaflet-illustrate": "manleyjster/Leaflet.Illustrate#master", "leaflet-image-distort": "manleyjster/ImageDistortLeaflet", - "bootstrap": "http://github.com/twbs/bootstrap/archive/v3.2.0.tar.gz", + "bootstrap": "https://github.com/twbs/bootstrap/archive/v4.3.1.zip", "blueimp-file-upload": "9.7.0", "blueimp-tmpl": "2.5.4", diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 068faeff6..2382cda73 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -11,15 +11,17 @@ // GO AFTER THE REQUIRES BELOW. // +//= require popper //= require jquery/dist/jquery.js //= require jquery-ujs/src/rails.js - //= require bootstrap/dist/js/bootstrap.js //= require leaflet/dist/leaflet //= require leaflet-providers/leaflet-providers.js //= require leaflet-toolbar/dist/leaflet.toolbar.js //= require leaflet-distortableimage/dist/leaflet.distortableimage.js +//= require leaflet-easybutton/src/easy-button.js +//= require leaflet-google/index.js //= require sparklines/source/sparkline.js //= require annotations-legacy.js //= require glfx-js/dist/glfx.js diff --git a/app/assets/javascripts/maps.js b/app/assets/javascripts/maps.js index 40f6aac8f..295149c75 100644 --- a/app/assets/javascripts/maps.js +++ b/app/assets/javascripts/maps.js @@ -1,7 +1,9 @@ +//= require popper //= require jquery-ui/jquery-ui.min.js //= require knitter //= require exif-js/exif.js //= require mapknitter +//= require seiyria-bootstrap-slider/dist/bootstrap-slider.min.js /* Move navbar links into dropdown if nav is inside the sidebar. */ jQuery(document).ready(function($) { diff --git a/app/assets/stylesheets/header.css.scss b/app/assets/stylesheets/header.css.scss index 49e9631a6..3eb380601 100644 --- a/app/assets/stylesheets/header.css.scss +++ b/app/assets/stylesheets/header.css.scss @@ -1,50 +1,23 @@ body { - padding-top: 60px; + padding-top: 70px; } -/* override Bootstrap 3 navbar collapse for medium screen sizes */ -@media (max-width: 1200px) { - .navbar-header { - float: none; - } - - .navbar-left,.navbar-right { - float: none !important; - } - - .navbar-toggle { - display: block; - } - - .navbar-collapse { - border-top: 1px solid transparent; - box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); - } - - .navbar-fixed-top { - top: 0; - border-width: 0 0 1px; - } - - .navbar-collapse.collapse { - display: none !important; - } - - .navbar-nav { - float: none !important; - margin-top: 7.5px; - } +.login-links { + color: rgba(0,0,0,.7); + text-decoration: none; +} - .navbar-nav > li { - float: none; - } +.login-links:visited { + color: rgba(0,0,0,.7); + text-decoration: none; +} - .navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - } +.login-links:hover { + color: rgba(0,0,0,.7); + text-decoration: underline; +} - .collapse.in{ - display:block !important; - } -} \ No newline at end of file +.login-links:active { + color: rgba(0,0,0,.7); + text-decoration: underline; +} diff --git a/app/assets/stylesheets/maps.css.scss b/app/assets/stylesheets/maps.css.scss index aa75a2cd5..83bbb4202 100644 --- a/app/assets/stylesheets/maps.css.scss +++ b/app/assets/stylesheets/maps.css.scss @@ -31,7 +31,7 @@ html, body { } .map-list .map img { - max-height:300px; + max-height: 300px; } .map-list .map h3 { @@ -290,4 +290,4 @@ table .btn { } .fa-red { color:red; -} +} \ No newline at end of file diff --git a/app/assets/stylesheets/style.css.scss b/app/assets/stylesheets/style.css.scss index 437b36704..6a861bb8d 100644 --- a/app/assets/stylesheets/style.css.scss +++ b/app/assets/stylesheets/style.css.scss @@ -25,6 +25,11 @@ It was originally created by Caroline Hadilaksono: http://www.hadilaksono.com font-style: normal; } +.login-form { + width: 200px; + padding-left: 20px; +} + /* Application-wide styles */ h1, h2, h3, h4 { font-family: 'Junction Light', lucida grande,lucida sans console,sans-serif; @@ -93,15 +98,6 @@ label small { display: none; } -.login-form { - width: 200px; - padding: 10px; - label { - margin-top: 5px; - font-weight: normal; - } -} - .alert-error { color: #a94442; background-color: #f2dede; diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 98841b78a..0b1998e31 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -64,7 +64,7 @@ def successful_login(back_to, id) def logout session[:user_id] = nil flash[:success] = "You have successfully logged out." - redirect_to '/' + redirect_to '/' + '?_=' + Time.now.to_i.to_s end protected diff --git a/app/views/images/_new.html.erb b/app/views/images/_new.html.erb index fa6a67c57..a9410fa93 100644 --- a/app/views/images/_new.html.erb +++ b/app/views/images/_new.html.erb @@ -2,11 +2,11 @@ diff --git a/app/views/layouts/_alerts.html.erb b/app/views/layouts/_alerts.html.erb new file mode 100644 index 000000000..0425944c0 --- /dev/null +++ b/app/views/layouts/_alerts.html.erb @@ -0,0 +1,15 @@ +
+ <% flash.each do |key, value| %> + <% if key == :notice %> +
+ <%= value %> +
+ <% else %> +
+ <%= value %> +
+ <% end %> + <% end %> +
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index a33847a41..fdd1e52ad 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,33 +1,36 @@ -