Problem/Motivation
One of our customer requested the integration of the SnapEngage Widget, luckily I came across this module :)
Unfortunately our customer has kind of complex requirements for displaying the widget.
The currently available global settings weren't flexible enough to fullfill this needes.
Thus I created a ctools content_type plugin to be able to use a SnapEngage Widget as a panels pane .
That way you can e.g. use different widgets on different pages.
Proposed resolution
Well, the attached patch :)
The approach is pretty straightforward. I've simply isolated the code to insert the JS and re-use it for the content type plugin.
Further I've changed the settings form a little bit - see User interface changes.
Remaining tasks
Reviews needed.
User interface changes
The widget id on the global configuration page isn't required anymore. This to make it possible to "disable" the global configuration in favour of the panels integration.
If the settings are saved with an empty widget id a warning is displayed to ensure the user is aware that the global widget is disabled.
API changes
none
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | snapengage-panels-integration-1916982-4.patch | 10.5 KB | das-peter |
| snapengage-panels-integration.patch | 6.46 KB | das-peter |
Comments
Comment #2
arnested commentedHi Peter,
I like the idea of extending the module with a ctools content type to give people the flexibility to insert the widget via panels.
I think you forgot to add the ctools content type plugin to the patch, though.
Also I would of course prefer the test case to still succeed :-)
Comment #3
das-peter commentedAwesome, thanks for your great response time & damn, you're right was sloppy patch creation. I'll fix that asap.
Comment #4
das-peter commentedHere's the complete patch. Tests should pass again - I "cleaned up" to much in
snapengage_init().Unfortunately I have an issue with my test environment - thus I didn't run the test locally. Let's see what the bot says.
Comment #5
arnested commentedHi Peter,
The patch looks fine.
Only change I made was moving the content type from category "SnapEngage" to "Widgets". I don't think the module should claim its own category.
Applied and released as version 7.x-1.2.
Comment #6
das-peter commentedAwesome! Thank you very much :)