Hide Wijdialog completely with out closing

By : Ram
Source: Stackoverflow.com
Question!

I have multiple WijDialogs one above the other. Say flow comes like this: Search Dialog -> Results Dialog -> Save Results Dialog

Consider control is currently in Results dialog which is above Search Dialog, when I move the Dialog I can still see the Search Dialog in the background.

But it is in the blur state because it lost its focus.

I want to make the background dialog completely hidden (make it invisible without closing the search dialog). It should be visible again on closing the Results Dialog .

I tried hiding the Div container of the Search Dialog, but still I can see the title bar.

I can hide the title bar completely by using $(".ui-dialog-titlebar").hide(); but I don’t know how to unhide or show the title bar.

In short, I want to make the background dialog invisible and visible with out losing the values I entered in it previously.

By : Ram


Answers

You can call the 'close' method of the first wijdialog to close it and then call its 'open' method in the close event of the second dialog. The data entered in the first dialog is retained until wijdialog is reinitialized. Please see the code below:

$('#dialog2').wijdialog({
   autoOpen: false,
   stack: true,
   modal: true,
   open: function () {
      $('#dialog1').wijdialog('close');
   },
   close: function () {                    
      $('#dialog1').wijdialog('open');
   }
});
By : AbdiasM


This video can help you solving your question :)
By: admin