Remove unnecessary js and markup for unused manufacturer dropdown
authorLaury GvR <laury@gaslightmedia.com>
Tue, 28 Aug 2018 20:19:03 +0000 (16:19 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 28 Aug 2018 20:19:03 +0000 (16:19 -0400)
js/app.js
js/custom/pageSetup.js
parts/manufacturers.php

index d51ac5d..f82bf8e 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -41,24 +41,24 @@ $(document).ready(function () {
     });
 
     if( $(window).width() > 786){
-        $('.manufacturer-brand').attr('data-options',"is_hover:true" );
+        //$('.manufacturer-brand').attr('data-options',"is_hover:true" );
         $(document).foundation('dropdown', 'reflow');
     }else{
-        $('.glm-rv-brand').each(function(){
-            let url = $(this).children('a').attr('href');
-            $(this).attr('data-url', url);
-        })
-        $('.glm-rv-brand').on("click", function(){
-            window.location = $(this).data('url');
-        })
-        $('.manufacturer-brand').each(function(){
-            let url = $(this).children('a').attr('href');
-            if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){
-                // $(this).attr('data-url', url);
-                $(this).on("click", function(){
-                    window.location = url;
-                })
-            }
-        })
+        // $('.glm-rv-brand').each(function(){
+        //     let url = $(this).children('a').attr('href');
+        //     $(this).attr('data-url', url);
+        // })
+        // $('.glm-rv-brand').on("click", function(){
+        //     window.location = $(this).data('url');
+        // })
+        // $('.manufacturer-brand').each(function(){
+        //     let url = $(this).children('a').attr('href');
+        //     if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){
+        //         // $(this).attr('data-url', url);
+        //         $(this).on("click", function(){
+        //             window.location = url;
+        //         })
+        //     }
+        // })
     }
 });
index eefc93f..9a20a60 100644 (file)
@@ -32,24 +32,24 @@ $(document).ready(function () {
     });
 
     if( $(window).width() > 786){
-        $('.manufacturer-brand').attr('data-options',"is_hover:true" );
+        //$('.manufacturer-brand').attr('data-options',"is_hover:true" );
         $(document).foundation('dropdown', 'reflow');
     }else{
-        $('.glm-rv-brand').each(function(){
-            let url = $(this).children('a').attr('href');
-            $(this).attr('data-url', url);
-        })
-        $('.glm-rv-brand').on("click", function(){
-            window.location = $(this).data('url');
-        })
-        $('.manufacturer-brand').each(function(){
-            let url = $(this).children('a').attr('href');
-            if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){
-                // $(this).attr('data-url', url);
-                $(this).on("click", function(){
-                    window.location = url;
-                })
-            }
-        })
+        // $('.glm-rv-brand').each(function(){
+        //     let url = $(this).children('a').attr('href');
+        //     $(this).attr('data-url', url);
+        // })
+        // $('.glm-rv-brand').on("click", function(){
+        //     window.location = $(this).data('url');
+        // })
+        // $('.manufacturer-brand').each(function(){
+        //     let url = $(this).children('a').attr('href');
+        //     if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){
+        //         // $(this).attr('data-url', url);
+        //         $(this).on("click", function(){
+        //             window.location = url;
+        //         })
+        //     }
+        // })
     }
 });
index ce9c55a..8757505 100644 (file)
@@ -26,7 +26,7 @@ unset($manufacturers['RV Classes']);
                         }
                 } ?>
             
-                <li class="manufacturer-brand"  data-dropdown="<?php echo sanitize_title($manufacturer); ?>">
+                <li class="manufacturer-brand">
 
                     <?php if ($block->url){ ?> 
                         <a href="<?php echo $block->url; ?>"> 
@@ -34,19 +34,6 @@ unset($manufacturers['RV Classes']);
 
                     <?php apply_filters('glm_block_image', $block->ID); ?>
                     <?php if ($block->url){ ?> </a> <?php } ?>
-                    <?php $class = false; ;?>
-                    <?php if(count($manufacturers[$manufacturer]) < 4 ) { $class = "one_col";} else { $class = "two_col";} ?>
-                        <?php if( isset($manufacturers[$manufacturer] ) && !empty($manufacturers[$manufacturer]) ){ ?>
-                        <ul id="<?php echo sanitize_title($manufacturer); ?>"class="glm-rv-brand-list f-dropdown <?php echo $class; ?>" data-dropdown-content">
-                            <?php foreach($manufacturers[$manufacturer] as $key=>$value){ ?>
-                                <li class="glm-rv-brand">
-                                    <a href="<?php echo $block->url; ?>&categorySearchMultiple[]=<?php echo $value['id']; ?>">
-                                        <?php echo $value['brand']; ?>
-                                    </a>
-                                </li>
-                            <?php } ?>
-                        </ul>
-                    <?php } ?>
                 </li>
 
             <?php } ?>