packages/ag-grid-docs/src/dist/aui/js/aui.js
// function that handles moving items into the show more menu
function that handles moving items into the show more menu
function that handles moving items into the show more menu
function moveToResponsiveDropdown(numItems) {
          if (numItems <= 0) {
              return;
          }
          var moreDropdownSectionEl = _skatejsTemplateHtml2.default.wrap(this.$moreMenu[0].querySelector('aui-section'));
          var rightMostIndexToMove = this.rightMostNavItemIndex;
          var leftMostIndexToMove = this.rightMostNavItemIndex - numItems + 1;
          for (var i = rightMostIndexToMove; i >= leftMostIndexToMove; i--) {
              var $navItem = this.menuItems[i].$element;
              var $navItemTrigger = $navItem.children('a');
              _skate2.default.init($navItemTrigger); 
              var $navItemDropdown = (0, _jquery2.default)('#' + $navItemTrigger.attr('aria-controls'));
              var moreDropdownItemEl = document.createElement('aui-item-link');
              moreDropdownItemEl.setAttribute('href', $navItemTrigger.attr('href'));
              if ($navItemTrigger.attr('aria-controls')) {
                  moreDropdownItemEl.setAttribute('for', $navItemTrigger.attr('aria-controls'));
                  $navItemDropdown.addClass('aui-dropdown2-sub-menu');
                  $navItemDropdown.appendTo('body');
              }
              _skate2.default.init(moreDropdownItemEl);
              _skatejsTemplateHtml2.default.wrap(moreDropdownItemEl).textContent = $navItemTrigger.text();
              $navItem.detach();
              moreDropdownSectionEl.insertBefore(moreDropdownItemEl, moreDropdownSectionEl.firstChild);
              this.element.dispatchEvent(new _customEvent2.default('aui-responsive-menu-item-created', {
                  bubbles: true,
                  detail: {
                      originalItem: $navItem[0],
                      newItem: moreDropdownItemEl
                  }
              }));
          }
          this.rightMostNavItemIndex -= numItems;
      }
function moveToResponsiveDropdown ( numItems ) { if ( numItems <= 0 ) { return ; } var moreDropdownSectionEl = _skatejsTemplateHtml2 . default . wrap ( this . $moreMenu [ 0 ] . querySelector ( 'aui-section' ) ) ; var rightMostIndexToMove = this . rightMostNavItemIndex ; var leftMostIndexToMove = this . rightMostNavItemIndex - numItems + 1 ; for ( var i = rightMostIndexToMove ; i >= leftMostIndexToMove ; i -- ) { var $navItem = this . menuItems [ i ] . $element ; var $navItemTrigger = $navItem . children ( 'a' ) ; _skate2 . default . init ( $navItemTrigger ) ; var $navItemDropdown = ( 0 , _jquery2 . default ) ( '#' + $navItemTrigger . attr ( 'aria-controls' ) ) ; var moreDropdownItemEl = document . createElement ( 'aui-item-link' ) ; moreDropdownItemEl . setAttribute ( 'href' , $navItemTrigger . attr ( 'href' ) ) ; if ( $navItemTrigger . attr ( 'aria-controls' ) ) { moreDropdownItemEl . setAttribute ( 'for' , $navItemTrigger . attr ( 'aria-controls' ) ) ; $navItemDropdown . addClass ( 'aui-dropdown2-sub-menu' ) ; $navItemDropdown . appendTo ( 'body' ) ; } _skate2 . default . init ( moreDropdownItemEl ) ; _skatejsTemplateHtml2 . default . wrap ( moreDropdownItemEl ) . textContent = $navItemTrigger . text ( ) ; $navItem . detach ( ) ; moreDropdownSectionEl . insertBefore ( moreDropdownItemEl , moreDropdownSectionEl . firstChild ) ; this . element . dispatchEvent ( new _customEvent2 . default ( 'aui-responsive-menu-item-created' , { bubbles : true , detail : { originalItem : $navItem [ 0 ] , newItem : moreDropdownItemEl } } ) ) ; } this . rightMostNavItemIndex -= numItems ; }
function that handles moving items into the show more menu
function that handles moving items into the show more menu
// Move items (working right-to-left) from the nav bar to the more menu. // ensure all triggers have gone through their lifecycle before we check for submenus