Please helb me…how i can select (nested) and hide/show accordion or accordionitem?
function hidden_accordion() {
alert("Hide the accordion_body_cell_4");
$$(accordion_2.cells('accordion_body_cell_4')).hide(); //FALSE
}
</script>
<script type="text/javascript" charset="utf-8">
dhx.ui({ id: 'app', view: 'layout', height: 320, width: 240,
rows: [
{ view: 'layout', type: 'wide', id: 'layout_3',
cols: [
{ view: 'layout', type: 'wide',
rows: [
{ view: 'toolbar', type: 'MainBar',
elements: [
{ view: 'label', label: 'Login', id: 'control_label_2'}
], id: 'toolbar_2'
},
{ view: 'form', scroll: true,
elements: [], id: 'form_2'
}
], id: 'layout_4'
},
{ view: 'layout', type: 'wide',
rows: [
{ view: 'toolbar', type: 'MainBar',
elements: [
{ view: 'label', label: 'Inventur', id: 'control_label_3'},
//{ view: 'button', label: 'Logoff', id: 'control_button_2'}
{view:"button", label:"S", click:"$$('layout_4').show();",inputWidth:70, align:"right" },
{view:"button", label:"H", click:"$$('layout_4').hide();",inputWidth:70 }
], id: 'toolbar_3'
},
{ view: 'template', template: 'some text here', id: 'template_3'},
{ view: 'accordion',
cols: [
{ header: 'Teambarcode', headerHeight:15, headerAltHeight:15,
body: { view: 'form', scroll: true,
elements: [
{ view: 'text', label: 'TeamBarcode', value: 'Value', labelPosition: 'left', labelAlign: 'left', type: 'text', id: 'control_teambarcode'}
], id: 'form_teambarcode'
}, id: 'accordion_body_cell_2'
},
{ header: 'Lager', headerHeight:15, headerAltHeight:15,
body: { view: 'form', scroll: true,
elements: [
{ view: 'text', label: 'Lager', value: 'Value', labelPosition: 'left', labelAlign: 'left', type: 'text', id: 'control_lager'}
], id: 'form_lager'
}, id: 'accordion_body_cell_3'
},
{ header: 'Artikel', headerHeight:15, headerAltHeight:15,
body: { view: 'form', scroll: true,
elements: [
{ view: 'text', label: 'Artikel', value: 'Value', labelPosition: 'left', labelAlign: 'left', type: 'text', id: 'control_artikel'}
], id: 'form_artikel'
}, id: 'accordion_body_cell_4'
},
{ header: 'Menge', headerHeight:15, headerAltHeight:15,
body: { view: 'form', scroll: true,
elements: [
{ view: 'text', label: 'Menge1', value: 'Value', labelPosition: 'left', labelAlign: 'left', type: 'text', id: 'control_menge_1'},
{ view: 'text', label: 'Menge2', value: 'Value', labelPosition: 'left', labelAlign: 'left', type: 'text', id: 'control_menge_2'},
{ view: 'button', label: 'Button', id: 'control_button_menge'},
{ view: 'button', label: 'HA', click:'hidden_accordion', inputWidth:50 }
], id: 'form_menge'
}, id: 'accordion_body_cell_5'
}
], id: 'accordion_2', height: 200
},
{ view: 'template', template: 'some text here', id: 'template_2'}
], id: 'layout_5'
}
]
}
]
}
);