コード例 #1
0
 detachShortcuts = () => {
   key.setScope(this.previousKeyScope);
   key.deleteScope(this.currentKeyScope);
   key.filter = this.previousFilter;
 };
コード例 #2
0
ファイル: modals.js プロジェクト: christophelevis/sonarqube
      this.$el.addClass('modal-large');
    }
  },

  show() {
    const that = this;
    setTimeout(() => {
      that.$el.addClass('in');
      $('.' + that.overlayClassName).addClass('in');
    }, 0);
  },

  onDestroy() {
    $('html').removeClass(this.htmlClassName);
    this.removeOverlay();
    key.deleteScope('modal');
    key.setScope(this.keyScope);
  },

  onCloseClick(e) {
    e.preventDefault();
    this.destroy();
  },

  renderOverlay() {
    const overlay = $('.' + this.overlayClassName);
    if (overlay.length === 0) {
      $(`<div class="${this.overlayClassName}"></div>`).appendTo($('body'));
    }
  },
コード例 #3
0
ファイル: App.js プロジェクト: laiyuncong8404/sonarqube
 detachShortcuts() {
   key.deleteScope('issues');
   window.removeEventListener('keydown', this.handleKeyDown);
   window.removeEventListener('keyup', this.handleKeyUp);
 }
コード例 #4
0
    key('up', 'details', () => {
      that.options.app.controller.selectPrev();
      return false;
    });
    key('down', 'details', () => {
      that.options.app.controller.selectNext();
      return false;
    });
    key('left, backspace', 'details', () => {
      that.options.app.controller.hideDetails();
      return false;
    });
  },

  unbindShortcuts() {
    key.deleteScope('details');
  },

  editCustomRule() {
    new CustomRuleCreationView({
      app: this.options.app,
      model: this.model
    }).render();
  },

  deleteRule() {
    const deleteRuleView = new DeleteRuleView({
      model: this.model
    }).render();

    deleteRuleView.on('delete', () => {