Page 1 of 1

Menu

Posted: 09 Nov 2015, 15:22
by tricky10
Hi,
Is it possible to remove dots from RIO menu and replace them by something else ?

Thanks,

Re: Menu

Posted: 09 Nov 2015, 17:04
by mert.sincan
To remove dots icons
There are two ways;
1) You can try with css;

Code: Select all

.icon-ellipsis1 {
   display: none;
}
2) You can remove the structure of dots icon in RioMenuRenderer.java

Code: Select all

...
protected void encodeSubmenu(FacesContext context, AbstractMenu menu, Submenu submenu, int marginLevel) throws IOException{
    ...
   // Line 108-110
   // please remove
   writer.startElement("i", null);
   writer.writeAttribute("class", "icon-ellipsis1", null);
   writer.endElement("i");
  ...
}
...
protected void encodeMenuItemContent(FacesContext context, AbstractMenu menu, MenuItem menuitem) throws IOException {
   ...
  // Line 237-239
 // please remove
   writer.startElement("i", null);
   writer.writeAttribute("class", "icon-ellipsis1", null);
   writer.endElement("i");
  ...
}
...
To replace with new icons.
I think you can try to use new icon instead of icon-ellipsis1 in RioMenuRenderer.java. This is the easiest way. Another ways , you need to change RioMenu.java , RioMenuRenderer.java and primefaces-rio.taglib.xml.

Re: Menu

Posted: 10 Nov 2015, 11:10
by tricky10
Thx

Re: Menu

Posted: 10 Nov 2015, 12:45
by mert.sincan
You're welcome ;)