mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
form.js: Don't abort content updates in case of auto submits
This commit is contained in:
parent
f2e53d420b
commit
defd8132aa
@ -40,10 +40,11 @@
|
||||
* @param $container {jQuery} The target container where the html will be rendered in
|
||||
* @param action {String} The action-url that caused the reload
|
||||
* @param autorefresh {Boolean} Whether the rendering is due to an autoRefresh
|
||||
* @param autoSubmit {Boolean} Whether the rendering is due to an autoSubmit
|
||||
*
|
||||
* @returns {string|NULL} The content to be rendered, or NULL, when nothing should be changed
|
||||
*/
|
||||
Form.prototype.renderHook = function(content, $container, action, autorefresh) {
|
||||
Form.prototype.renderHook = function(content, $container, action, autorefresh, autoSubmit) {
|
||||
if ($container.attr('id') === 'menu') {
|
||||
var $search = $container.find('#search');
|
||||
if ($search[0] === document.activeElement) {
|
||||
@ -57,7 +58,7 @@
|
||||
return content;
|
||||
}
|
||||
|
||||
if (! autorefresh) {
|
||||
if (! autorefresh || autoSubmit) {
|
||||
return content;
|
||||
}
|
||||
|
||||
|
@ -1167,7 +1167,7 @@
|
||||
var discard = false;
|
||||
$.each(_this.icinga.behaviors, function(name, behavior) {
|
||||
if (behavior.renderHook) {
|
||||
var changed = behavior.renderHook(content, $container, action, autorefresh);
|
||||
var changed = behavior.renderHook(content, $container, action, autorefresh, autoSubmit);
|
||||
if (changed === null) {
|
||||
discard = true;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user