diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js b/app/assets/javascripts/src/Metamaps.GlobalUI.js index 055ec38d..66850cc5 100644 --- a/app/assets/javascripts/src/Metamaps.GlobalUI.js +++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js @@ -55,6 +55,9 @@ $(document).ready(function () { } } + if (Metamaps.Active.Mapper) { + Metamaps.GlobalUI.Search.authInit(); + } }); Metamaps.GlobalUI = { @@ -63,9 +66,11 @@ Metamaps.GlobalUI = { init: function () { var self = Metamaps.GlobalUI; - self.Search.init(); - self.CreateMap.init(); - self.Account.init(); + if (Metamaps.Active.Mapper) { + self.Search.init(); + self.CreateMap.init(); + self.Account.init(); + } //bind lightbox clicks $('.openLightbox').click(function (event) { diff --git a/app/assets/javascripts/src/Metamaps.js b/app/assets/javascripts/src/Metamaps.js index 74974814..745a46bf 100644 --- a/app/assets/javascripts/src/Metamaps.js +++ b/app/assets/javascripts/src/Metamaps.js @@ -1588,6 +1588,7 @@ Metamaps.Util = { Metamaps.Realtime = { stringForLocalhost: 'http://localhost:5001', stringForMetamaps: 'http://metamaps.cc:5001', + stringForTVW: 'http://tvw.mooo.com:5001', stringForHeroku: 'http://gentle-savannah-1303.herokuapp.com', socket: null, isOpen: false, @@ -1610,7 +1611,7 @@ Metamaps.Realtime = { $('body').click(self.close); var railsEnv = $('body').data('env'); - var whichToConnect = railsEnv === 'development' ? self.stringForLocalhost : self.stringForHeroku; + var whichToConnect = railsEnv === 'development' ? self.stringForLocalhost : self.stringForTVW; self.socket = io.connect(whichToConnect); self.startActiveMap(); }, diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index c6002195..75f071ac 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -71,7 +71,7 @@ body, height: 100%; } .homePage .famousYield { - background: url(homepage-bg.png) no-repeat -515px -40px; + } .wrapper.mapPage { overflow: hidden; diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bd95bd64..437ffcad 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,7 @@ class ApplicationController < ActionController::Base protect_from_forgery + + before_filter :require_user # this is for global login include ContentHelper @@ -32,9 +34,13 @@ private def require_user unless authenticated? - flash[:warning] = "You must be logged in." - store_location and redirect_to new_user_session_path - return false + + path = request.env["PATH_INFO"] + + unless path == "/" || path == new_user_registration_path || path == new_user_session_path + store_location_for(:user, path) and redirect_to root_url + return false + end end end diff --git a/app/controllers/mappings_controller.rb b/app/controllers/mappings_controller.rb index b28c7638..315cfc8f 100644 --- a/app/controllers/mappings_controller.rb +++ b/app/controllers/mappings_controller.rb @@ -1,7 +1,5 @@ class MappingsController < ApplicationController - - before_filter :require_user, only: [:create, :update, :destroy] - + respond_to :json # GET /mappings/1.json diff --git a/app/controllers/maps_controller.rb b/app/controllers/maps_controller.rb index 72d81656..17c6c71f 100644 --- a/app/controllers/maps_controller.rb +++ b/app/controllers/maps_controller.rb @@ -1,7 +1,5 @@ class MapsController < ApplicationController - before_filter :require_user, only: [:create, :update, :destroy] - respond_to :html, :json autocomplete :map, :name, :full => true, :extra_data => [:user_id] diff --git a/app/controllers/synapses_controller.rb b/app/controllers/synapses_controller.rb index c048627c..45fc4eda 100644 --- a/app/controllers/synapses_controller.rb +++ b/app/controllers/synapses_controller.rb @@ -1,7 +1,5 @@ class SynapsesController < ApplicationController include TopicsHelper - - before_filter :require_user, only: [:create, :update, :destroy] respond_to :json diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index c2690756..388322cf 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -1,8 +1,6 @@ class TopicsController < ApplicationController include TopicsHelper - before_filter :require_user, only: [:create, :update, :destroy] - respond_to :html, :js, :json # GET /topics/autocomplete_topic diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 26085e6b..f4ae90c9 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,6 +1,4 @@ class UsersController < ApplicationController - - before_filter :require_user, only: [:edit, :update, :updatemetacodes] respond_to :html, :json diff --git a/app/views/layouts/_account.html.erb b/app/views/layouts/_account.html.erb index ffe69b7e..e1e73cd6 100644 --- a/app/views/layouts/_account.html.erb +++ b/app/views/layouts/_account.html.erb @@ -3,7 +3,6 @@ # The inner HTML of the account box that comes up in the bottom left #%> -<% if authenticated? %> <% account = current_user %> <%= image_tag user.image.url(:thumb), :size => "48x48", :class => "sidebarAccountImage" %>
Please Donate To Bitcoin Address: [[address]]
- -The Metamaps platform is currently in an invite-only beta with the express purpose of creating a high value knowledge ecosystem, as well as building a community of contributors. As a valued beta tester, you have the ability to invite your peers, colleagues and collaborators onto the platform.
-Copy and send the link + access code below. The access code below is your personal code and can be used multiple times.
-HTTP://METAMAPS.CC/JOIN
- <% mapper = current_user %> -ACCESS CODE: <%= mapper.code %>
-