Elxis CMS Forum

Extensions => Components => Topic started by: michalis1984 on May 07, 2020, 21:09:28

Title: eTables doesnt work for elxis 5
Post by: michalis1984 on May 07, 2020, 21:09:28
Guys this component isn't compatible with elxis 5 and I use it a lot. It's useful. Anybody feels the same?

The creator of this is lost. It still works for data already in database. Can add tables, but not translations or data (data can be added from the frontpage). I tried to add something from the backend but it looks like it uses colorbox or a library that its removed from the elxis so it doesn't work. I tried to add jQuery at admin template but doesn't seem to solve the problem. At the frontend I can add or edit values at the tables but only at the main language although I got some error message the values are added/changed after a refresh. But can't add translations. I added some translations from phpmyadmin but its pain in ass. Anybody has a fix for this? Or any other alternative solution?
Title: Re: eTables doesnt work for elxis 5
Post by: datahell on May 07, 2020, 22:30:27
ALL Elxis 4.x components are compatible to Elxis 5.x (no library removed!). In administration section, sometimes, you only have to load jquery because Elxis 5.x does not loads it by default. Also sometimes the same is required for lightbox (colorbox). So, open template "Onyx" and make sure you have added in index.php file jquery and/more lightbox as we have written several times in this forum. Do it and if it doesnt work you can send me a personal message with access information to your site (administration and files) to check it and fix it for you.

$eDoc->loadLightbox();

Instructions: https://forum.elxis.org/index.php?topic=9139 (https://forum.elxis.org/index.php?topic=9139)

Notes for lightbox:
Elxis 4.x used colorbox which you can load like this: $eDoc->loadLightbox(); (Elxis 4 and Elxis 5)
Elxis 5.x uses mediabox which you can load like this: $eDoc->loadMediabox(); (Elxis 5 only)
Elxis 4.x components used lightbox in administration section to open windows via ajax.
Elxis 5.x components does not use any external library by default (lightbox/mediabox) but use modal boxes developed by us.

$htmlHelper = $elxis->obj('html');
$htmlHelper->startModalWindow('Test', 'mywin');
....
$htmlHelper->endModalWindow(...);

javascript: elx5ModalOpen('mywin');
Title: Re: eTables doesnt work for elxis 5
Post by: michalis1984 on May 07, 2020, 23:23:31
Thank you for the valuable information and the solution datahell.

What I did already was to add jQuery at admin template.

The error at the console was: Uncaught TypeError: $.colorbox is not a function

By replacing addJQuery() with loadLightbox() it solves the problem, as you predicted :) I read that post a week ago, but I didn't imagine this function loads colorbox.