]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Supply hints for OSRM
[rails.git] / app / controllers / application_controller.rb
index fec202ca545fa8b8ee80155c40bbfed44ef6a032..3830df88bf40fb9b117af17b2d1d27804f821be8 100644 (file)
@@ -418,6 +418,10 @@ class ApplicationController < ActionController::Base
     request.body.rewind
   end
 
+  def map_layout
+    request.xhr? ? 'xhr' : 'map'
+  end
+
   def preferred_editor
     editor = if params[:editor]
       params[:editor]
@@ -427,7 +431,7 @@ class ApplicationController < ActionController::Base
       DEFAULT_EDITOR
     end
 
-    if request.env['HTTP_USER_AGENT'] =~ /MSIE/ and editor == 'id'
+    if request.env['HTTP_USER_AGENT'] =~ /MSIE|Trident/ and editor == 'id'
       editor = 'potlatch2'
     end