Re: [Xsltforms-support] [PATCH] Reworked Dialogs to fix show-hidding problems
Brought to you by:
alain-couthures
From: Kostis A. <ank...@gm...> - 2010-04-20 09:57:42
|
Hi Alain, 1. By mistake at paste-bin i had placed an earlier version of the patch, which in the Dialog.hide() function it was invoking the Dialog.showSelects() prior to decreasing zindex, which wasn't correct. (you must have noticed that the attached diff-file was not even complete) 2. The Dialog.depth variable in xsltforms.js:347 is not used anywhere. It can be safely deleted (that was included in the patch). 3. Finally i replaced some spaces with tabs for homogenity. The following patch applies the above changes: Index: src/js/main/jsCore.js.xml =================================================================== --- src/js/main/jsCore.js.xml (revision 396) +++ src/js/main/jsCore.js.xml (working copy) @@ -352,10 +352,9 @@ Dialog Panel Management</cm:wiki> <![CDATA[ var Dialog = { - openPosition: {}, - dialogs : [], - init : false, - depth : 0, + openPosition: {}, + dialogs : [], + init : false, initzindex : 50, zindex: 0, selectstack : [], @@ -436,9 +435,6 @@ return; } - this.showSelects(div, true, modal); - div.style.display = "none"; - if (modal) { if (!this.dialogs.length) { this.zindex = 0; @@ -453,6 +449,9 @@ } } } + + this.showSelects(div, true, modal); + div.style.display = "none"; }, ]]> <cm:wiki> -------------------------- end-patch ---------------------- I apologize for the inconvinience, Kostis On Mon, Apr 19, 2010 at 12:09 AM, COUTHURES Alain <ala...@ag...> wrote: > Hi Kostis, >> >> OK, i crafted a solution that prevents the >> «focus-remaining-in-show-dialog-trigger» problem >> from re-opening the same modal-dialog multiple times on [Enter] key >> and then not hidding its "surround" modal-panel . >> >> The same solution also solves the (unreported) general problems of >> invoking multiple times <xf:show> and <xf:hide> for the same >> dialog-ids. >> > > Thank you very much for this solution. > > I have checked and tested it successfully (I just had to fix a problem with > Calendar control). > > This is committed now. > > Thanks! > > -Alain > |