Jump to content

Close pw-panel after save in admin


zoeck
 Share

Recommended Posts

Hello,

I have written a small admin module that displays a "tabulator" table. Within this table there are edit links for the listed pages.
If you click on this edit link, a pw-panel opens and you can edit everything.

But after saving the page, the pw-panel remains open. Is there a way to close the panel when the page has been successfully saved?
Is there any way to react to the closing on the admin page? (for example: reload the tabulator table 😉). 

Or does it make more sense to use a modal?

This is my first own admin module, I would be very happy if someone could help me with it 🙂 

Link to comment
Share on other sites

I've been using panels a lot in the past but I switched to using modals as they seem to have more features like the one you are asking for. Maybe it's also possible with panels, but I've done it using modals and adding the "data-autoclose" attribute to the link. This is a link created by RockFrontend's Alfred editor:

<a href="/cms/page/edit/?id=1047" class="icon pw-modal alfred-edit" data-barba-prevent="" data-buttons="button.ui-button[type=submit]" data-autoclose="" data-reload=""><img src="/site/modules/RockFrontend/icons/edit.svg"><span class="alfred-cover" title="" uk-tooltip="" aria-describedby="uk-tooltip-34" tabindex="0"></span></a>

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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