Hi Alain,
In fact, my generator produce XForms that consists of a repeat that
shows a dialog box on it's current line. The dialog box itself contains
another repeat which displays another dialog box.
It was convenient to directly embed dialogs elements because the context
of the instance was managed directly by the nesting of elements without
additional code. It seems that only the z-index management of the
"xforms-dialog-surround" div mask prevents that.
It does not matter I'll find a solution, leaving the dialog boxes at the
top level.
Thank you for your response.
Benoit
Le 03/05/2012 21:28, Alain Couthures a écrit :
> Hi Benoit,
>
> Nested dialogs are not to be declared as nested elements!
>
> Give a try to this instead:
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xf="http://www.w3.org/2002/xforms"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:sample="http://www.agencexml.com/sample">
> <head>
> <style type="text/css">
> #main_dialog { width: 400px; height: 400px;}
> #nested_dialog { width: 200px; height: 200px;}
> </style>
> <title>Nested dialogs test</title>
> <xf:model/>
> </head>
> <body>
> <xf:trigger><xf:label>Open main dialog...</xf:label>
> <xf:show ev:event="DOMActivate" dialog="main_dialog"/>
> </xf:trigger>
> <xf:dialog id="main_dialog"><xf:label>Main Dialog</xf:label>
> <xf:trigger><xf:label>Open nested dialog...</xf:label>
> <xf:show ev:event="DOMActivate" dialog="nested_dialog"/>
> </xf:trigger>
> <br/>
> <xf:trigger><xf:label>Close</xf:label>
> <xf:hide ev:event="DOMActivate" dialog="main_dialog"/>
> </xf:trigger>
> </xf:dialog>
> <xf:dialog id="nested_dialog"><xf:label>Nested Dialog</xf:label>
> <xf:trigger><xf:label>Close</xf:label>
> <xf:hide ev:event="DOMActivate" dialog="nested_dialog"/>
> </xf:trigger>
> </xf:dialog>
> </body>
> </html>
>
> Thank you for your feedbacks!
>
> -Alain
>
> Le 25/04/2012 15:50, Benoit VINCENT a écrit :
>> Hi Alain,
>> When I try to use nested dialogs (which are very useful when I want to
>> keep the main dialog instance context in the nested one) the nested
>> dialog is masked by the "xforms-dialog-surround".
>>
>> Try this small sample :
>>
>> ============================================================
>> <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
>> <?xsltforms-options debug="yes"?>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>> xmlns:xf="http://www.w3.org/2002/xforms"
>> xmlns:ev="http://www.w3.org/2001/xml-events"
>> xmlns:sample="http://www.agencexml.com/sample">
>> <head>
>> <style type="text/css">
>> #main_dialog { width: 400px; height: 400px;}
>> #nested_dialog { width: 200px; height: 200px;}
>> </style>
>> <title>Nested dialogs test</title>
>> <xf:model/>
>> </head>
>>
>> <body>
>> <xf:trigger><xf:label>Open main dialog...</xf:label>
>> <xf:show ev:event="DOMActivate" dialog="main_dialog"/>
>> </xf:trigger>
>>
>> <xf:dialog id="main_dialog"><xf:label>Main Dialog</xf:label>
>> <xf:trigger><xf:label>Open nested dialog...</xf:label>
>> <xf:show ev:event="DOMActivate" dialog="nested_dialog"/>
>> </xf:trigger>
>> <br/>
>> <xf:trigger><xf:label>Close</xf:label>
>> <xf:hide ev:event="DOMActivate" dialog="main_dialog"/>
>> </xf:trigger>
>>
>> <xf:dialog id="nested_dialog"><xf:label>Nested Dialog</xf:label>
>> <xf:trigger><xf:label>Close</xf:label>
>> <xf:hide ev:event="DOMActivate" dialog="nested_dialog"/>
>> </xf:trigger>
>> </xf:dialog>
>>
>> </xf:dialog>
>>
>> </body>
>> </html>
>> ============================================================
>>
>> The problem is due to z-index behavior (see:
>> https://developer.mozilla.org/fr/CSS/Comprendre_z-index/L%27empilement_de_couches
>>
>> )
>>
>> I think that a solution would be to remove the parent dialog z-index
>> style (or set to auto) when we show the nested one, if not, all the
>> child divs will inherit (after local z-index resolution) the main dialog
>> z-index and will be masked by the "xforms-dialog-surround" div. When we
>> hide the nested dialog we have to restore the main dialog z-index to the
>> initial value.
>>
>> Regards
>> Benoit
>>
>>
>> ------------------------------------------------------------------------------
>>
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Xsltforms-support mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support
>>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support