don't show 'Sensitive value set' for null, sensitive params'
This closes
};
var valueFormatter = function (row, cell, value, columnDef, dataContext) {
- if (dataContext.sensitive === true) {
+ if (dataContext.sensitive === true && !_.isNil(value)) {
return '<span class="table-cell sensitive">Sensitive value set</span>';
} else if (value === '') {
return '<span class="table-cell blank">Empty string set</span>';
// determine the desired action
if (target.hasClass('delete-parameter')) {
- // mark the property in question for removal and refresh the table
+ if (!parameter.isNew) {
+ // mark the parameter in question for removal and refresh the table
parameterData.updateItem(parameter.id, $.extend(parameter, {
hidden: true
}));
+ } else {
+ // remove the parameter from the table
+ parameterData.deleteItem(parameter.id);
+ }
+
// reset the selection if necessary
var selectedRows = parametersGrid.getSelectedRows();
if (parameter.sensitive) {
$('#parameter-sensitive-radio-button').prop('checked', true);
$('#parameter-not-sensitive-radio-button').prop('checked', false);
+ if (!_.isNil(parameter.value)) {
$('#parameter-value-field').addClass('sensitive').val(nfCommon.config.sensitiveText).select();
+ }
} else {
$('#parameter-sensitive-radio-button').prop('checked', false);
$('#parameter-not-sensitive-radio-button').prop('checked', true);
