209 Commits

Author SHA1 Message Date
raviks789
703956c3da Fix unresponsive modal submit buttons in Safari 2021-11-10 09:33:21 +01:00
Markus Frosch
d4763498e4
js: Fix regression for loading dependent modules for sub-containers (#4533) 2021-11-08 13:16:06 +01:00
Johannes Meyer
e346c1c88c events.js: Also accept $autoSubmittedBy from event.detail 2021-01-13 17:17:18 +01:00
Johannes Meyer
b85360449b js: Ignore anchors without href in events.linkClicked() 2019-12-13 16:13:55 +01:00
Johannes Meyer
4af48c797d js: Remove ui.fixControls() and ui.initializeControls()
Hooray!
2019-12-06 15:39:14 +01:00
Johannes Meyer
cc065b949b js: Use custom event icinga-init to trigger initial render events
The `load` event is not really only fired *after all shared resources are loaded*.
Just Chromium ensures this event is fired only after `ready` and `DOMContentLoaded`.
FF, IE and Safari don't so we need our own post-init event: `icinga-init`
2019-11-26 16:00:21 +01:00
Johannes Meyer
48098a2830 js: Don't initialize modules using a beforerender event
`beforerender` is already too late. Module initialization
done using an event handler is wrong anyway. It's some
kind of bootstrapping after all and should be performed
by parts of the code which is directly responsible for
DOM content handling of modules. (i.e. loader.js)

This change though introduces a side-effect which was
not the case previously: Nested `.container` elements
trigger `rendered` events now. I've introduced this to
ensure we're also lazy loading modules and let them
handle their `rendered` events right after a redirect
which rerendered the layout. (Only `#layout` got a
`rendered` event then prior to this change)
2019-11-21 09:55:20 +01:00
Johannes Meyer
7f78c1a8a8 js: Properly initialize modules and don't trigger rendered events twice
Cleans up how our JS initializes module javascript. Previously the `rendered`
event only got fired upon page load if a module got loaded as well. This is
now decoupled and `rendered` events fire for all containers and the entire
layout upon page load.

Notable changes:
* A `load` event initializes modules and triggers `rendered` on `.container` and `#layout` elements
* Module javascript (module.js) is still lazy loaded but with a `beforerender` event, not `rendered`
* Previously `#layout` received a `rendered` event during bootstrapping, this is not the case anymore
* Initial search value preservation now got its own handler `events.onRenderedMenu()`
* Initial dashlet loading now git its own handler `events.loadDashlets()`
2019-11-20 16:22:56 +01:00
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
d0eca387ee js: Also handle spinner elements which are not direct descendants of an element 2019-07-29 10:17:59 +02:00
Johannes Meyer
5cf71c9bbd js: Drop iframe-upload fallback for IE 2019-07-18 07:57:14 +02:00
Loei Petrus Marogi
302422d814 Allow to fully customize click and submit handling
resolves #3767
2019-05-27 14:34:38 +02:00
Jennifer Mourek
b6f8df5ddc Disallow new tab opening on anything but anchors 2019-05-24 11:09:05 +02:00
Jennifer Mourek
1c666d88e6 Prevent new tab opening in tables and href="#" 2019-05-23 11:04:11 +02:00
Jennifer Mourek
26d696372f Exclude multiselect rows from the open new tab feature 2019-05-21 15:06:16 +02:00
Jennifer Mourek
2c1abe13a1 Make ctrl-click open new tab
refs #3722
2019-03-20 14:19:14 +01:00
Florian Strohmaier
d1cbc4b05c JS: Remove excessive scroll events 2018-10-16 15:41:33 +02:00
Johannes Meyer
c2b3bbb87b events.js: Don't search as long as the user is typing
500ms is for the average typist. Still fast enough, imho.

refs #3348
2018-04-24 12:33:04 +02:00
Alexander A. Klimov
41b105136d Preserve collapsed FilterEditor subtrees across auto-refreshes
refs #2964
2018-04-06 13:54:51 +02:00
Alexander A. Klimov
1f61744b57 Make search reset control working across auto-refresh
refs #2753
2018-01-15 15:09:50 +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
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