188 Commits

Author SHA1 Message Date
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
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
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
Eric Lippmann
118c435bc5 JS: Fix usage of global variable self used to reference icinga in events.js
refs #10703
2016-09-09 13:22:10 +02:00
Alexander A. Klimov
3c43d38171 Avoid local variable name `self' in events.js
refs #10703
2016-09-01 16:16:55 +02:00
Eric Lippmann
cefdc496ef Forms: Remember submit from click event before
This helps Safari to determine the correct clicked or pressed submit button in case the form has more than one.
2016-06-27 10:41:16 +02:00
Alexander A. Klimov
4a78fa6a66 List views: handle clicks on mailto: and http:// links as expected
refs #11267
2016-06-02 10:43:34 +02:00
Marc DeTrano
621c0dbcad Support data URIs in href
resolves #11495

Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
2016-04-13 12:59:09 +02:00
Thomas Gelf
b6fd4f5584 events.js: do not apply event handlers without...
...an Icinga object. Added a log line, eventually we'll catch this one
far day :)
2016-02-29 22:11:30 +01:00
Florian Strohmaier
0c34c20640 Prepare close-container for behavior implementation
refs #8590
2016-02-27 15:07:10 +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
4c4e8e4ac2 monitoring: Re-focus check now and alike 2016-01-22 13:33:59 +01:00
Eric Lippmann
e1eb505986 JS: Maintain autosubmit focus 2016-01-18 13:28:36 +01:00
Eric Lippmann
3ab5b5b721 Fix skip to content jump link 2016-01-18 12:50:27 +01:00
Eric Lippmann
7c1ccc685f Rename close-toggle to close-container-control 2016-01-12 08:52:30 +01:00
Eric Lippmann
99f0a348c5 Disable transitions on page load 2015-12-15 13:29:30 +01:00
Eric Lippmann
3d2521abf0 Merge branch 'master' into feature/dope-layout-5543 2015-10-01 17:42:24 +02:00
Thomas Gelf
50e66810bf events.js: do not disable inputs targetting...
...foreign containers. Otherwise they will remain unusable. A better
solution might be tracking source containers, but that would involve
some more work

fixes #10263
2015-10-01 15:10:01 +02:00
Eric Lippmann
51d6c61bf7 CSS: Re-add spinner for autosubmit
refs #5543
2015-10-01 01:59:56 +02:00
Johannes Meyer
31903b8da9 Revert "js: Use the last button instead of the first one for form submits"
This reverts commit fedda16bd4cb2a5f6d4ea6de34c9679bcdfad384.

fixes #10025
2015-08-28 10:28:55 +02:00
Johannes Meyer
9ca278d7b2 Merge branch 'master' into feature/activity-indicators-for-form-submits-8369 2015-08-21 13:37:54 +02:00
Johannes Meyer
08aefe0b25 js: Allow buttons to animate themself
refs #8369
2015-08-21 13:28:35 +02:00
Johannes Meyer
d9855d8273 js: Fix that the fallback spinner is not utilized for auto submits
refs #8369
2015-08-20 16:55:03 +02:00
Johannes Meyer
736d715d8c js: Allow to provide a fallback spinner for forms
refs #8369
2015-08-20 16:13:12 +02:00
Johannes Meyer
3f4221b249 js: Use a fixed with for form buttons once a form submit is ongoing
...and a progress label is set.

refs #8369
2015-08-20 15:32:31 +02:00
Johannes Meyer
7da8ad4e44 js: Show activity indicators for form submits
refs #8369
2015-08-20 14:44:49 +02:00
Johannes Meyer
fedda16bd4 js: Use the last button instead of the first one for form submits
refs #8369
fixes #9245
2015-08-20 14:40:05 +02:00
Johannes Meyer
2fe3c6e5cf events.js: Properly handle the default for param `autosubmit'
refs #8369
2015-08-20 14:36:55 +02:00
Matthias Jentsch
41d68f6a74 Fix delete comments and downtimes button
Fix faulty target names and add additional error checking in case the target DOM Element is not present.

fixes #9330
2015-08-19 16:36:47 +02:00
Johannes Meyer
0468bddc83 js: Ensure that rendered events of modules are called on page-load
fixes #9869
2015-08-10 14:46:58 +02:00
Johannes Meyer
6d24e09479 events.js: Some code style fixes in function applyHandlers
refs #9869
2015-08-10 13:24:59 +02:00
Johannes Meyer
d09ad2641f Remove CSS rule for class "timesince"
It's not used anywhere.
2015-08-10 13:22:05 +02:00
Johannes Meyer
b8b649f179 js: Require a container in ui.focusElement()
refs #8615
2015-08-06 13:08:36 +02:00
Johannes Meyer
153f3ba2f9 js: Drop function events.handleAnchor() and ui.scrollContainerToAnchor()
There is ui.focusElement() now which handles ids as well.

refs #8615
2015-08-06 11:51:57 +02:00
Johannes Meyer
5c80486b23 js: Properly handle anchor tags with names
refs #8615
2015-08-06 10:58:15 +02:00
Johannes Meyer
de24f5f4b6 Revert "js: Do not handle anchor jumps, the browser is able to do it by itself"
This reverts commit 5ccd4a9ef8084d6e47d0d99f587da78a9e8c5155.

refs #8615
2015-08-06 10:57:41 +02:00
Johannes Meyer
5ccd4a9ef8 js: Do not handle anchor jumps, the browser is able to do it by itself
refs #8615
2015-08-06 10:24:56 +02:00
Matthias Jentsch
3a85dc7f39 Display the table on single-selection rows as active without any delay
refs #8623
2015-07-29 14:32:26 +02:00
Matthias Jentsch
cbb9ef10a2 Remove single selections correctly when going back in the history 2015-07-28 15:21:14 +02:00
Matthias Jentsch
f2d253f508 Assure that rows are refreshed correctly on reload
Assure that all links are initialized when the selection is applied after a request. Move action table code into the actiontable behavior.

refs #8623
2015-07-27 10:34:17 +02:00
Johannes Meyer
570dada0d8 js: Manually submit the form if it's being automatically submitted...
...in case we're submitting a multipart/form-data form using the iframe
fallback. The form wouldn't be submitted otherwise.

refs #8758
2015-07-21 14:15:12 +02:00
Johannes Meyer
37b87eb284 js: Add fallback in case XHR file uploads are not possible
refs #8758
2015-07-20 10:52:28 +02:00
Johannes Meyer
95bcb95cb5 events.js: Prevent default form submission as late as possible 2015-07-20 10:13:48 +02:00
Johannes Meyer
6d4d99aa62 js: Use window.FormData instead of just FormData
refs #8758
2015-07-15 15:49:34 +02:00
Johannes Meyer
c1d9cde312 js: Properly submit multipart/form-data
This is not IE <10 compatible. Fix follows. ;-)

refs #8758
2015-07-15 15:25:40 +02:00
Matthias Jentsch
aecfb2eb97 Merge branch 'bugfix/multiselection-not-visible-9054'
fixes #9054
fixes #9346
2015-06-30 14:08:19 +02:00
Matthias Jentsch
975a834bd4 Remove unused code and clean up 2015-06-30 12:28:41 +02:00
Matthias Jentsch
96677fb6c7 Fix selection when clicking on regular links
refs #9054
refs #9346
2015-06-29 18:51:32 +02:00
Matthias Jentsch
aec59d9941 Use current filter to highlight active rows instead of storing active rows in JS
Clean up selection code and move it into separate behavior and parse filter query to fetch selectable rows.

refs #9054
refs #9346
2015-06-29 18:48:42 +02:00