238 Commits

Author SHA1 Message Date
Johannes Meyer
0e5e046ae5 js: Split event handling and processing of form submits 2019-11-04 12:46:30 +01:00
Johannes Meyer
50bf126d36 js: Move function events.getLinkTargetFor to loader.js 2019-11-04 12:46:30 +01:00
Johannes Meyer
2896cbd781 loader.js: Avoid named capture groups to parse multipart content
fixes #3975
2019-10-07 14:35:49 +02:00
Johannes Meyer
a8dc609b62 loader.js: Add support for multipart content
refs #3953
2019-09-25 10:34:24 +02:00
Johannes Meyer
dda49b5ff1 loader.js: Drop redundant method cacheLoadedIcons 2019-09-25 10:34:24 +02:00
Johannes Meyer
da513a746d loader.js: Add support for extra updates
refs #3953
2019-09-25 10:34:24 +02:00
Johannes Meyer
b15c012671 loader.js: Only pre-wrap a search response's html with a div
It's not required for all responses anymore.

refs #3953
2019-09-25 10:34:24 +02:00
Johannes Meyer
f98f988aff Remove tristate form element 2019-09-23 08:36:24 +02:00
Johannes Meyer
5333bbf04d loader.js: Also set title directly if layout is base target 2019-08-02 15:42:58 +02:00
Johannes Meyer
b168c3d7db js: Don't use jquery.focus shorthand anymore, but icinga.ui.focusElement 2019-07-18 07:57:14 +02:00
Johannes Meyer
6323a065ea loader.js: Keep using the promise interface for complete callbacks 2019-07-18 07:57:14 +02:00
Johannes Meyer
5cf71c9bbd js: Drop iframe-upload fallback for IE 2019-07-18 07:57:14 +02:00
Jennifer Mourek
f6a5f952bb loader.js: Remove comment 2019-07-18 07:56:09 +02:00
Florian Strohmaier
5fe264be6a JS: Fix errors
refs #3813
2019-07-18 07:56:09 +02:00
Johannes Meyer
f6d40a9d1c loader.js: Directly set the window's title for full layout requests
refs #3851
2019-07-15 08:24:44 +02:00
Johannes Meyer
43c87d2388 loader.js: Return in onComplete upon handled redirects
Got changed with f12a5741b8a4c53b7e5d94e43094e18d5a946934. Triggering
rendered events for stuff that's never displayed doesn't seem right.
2019-04-30 09:23:59 +02:00
Johannes Meyer
f72aa291bc
Merge pull request #3610 from Icinga/fix/window-id-cannot-be-used-to-differentiate-containers-3609
Fix window id cannot be used to differentiate containers
2019-04-17 11:38:48 +02:00
Johannes Meyer
4900040d47 js: Restore previous title when closing right column
fixes #3654
2019-04-16 09:29:42 +02:00
Johannes Meyer
d8c4fcc517
Merge pull request #3661 from Icinga/feature/preserve-scroll-position-upon-form-submits
Preserve scroll position upon form submits
2019-04-16 08:04:15 +02:00
Johannes Meyer
cb3528a7be js: Don't scroll to re-focused elements after auto-refreshes
refs #2048
refs #3295
refs #3492
refs #3518
2019-04-15 15:42:14 +02:00
Johannes Meyer
f54f2f8627 js: Prevent flickering when refreshing scrolled content 2019-04-15 14:27:14 +02:00
Eric Lippmann
915c7b8fe5
Merge pull request #3504 from Icinga/fix/collapsible-sidebar-issues-3187
Fix collapsible sidebar issues
2019-03-21 09:09:27 +01:00
Jennifer Mourek
b3b80fdc31 Make active first-level nav items better distinguishable 2019-03-20 11:07:39 +01:00
Johannes Meyer
27569d09d8 loader.js: Preserve scroll position also for form submits
Restores the scroll position if:
* it's been a POST request
* the source and target url path is the same
* the target's url params do not change significantly
2019-01-10 15:32:28 +01:00
Johannes Meyer
d2214ef0e4 loader.js: Pass-through previous request when peforming a redirection 2019-01-10 15:31:39 +01:00
Johannes Meyer
29a8184548 loader.js: Remember a request's method 2019-01-10 15:30:48 +01:00
Johannes Meyer
c8a49414b1 js: Append a unique container id to the Window-Id
Generates a semi-random id for containers other than the menu and col1.
This id is then appended to the Window-Id of every request separated by
an underscore: `window-id_container-id`

