[Product-Developers] prepOverlay destination

Serge Renfer serge.renfer at gmail.com
Fri Feb 8 06:46:25 UTC 2013


Hi there,

I have the following problem :


   - I want to expose a list of objects (projects) and on each item I
   expose a link to edit subobjects (authors, here)
   - when I click on the edit link I present an overlay with the edit form
   - when the change is validated I would like to return to the the list

But the I have it, it returns from the overlay to the view of the edited
subobject.

How can I return from this prepOverlay to where I come from (just like when
you login in from a document, once you're logged you are returned to this
document)

Here is my js code :

    // edit dialog
    $('a.editAuteur').prepOverlay(
    {
            subtype: 'ajax',
            filter: common_content_filter,
            cssclass: 'overlay-editAuteur',
            formselector: 'form.kssattr-formname-@@edit',
            noform: function(el) {return $.plonepopups.noformerrorshow(el,
'redirect');},
            redirect: $.plonepopups.redirectbasehref,
            closeselector: '[name="form.button.Cancel"]',
            width:'50%'
        }
    );
    // Delete dialog
    $('a.delAuteur').prepOverlay(
        {
            subtype: 'ajax',
            filter: common_content_filter,
            cssclass: 'overlay-delAuteur',
            formselector: '#delete_confirmation',
            noform: function(el) {return $.plonepopups.noformerrorshow(el,
'redirect');},
            redirect: $.plonepopups.redirectbasehref,
            closeselector: '[name="form.button.Cancel"]',
            width:'50%'
        }
    );

and my template code :

            <td class="noprint"  tal:condition="view/canModifyContent"><div
>
                <ul class="the-icons">
                    <li><a title="Editer cet auteur" class='editAuteur'
        tal:attributes="href python:author.getURL() + '/edit'" href="#"><i
class="icon-pencil"></i>
            </a></li>
                    <li><a title="Supprimer cet auteur" class='delAuteur'
        tal:attributes="href python:author.getURL() +
'/delete_confirmation'" href="#"><i class="icon-remove"></i>
            </a></li></ul></div>
            </td>

As you can see, I expose also the possibility to delete the subobject
(author), but there too, I go back to the object of the list (the project)
and not to the list where I come from!

Thanks in advance!
serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20130208/2992387f/attachment.html>


More information about the Product-Developers mailing list