jsdialog: run postProcess also on containers
- added TODO: identify containers correctly by id from JSON not with additional prefixes, this needs revisiting css rules... so do not do it now - run postProcess on containers to hide them if needed Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I8027bf1fd54e18a8cd3f7b85617d1606e9b33a88
This commit is contained in:
parent
e5ef35f716
commit
e34374bba2
1 changed files with 11 additions and 2 deletions
|
@ -2958,11 +2958,20 @@ L.Control.JSDialogBuilder = L.Control.extend({
|
|||
|
||||
var hasManyChildren = childData.children && childData.children.length > 1;
|
||||
if (hasManyChildren && childData.type !== 'buttonbox') {
|
||||
var tableId = childData.id ? 'table-' + String(childData.id).replace(' ', '') : '';
|
||||
var table = L.DomUtil.createWithId('div', tableId, td);
|
||||
// TODO: remove 'table-' prefix, we need exactly the same id so events coming from core
|
||||
// will reach the elements, for postprocess we need to temporary switch the id in childData
|
||||
var backupId = childData.id;
|
||||
childData.id = childData.id ? 'table-' + String(childData.id).replace(' ', '') : '';
|
||||
|
||||
var table = L.DomUtil.createWithId('div', childData.id, td);
|
||||
$(table).addClass(this.options.cssClass);
|
||||
$(table).addClass('vertical');
|
||||
var childObject = L.DomUtil.create('div', 'row ' + this.options.cssClass, table);
|
||||
|
||||
this.postProcess(td, childData);
|
||||
|
||||
// revert correct id
|
||||
childData.id = backupId;
|
||||
} else {
|
||||
childObject = td;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue