We have patched menu_minipanels to allows other modules to add custom styles other than standard qtip ones; in external module you have to implement hook_menu_minipanels_styles (to provide a list of new styles) and hook_menu_minipanels_style (to add a new javascript to the page with the new style definition). Example:

mymodule.module:

function mymodule_menu_minipanels_styles() {
   $options_style = array(
    'mystyle' => t('mymodule style'),
  );
  
  return $options_style;
}

function mymodule_menu_minipanels_style($menu_config) {
  if($menu_config['style']['name'] == 'mystyle') {
    $path = drupal_get_path('module', 'mymodule');
    
    drupal_add_js($path . '/js/menu-style.js');
  }
}

menu-style.js:

$.fn.qtip.styles.mystyle = { // Last part is the name of the style
   background: '#A2D959',
   color: 'black',
   border: {
      width: 7,
      radius: 5,
      color: '#A2D959'
   },
   name: 'light' // Inherit the rest of the attributes from the preset dark style
};

I hope this will be useful

Comments

damienmckenna’s picture

Version: 6.x-1.2 » 7.x-1.0-beta2

Nice. I'll work on adding this to D6 and D7.

damienmckenna’s picture

Status: Active » Needs work

Other than a patch for D7, it also needs some proper API documentation before it can be added.

damienmckenna’s picture

StatusFileSize
new4.51 KB

Here's a patch for D7, including API documentation.

damienmckenna’s picture

StatusFileSize
new4.65 KB

Updated D7 patch that fixes some problems, I've tested this and it works as described. Updated D6 patch will be forthcoming.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new4.85 KB

A patch for the D6 branch.

damienmckenna’s picture

Status: Needs review » Fixed

@lussoluca: Thanks for the patch, I've committed the change to both D6 and D7.

Status: Fixed » Closed (fixed)

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

drupalina’s picture

Status: Closed (fixed) » Active

I want to make my menupanels as wide as 960px (the width of the entire theme) and spanning across the width of the theme (very common feature in websites these days), so I have set it at that number in my menu settings.

But it only goes up to 700px or so... and according to Firebug this number varies from menu to menu.

So it seems like this needs a bit more work.

scottsawyer’s picture

I am using v 7.x-1.x-dev with Omega Theme. In the mini-panel, I have a container column with class container-12, and 3 columns with grid-4. However, when it renders, the column w/ container-12 never renders. Trying to figure out if this is because of mini-panel or the way Menu Mini-Panels handles the rendering. Thoughts?

scottsawyer’s picture

Ok, now i think it's a mini-panels issue. Just added my mini-panel to a panel page and the container row is not rendered. Going to check there if there is a known issue.

scottsawyer’s picture

Well, I am still having problems with the width of the qTip. I think allowing it to auto grow would be the best solution.

So, I guess this has become a feature request, maybe offer a checkbox in the configuration to allow the width of the qTip to auto grow or be a fixed width.

drupalina’s picture

I definitely support the feature request #11 by scottsawyer!
It appears that there's some weird calculating script inside the qtip javascript, which renders (unpredictably) different widths depending on which menu item we hover. It would be great to have an overriding feature in the module that would dictate "No, if set, let it grow to the fixed specified X width"

scottsawyer’s picture

@drupalina I got around this by specifying the width in the style sheet with an !important declaration. Not beautiful, but functional. I am using this with Omega in a Mini Menu, so I had to create a rule for each view port I am supporting, which it fine, except my mobile view port, which should be fluid, and should shift from multiple columns to single column. Definitely forcing me to create many more style rules, and over riding them over and over. What should be simple is now a ...

drupalina’s picture

@scottsawyer that seems like a genius of a temporary work-around.
I used

.qtip, .qtip-active, div.qtip-content{
	width: 960px !important;
}

and it worked! Thanks!!!

The question now is how to center those unfolding minipanels so that they do not drift out of the bounds of the screen??? Any ideas?

drupalina’s picture

answering my own question about how to center the unfolding menu -- in Menu settings, in the "Hover position configuration", I just chose Target: "Custom" and in the "Target Custom" field entered #menu-bar, which is where my main menu parents are located.

damienmckenna’s picture

Status: Active » Closed (fixed)

@drupalina: Please open a new issue for this support request / feature request, this issue is for a feature request that has already been committed. Thank you.