Comments

bryancasler’s picture

subscribe

mediapal’s picture

OMG this post is 6 month old.

pbfleetwood’s picture

Bump! I cannot do without Menu Minipanels: it provides the core menu of our site. I also sorely need to use the qTip (Stylish jQuery Tooltips) module, but it requires v2 of the qTip Library.

scottsawyer’s picture

Agreed, I have some custom QTips I want to use that use QTip2 API. Any takers on reworking the module for QT2? Wish I had more time for this myself. Maybe once I get some items off my desk...

jamesbenison’s picture

Status: Active » Needs review
StatusFileSize
new11.76 KB

I put together a patch to get things started. Transitions are going to need to have js functions created and eval'd to get that functionality back. And styling is done totally different in v2. We'll need to be able to add classes arrays instead of selecting a single style.

Lots of legacy code needs to get stripped out (like the whole admin js file).

Anyways, it works. I had a client that needed it. We can build on it. I didn't want to go too crazy all at once with a giant patch.

[EDIT]: v2 might be a good candidate for looking at a 7.x-2.x branch.

damienmckenna’s picture

@jamesbenison: I was thinking the exact same thing - lets leave v1 for qTip 1 and do v2 for qTip 2.

Which reminds me, back to solidifying v1 for a stable release :)

willieseabrook’s picture

This is interesting, I've been doing stuff with qTip again - I've rewritten views_tooltip to use qTip and was thinking it would be nice to be on v2 of the library. I did v1 on the views_tooltip rewrite as the site I rewrote in is also using menu_minipanels, so v1 is installed.

damienmckenna’s picture

Status: Needs review » Postponed

I'll look at this for v2.

Renee S’s picture

I grabbed a copy of the patch, and it works well. The only problem I had was that the weight/scope of the .js was causing it to load before jQuery.

I removed "scope" and added "group", JS_DEFAULT for the menu_minipanels.js and JS_LIBRARY for qtip.

Line 508 (after patch):

    // This module's custom JS.
    drupal_add_js($path . '/js/menu_minipanels.js', array('group'=>JS_DEFAULT, 'weight' => 11));

    // Load the qTip script.s
    drupal_add_js($qtip_path, array('group'=>JS_LIBRARY, 'weight' => 0));

The patch doesn't quite apply cleanly, FTR -- there's been a change in menu_minipanels.admin.inc.

Renee S’s picture

The patch also removes the min/max width from the settings form. @jamesbenison, what's the rationale is for that?

Renee S’s picture

Spoke too soon - the ID for styles has changed in qtip since the patch was made:

/**
 * Implements hook_menu_minipanels_styles().
 */
function menu_minipanels_menu_minipanels_styles() {
   $options_style = array(
    'qtip-default' => t('Default'),
    'qtip-light' => t('Light'),
    'qtip-dark' => t('Dark'),
    'qtip-cream' => t('Cream'),	
    'qtip-red' => t('Red'),
    'qtip-green' => t('Green'),
    'qtip-blue' => t('Blue'),
    'qtip-shadow' => t('Shadow'),
    'qtip-rounded' => t('Rounded'),
    'qtip-tipsy' => t('Tipsy'),	
    'qtip-bootstrap' => t('Bootstrap'),	
    'qtip-youtube' => t('Youtube'),
    'qtip-jtools' => t('Jtools'),
    'qtip-cluetip' => t('Cluetip'),	
  );
  
  return $options_style;
}

I'll reroll the patch in a bit...

jamesbenison’s picture

Glad to see this is being looked at. Thanks for your time.

The new qtip2 library has a lot of nested arrays and is more complicated to plug into a cms.

Renee S’s picture

Haven't done any further Q2 integration work, just included the above and fixed a few things. There's a bit of small settings sketchiness (the arrow won't go away, for instance, even if set on "None") but it's otherwise working well.

Renee S’s picture

Except, you know, not full of junk.

Renee S’s picture

Status: Postponed » Needs review
Renee S’s picture

One potential addition in this is a parent container setting. At the moment the minipanels are pretty promiscuous, and attach themselves to breadcrumbs and, if using Menu Blocks, active menu block titles, not just the main menu (or whatever menu you actually want them to appear on :)

stevieegee’s picture

Hi Renee

Thank you for the great patch.

The patch updates the jquery.qtip.min.js path in menu_minipanels.module so it works, but not in menu_minipanels.install so there is an error when you check the site's status report.

Cheers Stephen

acrollet’s picture

Updated patch attached. This fixes the problems mentioned with the 'no arrow' setting not working and the site status report error. It also fixes the class names so that the styles work.

damienmckenna’s picture

Because this would involve a major change in the configuration it deserves to be made into a v2 branch. I'll try go get to this over the weekend. Thanks for all the work to get this working, everyone!

damienmckenna’s picture

FYI I've created a meta issue to plan for v2: #1957640: Plan for a Menu_MiniPanels v2.0 release

jwilson3’s picture

It appears that the hooks in the callbacks.js are not getting called anymore with qtip v2 from the patch in #18, causing there to be no qtip-hover class added to the target menu element while the qtip is active. going to try to figure out whats going on there and will report back.

UPDATE: it turns out the callback hooks functionality is no longer used on v2, in favor of binding jquery events callbacks

Related documentation: http://craigsworks.com/projects/qtip2/tutorials/events/#callbacks

jwilson3’s picture

This patch resolves the problems identified in #21, by removing the menu_minipanels.callbacks.js (which nolonger work for qtip v2) and implements the new "toggle" event, to toggle the qtip-hover class.

Additionally, I've moved the contextual module support out of the callbacks.js back into the main menu_minipanels.js file, however I was unable to see it working, so in general there is still work to do, tho I'm not entirely sure how to make it work.

jwilson3’s picture

damienmckenna’s picture

Status: Needs review » Closed (won't fix)

In order to support qTip 2 we'd need to do a new branch, and given that v2 of the module has already dumped qTip I don't see any benefit to doing so, we'd be leapfrogging ourselves.

Thank you all for your collaboration on this, but I don't see any reason to make this change.

damienmckenna’s picture