Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #17494: Modifying a method parameter does not trigger the save button #1208

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions builder/js/ncf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ $scope.onImportFileChange = function (fileEl) {
return r.state != "untouched";
})
}
return (!$scope.checkDiff(technique, $scope.originalTechnique) && checkUntouchedResources);
return (!$scope.checkDiff($scope.originalTechnique, technique) && checkUntouchedResources);
};

// Check if a technique has been saved,
Expand Down Expand Up @@ -1612,6 +1612,7 @@ $scope.onImportFileChange = function (fileEl) {
stList.push(i + "-\xA0" + st[i].component)
}
if(ct.length == st.length) {
var diffParams = false;
var st_params, ct_params;
for(var i=0; i<st.length; i++){
//Remove some properties that we don't want to compare
Expand All @@ -1624,18 +1625,16 @@ $scope.onImportFileChange = function (fileEl) {
if(ct[i].OS_class.minorVersion === undefined) delete ct[i].OS_class.minorVersion;
if(ct[i].OS_class.majorVersion === undefined) delete ct[i].OS_class.majorVersion;
//Store parameters to compare them separetly
st_params = st[i].parameters;
delete st[i].parameters;
ct_params = ct[i].parameters;
delete ct[i].parameters;
}
var diffParams = false;
for(var p in st_params){
if(st_params[p].name != ct_params[p].name || st_params[p].value != ct_params[p].value){
diffParams = true;
st_params = st[i].args;
delete st[i].args;
ct_params = ct[i].args;
delete ct[i].args;
for(var p in st_params){
if(st_params[p] != ct_params[p]){
diffParams = true;
}
}
}

diff = diffParams || !angular.equals(st , ct);
field = diff ? checks[check] : undefined;
} else {
Expand Down