Git Product home page Git Product logo

Comments (6)

musicman3 avatar musicman3 commented on August 18, 2024

My icon solution for Bootstrap 5 and Bootstrap Icons (after text for submenu):
Снимок экрана 2021-02-03 143919


/* any menu item that has a submenu */
.ctxmenu li.submenu::after{
    content:'\bi-caret-right';
    position:absolute;
    display:block;
    top:0;
    right:0.3em;
    font-family:bootstrap-icons;
    line-height:22px;
}

And the first icon before the text (line 134 is li.innerHTML = item.text; ):
text: '<span class="bi-box-arrow-in-right">My text...</span>',
Снимок экрана 2021-02-03 144112

See:
https://github.com/musicman3/eMarket/blob/bootstrap-5/ext/ctxmenu/ctxmenu.js
https://github.com/musicman3/eMarket/blob/bootstrap-5/ext/ctxmenu/ctxmenu.css
https://github.com/musicman3/eMarket/blob/bootstrap-5/js_handler/admin/pages/stock/context.php

Sorry, but not all translated to vanilla js yet. We are working on this. I'll do everything soon. I think from the examples everything will be clear. When our layout designer aligns everything, then I think it will be visible in the css. You can see this in the bootstrap 5 branch of our project:
https://github.com/musicman3/eMarket/tree/bootstrap-5

from ctxmenu.

musicman3 avatar musicman3 commented on August 18, 2024

Our layout designer has done everything smoothly and beautifully now. Here is a screen:
1

One problem remains. If the menu is too large, then it goes off the page. It is necessary for the page to move down. Here is a screenshot of the problem:
2

This problem occurs on the bottom rows of the table.

from ctxmenu.

nkappler avatar nkappler commented on August 18, 2024

Thanks for the detailed information. I thought the "off-the-screen" issue was handled, but maybe it only works for the horizontal direction... I've created another issue to track this #14

from ctxmenu.

musicman3 avatar musicman3 commented on August 18, 2024

The off-screen problem occurs on the sub menu. At level 1, everything is fine.

from ctxmenu.

nkappler avatar nkappler commented on August 18, 2024

submenus can also switch direction and appear to the left when they reach the end of the screen, see the demo at https://nkappler.de/ctxmenu/ open context menu and select "even more actions".
I though the y coordinate was also working

from ctxmenu.

musicman3 avatar musicman3 commented on August 18, 2024

You only have a horizontal submenu in the demo. I have it horizontally and down. There are many lines down.

from ctxmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.