Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web_easy_switch_company: menu items wrapping #116

Closed
thomaspaulb opened this issue Apr 15, 2015 · 8 comments
Closed

web_easy_switch_company: menu items wrapping #116

thomaspaulb opened this issue Apr 15, 2015 · 8 comments
Labels
Milestone

Comments

@thomaspaulb
Copy link

I've noticed an issue that when the "easy switch company" menu item is inserted into the top bar, the other menu items don't "contract" to make space for this new item, and thus the new item wraps to the next line.

However, on screen resize the "menu_bound" event is executed and the size of the section with normal menu items is recalculated, some items are shifted to the "More" menu, and it all fits again.

I've found a workaround which is to add the following code to instance.web.UserMenu.init in switch_company.js,

        $(document).ready(function(ev) {
            openerp.web.bus.trigger('resize');
        });

It doesn't seem to be the cleanest solution, but at least it works. Anybody else has noticed the same?

@legalsylvain
Copy link
Contributor

Hi, thanks for reporting this bug. Can you indicate the version you use ? 7.0 / 8.0 ?

  • i use this module in 7.0, and I don't have any problem, but I'll take a look.
  • I didn't test the module ported in V8.0.

@sbidoul
Copy link
Member

sbidoul commented Apr 15, 2015

Hi, we are using the module on 8.0 and I did not notice anything wrong. Can you post a small screenshot or video illustrating the issue?

@pedrobaeza
Copy link
Member

Hi, I confirm that this happens sometimes when you update browser page, switching for example the company, but I don't have an exact trace.

@thomaspaulb
Copy link
Author

screenshot

@legalsylvain legalsylvain added this to the 8.0 milestone Apr 15, 2015
@legalsylvain
Copy link
Contributor

@antiflu : Could you realize a PR with your fix ?

thomaspaulb pushed a commit to thomaspaulb/web that referenced this issue Apr 16, 2015
@thomaspaulb
Copy link
Author

It feels like an ugly workaround but at least it works for my client. In my experience this only occurs in 8.0, in Chrome, and only when there are a lot of menu items obviously. Also, the problem disappears when you somehow resize the screen (eg by opening the Javascript console or moving the window). That's also the nature of this workaround it triggers a resize event after things are rendered

thomaspaulb added a commit to thomaspaulb/web that referenced this issue Apr 24, 2015
@pedrobaeza
Copy link
Member

Was this fixed in OCA?

@pedrobaeza
Copy link
Member

No news, so I close.

BT-fgarbely pushed a commit to BT-fgarbely/web that referenced this issue Apr 3, 2018
Syncing from upstream OCA/web (10.0)
thomaspaulb added a commit to thomaspaulb/web that referenced this issue Jun 3, 2018
vrenaville pushed a commit to camptocamp/web that referenced this issue Jul 19, 2018
Remove unused PO file to reduce docker image size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants