Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The following options might be useful for the Striping and the Legend block:
1- Show more then one option at the same time. This is my custom patch to do this.
foreach ($entities as $entity) {
$show_every_legend_option = TRUE; // <== this should be a proper option (per type)
if ($show_every_legend_option == TRUE) {
$this->calendar_node_type_stripe($entity);
$this->calendar_taxonomy_stripe($entity);
$this->calendar_group_stripe($entity);
}
else
switch ($this->options['colors']['legend']) {
case 'type':
$this->calendar_node_type_stripe($entity);
break;
case 'taxonomy':
$this->calendar_taxonomy_stripe($entity);
break;
case 'group':
$this->calendar_group_stripe($entity);
break;
}
2- The Legend block from April 18, shows ALL possibilities, not only the ones that are on display.
- Add an option: 'show all colors in legend' vs 'show only displayed colors in legend'
- Add an option: 'do/do not show default color #ffffff on striping and in legend'. (I think the option 'do not' should be the default.)
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedIf we go back to showing only the displayed colors we can't cache the block and we have to store the values in a session, which also breaks caching. That's why I changed the behavior. The existing code computes the stripes real-time, which is a lot of overhead and uncacheable.
The color #ffffff should not be showing. That is a bug. I keep thinking I have gotten that fixed but the fixes get lost in the next round of changes :( The other option is to make blank the default instead of #ffffff, but the color picker doesn't work if you do that so I gave up on that idea.
Comment #2
KarenS CreditAttribution: KarenS commentedOne thing that Views doesn't have that would be a big help are global view-wide settings. So you could do things like set up the colors and have them apply to all the displays and then have one legend that works the same on every display. But there is no way to do that :(
Comment #3
johnvRethinking this issue: #1545240: Trying to get property of non-object in calendar_plugin_row->options_submit() (line 262)
Perhaps it is possible to fetch/store the color settings (e.a.) in the Master Display whenever you set some 'make settigns global for this view.'
Comment #4
johnvJust a recap of comments #1-#3:
- The 'global' settings are now realized via the new 'display'setting in the Legend Block settings.
- The bug of showing #ffff in the legend is now fixed.
- Showing only relevant legend colors is not possible due to caching issues.
Point 2 of OP is now cleared,
Point 1 op OP is still open.
Comment #5
KarenS CreditAttribution: KarenS commentedThe patch in the original issue needs work. You can't currently set more than one option, so displaying more than one doesn't make sense. I think the logical approach would require changing the stripe setting option to include multiple types of stripes instead of only one, then let you configure all the types you selected, then display all the ones you selected.
Comment #6
Neslee Canil Pinto