Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

FIXED: Lightbox popup for front end ComplexTableField - possible?


Reply


4 Posts   2357 Views

Avatar
zalzadore

Community Member, 20 Posts

27 September 2008 at 11:20pm

Edited: 02/10/2008 2:32am

Hi Ladies / Gents,
I have a front end ComplexTableField as per the example on [url]http://doc.silverstripe.com/doku.php?id=complextablefield[/url], but the show and edit buttons simply fill out the current browser tab or open a new one rather than use a LightBox.

I've noticed a few people asking questions about getting LightBox working, but have seen no answers relevant to ComplexTableField.

Any ideas how I can pop up a lightBox in the front end?

Ta,
Z.

Avatar
zalzadore

Community Member, 20 Posts

30 September 2008 at 9:23pm

Edited: 30/09/2008 9:29pm

Ah, tricky one eh?

Can anyone point me in the right direction? (Using SS 2.2.2)

Thanks.

Avatar
zalzadore

Community Member, 20 Posts

2 October 2008 at 2:27am

Turns out that there was a dependancy problem.

In SS 2.2.2:
sapphire/forms/ComplexTableField.php has the line:

Requirements::javascript("sapphire/javascript/ComplexTableField.js");

This depends on the prototype extension, but it has not been made a requirement for ComplexTableField (it has for TableListField)

So, I just added the following 3 lines before the Requirements line above:

Requirements::javascript('jsparty/prototype.js');
Requirements::javascript('jsparty/behaviour.js');
Requirements::javascript('jsparty/prototype_improvements.js');

Now it works

Avatar
zalzadore

Community Member, 20 Posts

2 October 2008 at 2:32am

P.S.
How do I enter this as a bug in the ticket system? I've registered, but apparently I don't have the privileges.