Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Enable a extra button in Edition mode of IPE to enable users to see the final results before to save
Comments
Comment #1
-enzo- CreditAttribution: -enzo- commentedThe current patch require the image will be copied inside folder panels_ipe/images/
After apply the patch, when a user tried to customize a panel page using IPE a third bottom for preview will be enabled as you can see in the following image.
After click the preview bottom all IPE elements will be hidden, providing a close look & feel to end user to final result before the user save the panel page.
The end user always can return to the regular IPE interfaz to continue adding elements
Comment #2
GDrupal CreditAttribution: GDrupal commentedIt works great for me. RTBC +1
Comment #3
japerryUnfortunately when you have this option enabled, the preview button actually ends up saving the IPE.
Comment #4
eugene.britThanx for the patch :)
I added some changes, because I had some propblems.
I used Panopoly 1.2, with Panels 3.4.
When I added some content to the page, then clicked Preview and finally clicked Cancel, I got edit form on the view page(see screenshot).
So I changed
Drupal.PanelsIPE.editors[this.element_settings.ipe_cache_key].initEditing();
to
Drupal.PanelsIPE.editors[this.element_settings.ipe_cache_key].showForm();
Also, I wrapped all text in t() and added css styles like an IPE buttons.
Comment #5
drasgardian CreditAttribution: drasgardian commentedThe patch in #4 was in the wrong format and wouldn't apply so I've tried to merge those changes into a new patch.
The
to
change mentioned above seems to cause me more problems though - the IPE bar disappears when closing the add content dialog box. So I left that change out.
I could not replicate the issue described in #3
Comment #8
gaborpeter CreditAttribution: gaborpeter commentedPatch #1 worked like a charm, thank you very much
Comment #9
drasgardian CreditAttribution: drasgardian at Eighty Options commentedre-roll of #5 to apply against latest head attached.
Comment #10
muschpusch CreditAttribution: muschpusch commentedWorks great and is pretty straight forward
Comment #13
japerryIf you delete a pane from IPE and hit cancel, the expected result is that the pane will come back without having to reload the page.
With the preview functionality, if you delete a pane, then hit the preview button, then cancel, the pane stays gone until you reload the page.
Comment #14
davidsheart02 CreditAttribution: davidsheart02 commentedI believe the reason the IPE/Cancel functionality wasn't working as expected with the latest patch is because the command to initEditing was resetting things that shouldn't have been reset. I've changed it to simply show the ipe toolbar and it appears to be working as expected.
Comment #15
davidsheart02 CreditAttribution: davidsheart02 commentedI realized that the patch didn't apply cleanly against the latest dev. Here's the updated version. Same deal as before, expects the preview icon to be in place in the aforementioned folder.
Comment #16
davidsheart02 CreditAttribution: davidsheart02 commentedComment #17
davidsheart02 CreditAttribution: davidsheart02 commentedErg... double checked and still ran into an error applying that last patch... Next time I'll test before I post. This one worked cleanly for me.
Comment #18
satrece CreditAttribution: satrece commentedIn #17 button value does not change button text when i click on preview. In panels_ipe.js
Instead
$(this.element).attr('value', 'Preview off')
should use the below
$(this.element).attr('value', 'Preview off').html('Preview off');
same goes to else condition also
$(this.element).attr('value', 'Preview')
should use the below
$(this.element).attr('value', 'Preview').html('Preview');
Also after click on 'preview off' lines are not visible on the panels so in 'else' condition
Instead of
$('.panels-ipe-editing').removeClass('panels-ipe-previewing').addClass('panels-ipe-editing');
should use as below
$('.panels-ipe-previewing').removeClass('panels-ipe-previewing').addClass('panels-ipe-editing');
Comment #19
satrece CreditAttribution: satrece commentedIn #17 button value does not change button text when i click on preview. In panels_ipe.js
I have updated in the patch
Comment #20
supriyahj CreditAttribution: supriyahj commentedHi Fellas,
Do we have inline preview for "Change Layout" ipe by any chance in Drupal 7?
Description: Just like "Customize this page", we also have "Change Layout". Onclick of "Change Layout" we can able to change to the opted layout. Currently, we do not have the option to preview the changed layout page by default.
Can anyone please share the patch/link for the same? or can anyone please guide how to preview the changed layout before saving the layout(panels_change_layout_submit).
Regards,
Supriya