Tryton - Issues

 

Issue7923

Title Sao doen't hide page widget (tab content) when the tab is active
Priority bug Status unread
Superseder Nosy List xar
Type behavior Components sao
Assigned To Keywords
Reviews

Created on 2018-12-12.15:11:09 by xar, last changed by xar.

Messages
msg45289 (view) Author: [hidden] (xar) Date: 2018-12-12.15:11:09
When a page in a notebook is displayed, if server-side code changes invisibility state to 'true', the page tab is hidden, but its content is not.

EG :
For this piece of view : 
    <notebook colspan="6">
        <page string="Page1" id="id_page1">
            <label name="field1"/><field name="field1"/>
        </page>
        <page string="Page2" id="id_page2">
            <label name="field2"/><field name="field2"/>
        </page>
     </notebook>

And this piece of code asking for invisibility :
    @classmethod
    def view_attributes(cls):
        return super(MyModel, cls).view_attributes() + [
            ('//page[@id="page2"]', 'states', {'invisible': Eval('field0') != 'P',}),
                ]

If 'page2' is displayed, and the conditions asks for hidding, the content div is still displayed

It seems that the content is still marked as active.
Below is the div state that is unchanged before and after the server side code asked for invisibility :
    <div role="tabpanel" class="tab-pane active" id="ui-id-30">
History
Date User Action Args
2018-12-12 15:11:09xarcreate

Showing 10 items. Show all history (warning: this could be VERY long)