Sha256: e9ef459e7d7dde1a815c0d1835f236b12789faba5cda8fdc6329d8be5e8183de

Contents?: true

Size: 1.15 KB

Versions: 64

Compression:

Stored size: 1.15 KB

Contents

pageflow.tooltipContainer = {
  events: {
    'mouseover [data-tooltip]': function(event) {
      if (!this.tooltip.visible) {
        var target = $(event.target);
        var key = target.data('tooltip');
        var position;

        if (target.data('tooltipAlign') === 'bottom left') {
          position = {
            left: target.position().left,
            top: target.position().top + target.outerHeight()
          };
        }
        else if (target.data('tooltipAlign') === 'bottom right') {
          position = {
            left: target.position().left + target.outerWidth(),
            top: target.position().top + target.outerHeight()
          };
        }
        else {
          position = {
            left: target.position().left + target.outerWidth(),
            top: target.position().top + target.outerHeight() / 2
          };
        }

        this.tooltip.show(I18n.t(key), position, {
          align: target.data('tooltipAlign')
        })
      }
    },

    'mouseout [data-tooltip]': function() {
      this.tooltip.hide();
    }
  },

  onRender: function() {
    this.appendSubview(this.tooltip = new pageflow.TooltipView());
  }
};

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
pageflow-14.5.2 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.2 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.1 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.5.1 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.5.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0.rc2 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0.rc1 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0.beta4 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0.beta3 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.4.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0.beta2 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-15.0.0.beta1 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.3.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.2.1 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.2.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.1.1 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.1.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.0.0 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js
pageflow-14.0.0.rc2 app/assets/javascripts/pageflow/ui/views/mixins/tooltip_container.js