Example #1
0
    Ember.run.debounce(this, () => {
      if (this.offTarget && !event.target.classList.contains('toolkit-draggable')) {
        return;
      }

      this.offTarget = false;
      const invertedDifference = this.currentX - event.clientX;
      const difference = invertedDifference * -1;

      const { isNeighborResizable, neighborCellName } = this.getNeighborOf(this.currentResizableClass);

      if (!isNeighborResizable) {
        return;
      }

      const $elementsOfTypeNeighbor = $(`.${neighborCellName}`);
      const neighborWidth = $elementsOfTypeNeighbor.width();
      const newNeighborWidth = neighborWidth - difference;

      const $elementsOfTypeCurrentResizable = $(`.${this.currentResizableClass}`);
      const currentResizableWidth = $elementsOfTypeCurrentResizable.width();
      const newCurrentResizableWidth = currentResizableWidth + difference;

      if (newNeighborWidth < 50 || newCurrentResizableWidth < 50) {
        this.offTarget = true;
        return;
      }

      this.currentX = event.clientX;
      $elementsOfTypeCurrentResizable.width(newCurrentResizableWidth);
      setToolkitStorageKey(`column-width-${this.currentResizableClass}`, newCurrentResizableWidth);

      $elementsOfTypeNeighbor.width(newNeighborWidth);
      setToolkitStorageKey(`column-width-${neighborCellName}`, newNeighborWidth);
    }, 100);
Example #2
0
 `).click(() => {
   let hide = !toolkitHelper.getToolkitStorageKey('hide-help', 'boolean');
   toolkitHelper.setToolkitStorageKey('hide-help', hide);
   $('body').toggleClass('toolkit-hide-help');
   let accountController = ynabToolKit.shared.containerLookup('controller:accounts');
   accountController.send('closeModal');
 }).appendTo($modalList);
Example #3
0
  invoke() {
    let hide = toolkitHelper.getToolkitStorageKey('hide-help');

    if (hide === null) {
      toolkitHelper.setToolkitStorageKey('hide-help', 'true');
      hide = 'true';
    }

    if (hide === 'true') {
      $('body').addClass('toolkit-hide-help');
    }

    this.updatePopupButton();
  }