We have moved to Github. Please open tickets there.

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#3282 closed Enhancement (fixed)

Class on menu items should include menu item name

Reported by: ewinslow Owned by: ewinslow
Priority: normal Milestone: Elgg 1.8.0
Component: Core Version: Github Master
Severity: minor Keywords:
Cc: brett@… Difficulty:

Description

e.g. a menu item named "like" in the "entity" menu would be like so:

<ul class="elgg-menu elgg-menu-entity">
    <li class="elgg-menu-item elgg-menu-item-like"></li>
</ul>

More themability control

Change History (11)

comment:1 Changed 2 years ago by ewinslow

  • Owner set to ewinslow
  • Status changed from new to assigned

comment:2 Changed 2 years ago by ewinslow

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [svn:9017]) Fixes #3282: Added a class to menu items which includes menu item name (just like ul contains a class with the menu name)

comment:3 Changed 2 years ago by ewinslow

  • Milestone changed from Needs Review to Elgg 1.8
  • Resolution fixed deleted
  • Status changed from closed to reopened

My "fix" only applies the name-based class when a class is manually passed. That's not very helpful...

comment:4 Changed 2 years ago by blacktooth

Can the setItemClass() be modified so that when $optionsitem_class? is not set, it sets it to elgg-menu-item-$optionsname??

comment:5 Changed 2 years ago by blacktooth

Can the setItemClass() be modified so that when $options['item_class']? is not set, it sets it to elgg-menu-item-$options['name']??

comment:6 follow-up: Changed 2 years ago by ewinslow

Yes, this is what I originally intended to do. Want to take care of it?

comment:7 in reply to: ↑ 6 Changed 2 years ago by blacktooth

Replying to ewinslow:

Yes, this is what I originally intended to do. Want to take care of it?

Yeah!

comment:9 Changed 2 years ago by cash

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [svn:9200]) Fixes #3282 always using a menu item's name in its class

comment:10 Changed 2 years ago by cash

I put blacktooth's code in the getItemClass method so all the logic would be in one place. Reopen if you think it should be in view.

comment:11 Changed 2 years ago by ewinslow

Good solution, thanks for integrating that.

Note: See TracTickets for help on using tickets.