refs #3609
2018-11-07 12:44:25 +01:00
Johannes Meyer
5f4aa1e296 loader.js: Make anchor navigation working again
fixes #3492
2018-07-10 10:50:31 +02:00
Johannes Meyer
990df95f36 loader.js: Allow to force HTTP to be used for JS redirection 2018-07-04 14:44:03 +02:00
Johannes Meyer
9857021d2c Revert "loader.js: place focus at the end of text inputs"
This reverts commit d1fd7e4be78f3dda9734027dda53114b71a7a46d.
Browsers seem to do this on their own natively. Way better.

refs #3348
2018-04-24 11:18:10 +02:00
Alexander A. Klimov
68870ca411 Icinga.Loader.prototype.renderContentToContainer(): preserve scroll position despite the focus 2018-01-19 15:32:54 +01:00
Eric Lippmann
cb83a7dea3 JS: Always request application-state
Icinga Web 2 version 2.5.0 suspends auto-refresh if the tab is inactive.
This also pauses the application-state requests which are intended to refresh the session and announcements.
If a tab is inactive for longer than the PHP session timeout (session.gc_maxlifetime in php.ini), users are automatically logged out.
With this patch Web 2 will always request application-state. Even if auto-refresh is disabled.
2017-12-04 14:25:23 +01:00
Jennifer Mourek
3a8ba39abd Disable auto-refresh when page is not visible
credits to @towolf

Icinga offers the user to enable or disable 'auto-refresh' with a
static preference.

But 'auto-refresh' is the default and our users often have dozens of
Icinga tabs open in their browser, which they are not looking at.

The background tabs lead to significant load on the database to to
repeated queries to keep the invisible UI fresh.

This change adds a visibility listener, which disables auto-refresh when the
page is not visible.

refs #2761
2017-10-26 13:53:25 +02:00
Eric Lippmann
e030229d7f Fix CSS issues when rerendering the layout
fixes #13467
2016-12-12 15:02:51 +01:00
Eric Lippmann
39c7451664 Implement announcements
refs #11198
2016-11-29 15:24:34 +01:00
Eric Lippmann
875d42c0a6 Revert "Merge branch 'bugfix/always-use-the-jquery-find-method-w/-node-context-10704'"
This reverts commit f517c62fdec880d5b905212ef4dbfe23a5cd033e, reversing
changes made to d1fd7e4be78f3dda9734027dda53114b71a7a46d.

refs #10704
2016-11-21 14:34:58 +01:00
Eric Lippmann
f517c62fde Merge branch 'bugfix/always-use-the-jquery-find-method-w/-node-context-10704'
fixes #10704
2016-11-21 14:33:43 +01:00
Thomas Gelf
d1fd7e4be7 loader.js: place focus at the end of text inputs 2016-11-21 11:39:03 +00:00
Alexander A. Klimov
3363e6795f JS: use $(parent).find(child) instead of $(child, parent)
refs #10704

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
2016-11-21 10:46:31 +01:00
Thomas Gelf
ce6fa235cb js/loader: do not steal focus placed by module 2016-11-16 10:49:28 +00:00
Eric Lippmann
7e47a2965c JS: Fix usage of global variable self used to reference icinga in loader.js::onComplete()
refs #10703
2016-09-09 13:22:08 +02:00
Alexander A. Klimov
56c10ffdd5 Avoid local variable name `self' in loader.js
refs #10703
2016-09-01 16:28:57 +02:00
Thomas Gelf
96f50c5dfa loader.js: fix JS error on IE 2016-02-29 21:18:46 +01:00
Alexander A. Klimov
a2a96be8c9 Display ISO date and time when a connection was lost
refs #10625
2016-02-22 11:24:19 +01:00
Alexander A. Klimov
11ea7d99d7 Escape messages of notifications loaded by JavaScript 2016-02-19 14:10:58 +01:00
Alexander A. Klimov
474803fee4 Change all license headers to only reflect a file's year of creation
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann
e468329051 JS: Keep search field focus
fixes #11029
2016-02-02 08:40:35 +01:00
Eric Lippmann
41c942d197 JS: Maintain auto-refresh interval over redirects
This is far from beautiful. But JS needs a revamp anyway.
Request should be an object and should be passed from function to function in order to maintain state.
2016-01-27 09:19:12 +01:00
Eric Lippmann
7ede8124cb Pagination: Focus active after next or prev exceeded
I'd like to see behaviors for components instead of patching loader/events all the time.
2016-01-25 07:23:12 +01:00
Eric Lippmann
4c4e8e4ac2 monitoring: Re-focus check now and alike 2016-01-22 13:33:59 +01:00