src/core/popover.js
/**
   * Enables, disables buttons, sets the text and
   * decides if to show them or not
   */
Enables, disables buttons, sets the text and
decides if to show them or not
Enables disables buttons sets the text and decides if to show them or not
renderButtons() {
    this.nextBtnNode.innerHTML = this.options.nextBtnText;
    this.prevBtnNode.innerHTML = this.options.prevBtnText;
    this.closeBtnNode.innerHTML = this.options.closeBtnText;
    if (!this.options.showButtons || !this.options.totalCount || this.options.totalCount === 1) {
      this.footerNode.style.display = 'none';
      return;
    }
    this.footerNode.style.display = 'block';
    if (this.options.isFirst) {
      this.prevBtnNode.classList.add(CLASS_BTN_DISABLED);
      this.nextBtnNode.innerHTML = this.options.startBtnText;
    } else {
      this.prevBtnNode.classList.remove(CLASS_BTN_DISABLED);
    }
    if (this.options.isLast) {
      this.nextBtnNode.innerHTML = this.options.doneBtnText;
    } else {
      this.nextBtnNode.innerHTML = this.options.nextBtnText;
    }
  }
renderButtons ( ) { this . nextBtnNode . innerHTML = this . options . nextBtnText ; this . prevBtnNode . innerHTML = this . options . prevBtnText ; this . closeBtnNode . innerHTML = this . options . closeBtnText ; if ( ! this . options . showButtons || ! this . options . totalCount || this . options . totalCount === 1 ) { this . footerNode . style . display = 'none' ; return ; } this . footerNode . style . display = 'block' ; if ( this . options . isFirst ) { this . prevBtnNode . classList . add ( CLASS_BTN_DISABLED ) ; this . nextBtnNode . innerHTML = this . options . startBtnText ; } else { this . prevBtnNode . classList . remove ( CLASS_BTN_DISABLED ) ; } if ( this . options . isLast ) { this . nextBtnNode . innerHTML = this . options . doneBtnText ; } else { this . nextBtnNode . innerHTML = this . options . nextBtnText ; } }
Enables, disables buttons, sets the text and
 decides if to show them or not
Enables disables buttons sets the text and decides if to show them or not
// If there was only one item, hide the buttons