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

[UI] Windows don't know about themselves #72

Open
schwindp opened this issue Mar 3, 2019 · 3 comments
Open

[UI] Windows don't know about themselves #72

schwindp opened this issue Mar 3, 2019 · 3 comments
Labels
enhancement feedback User feedback from beta test
Milestone

Comments

@schwindp
Copy link

schwindp commented Mar 3, 2019

Windows don't know about themselves, therefor you can open multiple instances. For example if you click on "Zu Alarmieren", it always opens a new one, doesn't honor existing ones.

@robo-w robo-w added enhancement feedback User feedback from beta test labels Mar 3, 2019
@robo-w
Copy link
Contributor

robo-w commented Mar 3, 2019

@at-dro: I think you know the window manager the best. Is there a possibility, to bring the current incident detail window to front, if it is requested a second time?

@at-dro
Copy link
Contributor

at-dro commented Mar 3, 2019

It has been a while since I worked with this code, but should be possible like this:

  • Add a hash identifying the window (something like "windowType-entityId") to the data object passed to addWindow
  • Store a map of the hash and the corresponding id (created at winman.js:142) whenever a new window is created
  • Check if the window for a hash already exists at the beginning of addWindow, and if yes open/focus the window (logic can probably be taken from toggle(id))
  • Make sure the hash is removed from the map in the _close(id) callback.

@at-dro
Copy link
Contributor

at-dro commented Mar 3, 2019

And while we are at it: The _close(id) callback seems to only remove the window and taskbar button from the DOM, but not the objects this.windows and this.buttons, which seems wrong.

@robo-w robo-w added this to the Version 2.5.0 milestone Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feedback User feedback from beta test
Projects
None yet
Development

No branches or pull requests

3 participants