1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    59
    Vote Rating
    0
    gcsolaroli is on a distinguished road

      0  

    Default wrong effect when hiding an animated, modal, BasicDialog

    wrong effect when hiding an animated, modal, BasicDialog


    I am making some progress using YUI-ext and I have managed to set up a modal, animated, BasicDialog.

    Everything works fine, but I found the exit animation (the one invoked by the 'hide') method to be somehow wrong, as the "modal shadow" (the shadow that cover the whole window) is removed before starting the hiding animation.

    I think that, to be coherent, the "modal shadow" should be removed last, as the modal status is removed only after the dialog is closed.

    At the moment I have been able to achieve this behaviour with the following patch.

    ===================================================================
    --- widgets/BasicDialog.js (revision 4)
    +++ widgets/BasicDialog.js (working copy)
    @@ -535,10 +535,12 @@

    beforeHide : function(){
    YAHOO.util.Event.removeListener(document, 'keydown', this.keyDownDelegate);
    - if(this.modal){
    - this.mask.hide();
    - YAHOO.util.Dom.removeClass(document.body, 'masked');
    - }
    + if(!this.animateTarget){
    + if(this.modal){
    + this.mask.hide();
    + YAHOO.util.Dom.removeClass(document.body, 'masked');
    + }
    + }
    },

    /**
    @@ -571,6 +573,12 @@
    hideEl : function(callback){
    this.proxy.hide();
    this.fireEvent('hide', this);
    +
    + if(this.modal){
    + this.mask.hide();
    + YAHOO.util.Dom.removeClass(document.body, 'masked');
    + }
    +
    if(typeof callback == 'function'){
    callback();
    }


    I am using only BasicDialog at the moment, so I don't know if this patch breaks something else on the library. It is also possible that this is not the best way to achieve the desired outcome.

    Hope this helps.

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    With that in place if there is no animation they the modal mask never hides. hock:

    My initial thought was the modal mask should be removed before the animation - so the user doesn't have to wait for it. However, this is inconsistent with the show behavior so I changed it as you have suggested.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    59
    Vote Rating
    0
    gcsolaroli is on a distinguished road

      0  

    Default


    Jack,

    if I am not completely wrong, when there is no animation, the mask should be removed in the beforeHide method, just like before.

    Instead, if there is an animation in place, the mask is removed in the hideEl callback performed after the hide animation.

    At least this is what I was trying to achieve.

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Ah I see. You just have an old version of the code.

Similar Threads

  1. dropdown dissapears while using modal Ext.BasicDialog
    By srdoshi in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 13 Mar 2007, 1:15 PM
  2. [1.0a2 Rev 5] MessageBox opens not modal (modal: true)
    By Arikon in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 27 Feb 2007, 9:52 PM
  3. BasicDialog hiding with form button
    By StealthRT in forum Ext 1.x: Help & Discussion
    Replies: 9
    Last Post: 5 Feb 2007, 11:11 PM
  4. Creating a Modal Effect Like MessageBox
    By JohnT in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 30 Jan 2007, 5:13 AM
  5. BasicDialog (modal=true) causes applet to re-init
    By msascha in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 28 Jan 2007, 3:31 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi