简体   繁体   中英

Add / edit pop-up with Plone

I'd like to open Add / Edit page in Plone in a pop-up dialog.

This would be used in conjunction of a list for mass-populating multilingual content by pasting it from the original translation source.

Plone 4 offers some advanced pop-up functionality.

  • Is it possible to open add/edit in a pop-up dialog (jQuery Tools Overlay?)

  • Are there limitations in this functionality (validation etc.)

  • Does it happen in <IFRAME> ?

I haven't tried this myself yet, but it should work just fine using plone.app.jquerytools , which is what Plone 4.x uses for all the pop-ups.

If you do not expect KSS to work, this should all work fine, including validation. The overlay is loaded into a <div> , not an <iframe> .

For the overlay, you simply specify a formselector to pick out what part of the page is the edit form, and tell the tool what to do when you run out of forms (eg the edit was successful). Presumably you'd want to reload the current page. Something like this'd do the trick:

$('li#contentview-edit a').prepOverlay({
    subtype: 'ajax',
    filter: '#content>*',
    formselector: 'form',
    noform: 'reload',
    closeselector: '[name=form.button.Cancel]'
});

you might want to have a look at ploneformgen. this product loads add/edit forms into an overlay when adding form fields in the quickedit mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM