SHARE
TWEET

Untitled

a guest Oct 23rd, 2015 200 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php include(DIR_WS_CLASSES . 'catmenu.php'); ?>
  2. <div id="catMenu" class="col-sm-12">
  3.          <nav class="navbar navbar-default" role="navigation">
  4.       <div class="navbar-header">
  5.                 <button type="button" class="btn btn-default navbar-toggle" data-toggle="collapse" data-target="#bs-navbar-collapse">
  6.                         <span class="sr-only">Toggle Navigation</span>
  7.                         <i class="fa fa-chevron-down"></i> <?php echo TEXT_COLLAPSE_MENU; ?>
  8.                 </button>
  9.       </div>
  10.       <div class="collapse navbar-collapse" id="bs-navbar-collapse">
  11.           <?php echo build_hoz(); ?>
  12.                  
  13.                  
  14.                    <div class=" hidden-sm hidden-md pull-right"><center>
  15.   <?php
  16.   $manufacturers_query = tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m left join " . TABLE_PRODUCTS . " p on m.manufacturers_id = p.manufacturers_id left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id where c.categories_status = '1' and p.products_status = '1' order by m.manufacturers_name"); {
  17.  
  18. // Display a drop-down
  19.       $manufacturers_array = array();
  20.       if (MAX_MANUFACTURERS_LIST < 2) {
  21.         $manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_MANU);
  22.       }
  23.  
  24.      while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
  25.             $manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);
  26.             $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'],
  27.                                            'text' => $manufacturers_name);
  28.           }
  29.                  
  30. echo tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', $request_type, false), 'get','class="navbar-form navbar-left" ') .
  31.                      tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''), 'onchange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"') . tep_hide_session_id() .
  32.                      '</form>';
  33.  
  34.   }
  35. ?> </center></div>
  36.                  
  37.                  
  38.       </div>
  39.     </nav>
  40. </div>
  41. <style>
  42. .dropdown-submenu {
  43.   position:relative;
  44. }
  45. .dropdown-menu > .dropdown > .dropdown-menu, .dropdown-submenu > .dropdown-menu {
  46.   top:0;
  47.   left:50%;
  48.   margin-top:-6px;
  49.   -webkit-border-radius:0 6px 6px 6px;
  50.   -moz-border-radius:0 6px 6px 6px;
  51.   border-radius:0 6px 6px 6px
  52. }
  53. .dropdown-menu > .dropdown > a:after, .dropdown-submenu > a:after {
  54.   display: inline-block;
  55.   content: "\f0da";
  56.   font-family: FontAwesome;
  57.   margin-left: 10px;
  58.   color: #cccccc;
  59. }
  60. .dropdown-submenu:hover > a:after {
  61.   color:#555;
  62. }
  63. </style>
  64. <script>
  65. $(document).ready(function(){
  66.     $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
  67.       event.preventDefault();
  68.       event.stopPropagation();
  69.       $(this).parent().siblings().removeClass('open');
  70.       $(this).parent().toggleClass('open');
  71.     });
  72. });
  73. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top