Jump to content

Recommended Posts

Posted
7 hours ago, jens.martsch said:

$('#pw-panel-shade', window.parent.document).click();

I think that's the best solution and I can't think of any problems using it ? 

  • Like 1
Posted (edited)

Edit: I misunderstood the question above...this post is not really relevant but I'll leave it here anyway :-).

This is how I close PW modals (in Media Manager and other modules). 

 

	/**
	 * Close jQuery UI Modal.
	 *
	 * @param integer $s Number of milliseconds before closing modal.
	 *
	 */
	function closeDialog($s = 1000) {
		setTimeout(function() {
			jQuery('iframe.ui-dialog-content').dialog('close');
		}, $s);
	}

// call the function
// if adding media into a Media Manager Inputfield and closing the dialog is set
// in this case data is an Ajax Response
if (action === "insert" && data.insertAndClose) closeDialog();

Question, are pw-panels the same as pw modals?

Edited by kongondo
  • Like 1
Posted
42 minutes ago, kongondo said:

Question, are pw-panels the same as pw modals?

No, panels are the ones that slide in from left, and modals are like lightboxes.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...