With the current implementation using queryDelay, this means that the
change event for the input never completes. This in turn leads to
the input panel never changing its dirty status. By using the
beforequery event we can simply cancel the query without resorting to
the queryDelay hack.
Reported-By: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Reviewed-by: Mira Limbeck <m.limbeck@proxmox.com>
},
});
- var disable_query_for_ips = function(f, value) {
- if (value === null ||
- value.match(/^\d/)) { // IP address starts with \d
- f.queryDelay = 9999999999; // hack: disable with long delay
- } else {
- f.queryDelay = 10;
- }
- };
-
var columns = [];
if (!me.ref_type) {
},
});
- me.on('change', disable_query_for_ips);
+ me.on('beforequery', function(queryPlan) {
+ return !(queryPlan.query === null || queryPlan.query.match(/^\d/));
+ });
me.callParent();
},