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

Comments

Status: Needs review » Needs work

The last submitted patch, snapengage-panels-integration.patch, failed testing.

arnested’s picture

Hi 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 :-)

das-peter’s picture

Awesome, thanks for your great response time & damn, you're right was sloppy patch creation. I'll fix that asap.

das-peter’s picture

Status: Needs work » Needs review
StatusFileSize
new10.5 KB

Here'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.

arnested’s picture

Status: Needs review » Fixed

Hi 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.

das-peter’s picture

Awesome! Thank you very much :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.