pushState based navigation between map-based layouts
This commit is contained in:
parent
64cb9b0a8b
commit
a56d1036d5
13 changed files with 275 additions and 143 deletions
|
@ -422,6 +422,10 @@ class ApplicationController < ActionController::Base
|
|||
request.body.rewind
|
||||
end
|
||||
|
||||
def map_layout
|
||||
request.xhr? ? false : 'map'
|
||||
end
|
||||
|
||||
def preferred_editor
|
||||
editor = if params[:editor]
|
||||
params[:editor]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class BrowseController < ApplicationController
|
||||
layout 'map'
|
||||
layout :map_layout
|
||||
|
||||
before_filter :authorize_web
|
||||
before_filter :set_locale
|
||||
|
|
|
@ -321,7 +321,7 @@ class ChangesetController < ApplicationController
|
|||
|
||||
@edits = changesets.order("changesets.created_at DESC").offset((@page - 1) * @page_size).limit(@page_size).preload(:user, :changeset_tags)
|
||||
|
||||
render :action => :list, :layout => 'map'
|
||||
render :action => :list, :layout => map_layout
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class SiteController < ApplicationController
|
||||
layout 'site'
|
||||
layout 'map', :only => [:index, :export]
|
||||
layout :map_layout, :only => [:index, :export]
|
||||
|
||||
before_filter :authorize_web
|
||||
before_filter :set_locale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue