Fixed console error when subnode control is used in panels. Fixes #4246

This commit is contained in:
Murtuza Zabuawala 2019-05-10 11:24:15 +05:30 committed by Akshay Joshi
parent 20c42d878b
commit eb189844e7
2 changed files with 14 additions and 3 deletions

View File

@ -16,4 +16,5 @@ Bug fixes
| `Bug #4164 <https://redmine.postgresql.org/issues/4164>`_ - Fix file browser path issue which occurs when client is on Windows and server is on Mac/Linux.
| `Bug #4218 <https://redmine.postgresql.org/issues/4218>`_ - Properly assign dropdownParent in Select2 controls.
| `Bug #4219 <https://redmine.postgresql.org/issues/4219>`_ - Ensure popper.js is installed when needed.
| `Bug #4219 <https://redmine.postgresql.org/issues/4219>`_ - Ensure popper.js is installed when needed.
| `Bug #4246 <https://redmine.postgresql.org/issues/4246>`_ - Fixed console error when subnode control is used in panels.

View File

@ -1265,7 +1265,12 @@ define([
newRow = self.grid.body.rows[idx].$el;
newRow.addClass('new');
$(newRow).pgMakeBackgridVisible('.backform-tab');
try {
$(newRow).pgMakeBackgridVisible('.backform-tab');
} catch(err) {
// We can have subnode controls in Panels
$(newRow).pgMakeBackgridVisible('.set-group');
}
return false;
}
@ -1516,7 +1521,12 @@ define([
newRow.attr('class', 'new').on('click',() => {
$(this).attr('class', 'editable');
});
$(newRow).pgMakeBackgridVisible('.backform-tab');
try {
$(newRow).pgMakeBackgridVisible('.backform-tab');
} catch(err) {
// We can have subnode controls in Panels
$(newRow).pgMakeBackgridVisible('.set-group');
}
return false;
}
});