From d9cb9a341ee136f74d8d7bbc0417bbb8186a0f25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20Kirj=C3=A1k?= <adrien.kirjak@sigmatechnology.com>
Date: Thu, 17 Apr 2025 11:09:18 +0200
Subject: [PATCH] Fix data element edit window can not be closed error + typo
fixes
---
.../ViewModels/ViewModel_AutoGUI.js | 8 ++++----
.../ViewModels/ViewModel_ElementRelay.js | 12 ++++++------
.../ViewModels/ViewModel_UnionTable.js | 14 +++++++-------
.../GuiEditor/Views/View_ElementEditor.js | 10 +++++-----
.../RequestConsole/ViewModels/ViewModel_AutoGUI.js | 8 ++++----
.../RequestConsole/Views/View_ElementEditor.js | 8 ++++----
6 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_AutoGUI.js b/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_AutoGUI.js
index 74cbb93..3f208e0 100644
--- a/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_AutoGUI.js
+++ b/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_AutoGUI.js
@@ -9,11 +9,11 @@ function CViewModel_AutoGUI(aViewModel, aOptions)
/** private members */
var mViewModel;
var mBinder;
- var mReponseDataPaths;
+ var mResponseDataPaths;
/** constructor */
mViewModel = aViewModel;
- mReponseDataPaths = [];
+ mResponseDataPaths = [];
/** public functions - Interface for parent */
this.setSelectionToControl = function(aSelection)
@@ -21,7 +21,7 @@ function CViewModel_AutoGUI(aViewModel, aOptions)
this.setReponseDataPath = function(aExpectedReponseDataIndex, aReponseDataPath)
{
- mReponseDataPaths[aExpectedReponseDataIndex] = aReponseDataPath;
+ mResponseDataPaths[aExpectedReponseDataIndex] = aReponseDataPath;
};
this.setBinder = function(aBinder)
@@ -32,7 +32,7 @@ function CViewModel_AutoGUI(aViewModel, aOptions)
/** public functions - Interface for views */
this.getResponseElement = function()
{
- return mViewModel.getResponseElement(mReponseDataPaths[0]);
+ return mViewModel.getResponseElement(mResponseDataPaths[0]);
};
this.command = function(aCklickedExpandedGetData, aOrigGetData, aValue, aIsContainer, aIsText)
diff --git a/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_ElementRelay.js b/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_ElementRelay.js
index 6887e32..cfad160 100644
--- a/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_ElementRelay.js
+++ b/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_ElementRelay.js
@@ -11,14 +11,14 @@ function CViewModel_ElementRelay(aViewModel, aOptions)
var mOptions;
var mRq;
var mBinder;
- var mReponseDataPaths;
+ var mResponseDataPaths;
var mSelections = []; // mSelectionss is a list of references to objects, each containing a field named "selection"
/** constructor */
mViewModel = aViewModel;
mRq = mViewModel.getRequest();
mOptions = aOptions;
- mReponseDataPaths = [];
+ mResponseDataPaths = [];
/** public functions - Interface for parent */
this.expectedReponseData = function() // TODO: might be put in prototype (without header info)
@@ -33,7 +33,7 @@ function CViewModel_ElementRelay(aViewModel, aOptions)
this.setReponseDataPath = function(aDataPathIndex, aReponseDataPath)
{
- mReponseDataPaths[aDataPathIndex] = aReponseDataPath;
+ mResponseDataPaths[aDataPathIndex] = aReponseDataPath;
};
this.setBinder = function(aBinder)
@@ -66,7 +66,7 @@ function CViewModel_ElementRelay(aViewModel, aOptions)
this.setValue = function(aDataPathIndex, aValue, aIndexInList, aLastSelectionIndexes, aDataHasBeenSet, aAdditionalData)
{
- mViewModel.setResponseElement(mReponseDataPaths[aDataPathIndex], aValue, aIndexInList, aLastSelectionIndexes, aDataHasBeenSet, aAdditionalData);
+ mViewModel.setResponseElement(mResponseDataPaths[aDataPathIndex], aValue, aIndexInList, aLastSelectionIndexes, aDataHasBeenSet, aAdditionalData);
};
/** private functions */
@@ -75,9 +75,9 @@ function CViewModel_ElementRelay(aViewModel, aOptions)
{
var lValues = [];
var lSelections = [];
- for (var i = 0; i < mReponseDataPaths.length; ++i)
+ for (var i = 0; i < mResponseDataPaths.length; ++i)
{
- lValues[i] = aGetValueFunction(mViewModel.getResponseElement(mReponseDataPaths[i]), mViewModel.getRequestFromPath(mReponseDataPaths[i]));
+ lValues[i] = aGetValueFunction(mViewModel.getResponseElement(mResponseDataPaths[i]), mViewModel.getRequestFromPath(mResponseDataPaths[i]));
}
for (var i = 0; i < mSelections.length; ++i)
{
diff --git a/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_UnionTable.js b/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_UnionTable.js
index e4b39cd..abdd796 100644
--- a/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_UnionTable.js
+++ b/htdocs/WebApplications/CustomizableApp/ViewModels/ViewModel_UnionTable.js
@@ -11,7 +11,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
var mOptions = aOptions;
//var mRq = mViewModel.getRequest();
var mBinder;
- var mReponseDataPaths = [];
+ var mResponseDataPaths = [];
var mSelections = []; // mSelectionss is a list of references to objects, each containing a field named "selection"
var mThis = this;
var mEnlistElementName = mOptions.enlistElementName;
@@ -26,7 +26,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
};
this.setReponseDataPath = function (aExpectedReponseDataIndex, aReponseDataPath) {
- mReponseDataPaths[aExpectedReponseDataIndex] = aReponseDataPath;
+ mResponseDataPaths[aExpectedReponseDataIndex] = aReponseDataPath;
};
this.setBinder = function (aBinder) {
@@ -45,11 +45,11 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
if (mOptions.header) {
header = mcopy(mOptions.header);
} else {
- var request = (mViewModel.getRequestFromPath())[mReponseDataPaths[0][0]];
+ var request = (mViewModel.getRequestFromPath())[mResponseDataPaths[0][0]];
if (mEnlistElementName) {
- for(var i = 1; i < mReponseDataPaths[0].length; i++) { //for parents
+ for(var i = 1; i < mResponseDataPaths[0].length; i++) { //for parents
header.push(request.getData.element);
- request = request.getData.children[mReponseDataPaths[0][i]];
+ request = request.getData.children[mResponseDataPaths[0][i]];
}
header.push(request.getData.element); //for connected node (data connection)
}
@@ -70,7 +70,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
};
this.getName = function () {
- return mViewModel.getRequestFromPath(mReponseDataPaths[0]).getData.element;
+ return mViewModel.getRequestFromPath(mResponseDataPaths[0]).getData.element;
};
this.getResponseElement = function (aReponseDataPath, aFullTableSelection) {
@@ -122,7 +122,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
this.getTable = function () {
var aFullTableSelection = {};
- var response = mThis.getResponseElement(mReponseDataPaths[0], aFullTableSelection);
+ var response = mThis.getResponseElement(mResponseDataPaths[0], aFullTableSelection);
return {
selection : mSelections[0] ? mSelections[0].selection : undefined,
table : (response === undefined) ? [] : flattenResponseElement(response.list, aFullTableSelection.depth, 0, aFullTableSelection.parents, aFullTableSelection.path.slice(1))
diff --git a/htdocs/WebApplications/GuiEditor/Views/View_ElementEditor.js b/htdocs/WebApplications/GuiEditor/Views/View_ElementEditor.js
index 6f57024..8d56463 100644
--- a/htdocs/WebApplications/GuiEditor/Views/View_ElementEditor.js
+++ b/htdocs/WebApplications/GuiEditor/Views/View_ElementEditor.js
@@ -12,7 +12,7 @@ function GuiEditor_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_paren
var v_open = false;
var v_parentView = p_parent;
- var v_viewmodel = p_viewmodel.getRequestEditorViewModel();
+ var v_viewModel = p_viewmodel.getRequestEditorViewModel();
var v_path;
var v_request;
@@ -34,14 +34,14 @@ function GuiEditor_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_paren
"headerText": "Edit request"
}
- var v_viewmodelForJSONEditor;
+ var v_viewModelForJSONEditor;
var editor;
var v_this = this;
function init() {
- v_viewmodelForJSONEditor = new ElementEditorViewmodel(v_viewmodel.getRequestCopy(v_path), save);
- editor = new CView_JSONEditor([v_viewmodelForJSONEditor], v_id, v_parentId, v_customDataForEditor);
+ v_viewModelForJSONEditor = new ElementEditorViewmodel(v_viewModel.getRequestCopy(v_path), save);
+ editor = new CView_JSONEditor([v_viewModelForJSONEditor], v_id, v_parentId, v_customDataForEditor);
editor.applicationCreated();
ViewUtils.applyCss(v_customDataForEditor, v_id);
@@ -81,7 +81,7 @@ function GuiEditor_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_paren
v_this.close();
}
v_path = p_path;
- v_request = v_viewmodel.getRequestFromPath(v_path);
+ v_request = v_viewModel.getRequestFromPath(v_path);
v_customDataForEditor.offset = p_offset;
init();
v_open = true;
diff --git a/htdocs/WebApplications/RequestConsole/ViewModels/ViewModel_AutoGUI.js b/htdocs/WebApplications/RequestConsole/ViewModels/ViewModel_AutoGUI.js
index 74cbb93..3f208e0 100644
--- a/htdocs/WebApplications/RequestConsole/ViewModels/ViewModel_AutoGUI.js
+++ b/htdocs/WebApplications/RequestConsole/ViewModels/ViewModel_AutoGUI.js
@@ -9,11 +9,11 @@ function CViewModel_AutoGUI(aViewModel, aOptions)
/** private members */
var mViewModel;
var mBinder;
- var mReponseDataPaths;
+ var mResponseDataPaths;
/** constructor */
mViewModel = aViewModel;
- mReponseDataPaths = [];
+ mResponseDataPaths = [];
/** public functions - Interface for parent */
this.setSelectionToControl = function(aSelection)
@@ -21,7 +21,7 @@ function CViewModel_AutoGUI(aViewModel, aOptions)
this.setReponseDataPath = function(aExpectedReponseDataIndex, aReponseDataPath)
{
- mReponseDataPaths[aExpectedReponseDataIndex] = aReponseDataPath;
+ mResponseDataPaths[aExpectedReponseDataIndex] = aReponseDataPath;
};
this.setBinder = function(aBinder)
@@ -32,7 +32,7 @@ function CViewModel_AutoGUI(aViewModel, aOptions)
/** public functions - Interface for views */
this.getResponseElement = function()
{
- return mViewModel.getResponseElement(mReponseDataPaths[0]);
+ return mViewModel.getResponseElement(mResponseDataPaths[0]);
};
this.command = function(aCklickedExpandedGetData, aOrigGetData, aValue, aIsContainer, aIsText)
diff --git a/htdocs/WebApplications/RequestConsole/Views/View_ElementEditor.js b/htdocs/WebApplications/RequestConsole/Views/View_ElementEditor.js
index 822f80e..b7c7e21 100644
--- a/htdocs/WebApplications/RequestConsole/Views/View_ElementEditor.js
+++ b/htdocs/WebApplications/RequestConsole/Views/View_ElementEditor.js
@@ -12,7 +12,7 @@ function RequestConsole_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_
var v_open = false;
var v_parentView = p_parent;
- var v_viewmodel = p_viewmodel.getRequestEditorViewModel();
+ var v_viewModel = p_viewmodel.getRequestEditorViewModel();
@@ -40,7 +40,7 @@ function RequestConsole_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_
var v_this = this;
function init() {
- v_viewmodelForJSONEditor = new ElementEditorViewmodel(v_viewmodel.getRequestCopy(v_path), save, v_request);
+ v_viewmodelForJSONEditor = new ElementEditorViewmodel(v_viewModel.getRequestCopy(v_path), save, v_request);
editor = new CView_JSONEditor([v_viewmodelForJSONEditor], v_id, v_parentId, v_customDataForEditor);
@@ -82,7 +82,7 @@ function RequestConsole_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_
v_this.close();
}
v_path = p_path;
- v_request = v_viewmodel.getRequestFromPath(v_path);
+ v_request = v_viewModel.getRequestFromPath(v_path);
v_customDataForEditor.offset = p_offset;
init();
v_open = true;
@@ -113,7 +113,7 @@ function RequestConsole_ElementEditor_View(p_viewmodel, p_parentId, p_viewId, p_
v_request[lGetOrSetData].tp = newRequest.tp;
v_parentView.selectionOrFilterChanged(v_path, v_request[lGetOrSetData].selection != undefined, v_request[lGetOrSetData].filter != undefined, v_request[lGetOrSetData].rangeFilter != undefined, v_request[lGetOrSetData].writableInfo != undefined, lGetOrSetData);
- v_viewmodel.modelChanged();
+ v_viewModel.modelChanged();
}
}
--
GitLab