fixing mobile view check to override view to agenda in mobile
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 12 May 2017 15:31:51 +0000 (11:31 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 12 May 2017 15:31:51 +0000 (11:31 -0400)
adjusted the checking in the events list page to check if the user is in mobile view
to override the view to agenda in mobile view

views/front/events/agenda.html

index 973d1b1..759ade9 100644 (file)
                 return false;
             }
         }
-        console.log(in_mobile());
+
         months = JSON.parse(months);
 
 //        console.log(sessionStorage.view + " : " + sessionStorage.override);
         
         if( sessionStorage.view && sessionStorage.override === 'no' && !in_mobile()){
             view = sessionStorage.view;
-        } else if( sessionStorage.override === 'yes'){
+        } else if( sessionStorage.override === 'yes' || in_mobile()){
             view = 'agenda';
-        }
+        } 
 
         // AJAX FUNCTION ************************************************
         // Get calendar month via AJAX