From b110cb63fd81aabe917e7b95413f8293f8d965d4 Mon Sep 17 00:00:00 2001 From: "lukas.steiger@siemens.com" Date: Wed, 28 Mar 2018 09:34:16 +0200 Subject: [PATCH] improved PA selector disabler --- src/components/bulk-mover.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/bulk-mover.js b/src/components/bulk-mover.js index 9883aae..e4f0e8f 100644 --- a/src/components/bulk-mover.js +++ b/src/components/bulk-mover.js @@ -189,10 +189,19 @@ const BulkMoverComponent = Vue.extend({ }, loadQuery() { - var el = JazzHelpers.getQueryDialog(this.querySelected); - setTimeout(function() { - el.contentWidget.areaSelect.disabled = true; - }, 100); + var queryDialog = JazzHelpers.getQueryDialog(this.querySelected); + this.disablePASelectorInQuery(queryDialog, 0); + }, + + disablePASelectorInQuery(queryDialog, attempt) { + var self = this; + if(typeof queryDialog.contentWidget !== "undefined" && typeof queryDialog.contentWidget.areaSelect !== "undefined") { + queryDialog.contentWidget.areaSelect.disabled = true; + } else if(attempt < 15) { + setTimeout(function() { + self.disablePASelectorInQuery(queryDialog, ++attempt); + }, 50); + } }, querySelected(data) {