mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Merge pull request #9619 from birarda/bug/domain-settings-save-row
fix for default value insertion in domain server settings
This commit is contained in:
commit
d75512f680
1 changed files with 9 additions and 3 deletions
|
@ -1306,7 +1306,9 @@ function badgeSidebarForDifferences(changedElement) {
|
|||
var isGrouped = $('#' + panelParentID).hasClass('grouped');
|
||||
|
||||
if (isGrouped) {
|
||||
var initialPanelJSON = Settings.initialValues[panelParentID];
|
||||
var initialPanelJSON = Settings.initialValues[panelParentID]
|
||||
? Settings.initialValues[panelParentID]
|
||||
: {};
|
||||
|
||||
// get a JSON representation of that section
|
||||
var panelJSON = form2js(panelParentID, ".", false, cleanupFormValues, true)[panelParentID];
|
||||
|
@ -1417,7 +1419,7 @@ function addTableRow(row) {
|
|||
|
||||
input_clone.children('td').each(function () {
|
||||
if ($(this).attr("name") !== keepField) {
|
||||
$(this).find("input").val($(this).attr('data-default'));
|
||||
$(this).find("input").val($(this).children('input').attr('data-default'));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1595,7 +1597,11 @@ function updateDataChangedForSiblingRows(row, forceTrue) {
|
|||
|
||||
// get a JSON representation of that section
|
||||
var panelSettingJSON = form2js(panelParentID, ".", false, cleanupFormValues, true)[panelParentID][tableShortName]
|
||||
var initialPanelSettingJSON = Settings.initialValues[panelParentID][tableShortName]
|
||||
if (Settings.initialValues[panelParentID]) {
|
||||
var initialPanelSettingJSON = Settings.initialValues[panelParentID][tableShortName]
|
||||
} else {
|
||||
var initialPanelSettingJSON = {};
|
||||
}
|
||||
|
||||
// if they are equal, we don't need data-changed
|
||||
isTrue = !_.isEqual(panelSettingJSON, initialPanelSettingJSON)
|
||||
|
|
Loading…
Reference in a new issue