From b028c626c72299656b5fde4458a7bb2783ad8e02 Mon Sep 17 00:00:00 2001
From: bcanini <canini.16@osu.edu>
Date: Thu, 14 Feb 2019 10:06:19 -0500
Subject: [PATCH] asc_bootstrap - people mobile view redirect

---
 web/themes/asc_bootstrap/js/scripts.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/web/themes/asc_bootstrap/js/scripts.js b/web/themes/asc_bootstrap/js/scripts.js
index 67853acca5..29f1176890 100644
--- a/web/themes/asc_bootstrap/js/scripts.js
+++ b/web/themes/asc_bootstrap/js/scripts.js
@@ -8,7 +8,6 @@ jQuery(document).ready(function(){
     jQuery(".path-people .main-container aside").css({'height':(jQuery(".path-people .main-container section").height()+'px')});
   }
 
-
   //adds fontawesome arrow to menu
 
   //check if is iPhone
@@ -97,6 +96,13 @@ jQuery(document).ready(function(){
     jQuery('section.col-sm-9').addClass('col-sm-pull-3');
   }*/
 
+  //redirect if mobile for people directory main page
+  if(((window.location.pathname == '/people')||(window.location.pathname == '/directory')) && (jQuery(window).width() <= 740)) {
+      document.location = "people-mobile";
+  }
+
+
+  //sidebar arrows
   if (jQuery(".sidebar-nav .active-trail").length) {
     jQuery(".sidebar-nav .active-trail").find("i").removeClass('fa-angle-right').addClass( 'fa-angle-down' );
   }
-- 
GitLab