If you set the config options at admin/config/content/qtip to Click instead of Hover, it doesn't seem to make a difference in the DnD library. Still appears on hover. Our users are annoyed by how sensitive the hover is, so changing to click was supposed to be a quick/easy solution. Any ideas?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scotwith1t’s picture

If it's not possible to respect the settings there, can the scald implementation at least use hover intent or only show qtip on hovering on the thumbnail? It's just way too sensitive and the preview covers up content when you don't necessarily want to see the preview.

scotwith1t’s picture

I've been able to modify the settings by adding my own config to a custom module in the Drupal.dnd.qTipSettings definition. In case someone else needs to do this, it's pretty simple.

(function($) {

  Drupal.behaviors.scaldOverrides = {
    attach: function(context, settings) {
      /**
       * Override default qtip settings
       */
      Drupal.dnd.qTipSettings = {
        position: {
          my: 'right center',
          at: 'left center'
        },
        hide: {
          fixed: true,
          delay: 200
        },
        show: {
          solo: true,
          event: 'click'
        },
        style: {
          classes: 'nasa-tooltip ui-tooltip-scald-dnd'
        }
      };
    }
})(jQuery);

nagy.balint’s picture

Thanks for sharing, worked like a charm.

nagy.balint’s picture

Status: Active » Needs review
FileSize
3.6 KB

Here is a patch that solves the problem, by adding an option to select an instance in the dnd settings form, and then using that instead of the default settings for qtip v2.

I've removed the deprecated code for qtip v1, as the 1.x branch is not supported for a long time now, so its time to move on.

Status: Needs review » Needs work
nagy.balint’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Needs work » Needs review

gifad’s picture

Clarification may be necessary about qtip versions : I was using qtip drupal module version 7.x-1.5, with qtip jquery library version 2, and this gave php errors : Obviously, the qtip module v2 is required; After installing and enabling latest qTip 7.x-2.0-rc3, it was still stuck on :

  // Add the qTip library as a dependency if it exists
  if (module_exists('qtip')) {
    $libraries['library']['dependencies'][] = array('qtip', 'qtip');
  }

, which I had to remove...
Or am I missing something ?

gifad’s picture

Solved by :

  // Add the qTip library as a dependency if it exists
  if (module_exists('qtip')) {
  //$libraries['library']['dependencies'][] = array('qtip', 'qtip');
    drupal_add_library('qtip', 'qtip');
  }

as suggested in qtip release note.

But this is still totally obscure to me..

gifad’s picture

Actually, the issue was already detected : #2248337: No Libary preview , with a better workaround

nagy.balint’s picture

Aye i had that patch applied already.

Indeed that should be specified that we need that patch, or we need to somehow push that patch in qtip :)

nagy.balint’s picture

The patch got into qtip dev, so now we can continue reviewing this patch.

Likely we can make it clear in the README and other documentation that the qtip functionality needs the latest dev of the module.

nagy.balint’s picture

It seems the deprecated code for qtip v1 was included due this module https://www.drupal.org/project/menu_minipanels
Which has a 2.x branch now without qtip, but not what most users are using.

So for them this would be a bad change to remove support for qtip v1... on the other hand, qtip v1 does not have support for instances, and then we would need to detect the version in php as well.

I still think its time to move on from v1 as its not supported for a long time now...

nagy.balint’s picture

I guess for the time being we can reintroduce compatibility by checking for function_exists('qtip_fetch_instances_field') in php, and putting back the qtip1 js code the same way it was before.

Then it will work in qtip1 just without the instances settings. And if the user wants the new capability, can switch to qtip2 with the dev release.

gifad’s picture

Just made a patch which works with both legacy qtip 7.x-1.5 and latest qtip 7.x-2.0-rc3+2-dev

  • nagy.balint committed 0df2cad on 7.x-1.x
    Issue #2375505 by nagy.balint, gifad: qtip preview doesnt respect...
nagy.balint’s picture

Status: Needs review » Fixed

Thanks!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.