Upgrade to latest jury libs

19 views
Skip to first unread message

4levels

unread,
Dec 27, 2014, 9:27:35 AM12/27/14
to diem-...@googlegroups.com
Dear Team,

Since I'm still using Diem a lot for personal projects, I got stuck trying to upgrade jQuery to at least version 1.9

The reason I need a newer version is because a lot of cool website templates, like the ones from wrapbootstrap, require more recent versions. A lot of internal Diem libraries like colorbox or justice have updated versions as well.

I managed to get all new versions in the project but the core functionality (eg dropping widgets or using the code editor) just don't work anymore and although I gave it my best try, I failed..

Is any of you guys up to this task? You'll need a good jQuery and Diem knowledge to pull this off!

Alternatively I'm investigating using 2 jQuery versions at the same time, I'll post my results here later.

Kind regards!

Erik aka 4levels

Kye Etherton

unread,
Dec 27, 2014, 9:43:30 AM12/27/14
to diem-...@googlegroups.com
Get me on Skype. I have a plugin which updates the core code to Jquery 1.9. It's not flawless and you sometimes have to refresh a page to edit a widget after you've clsoed it. But it's workable. 

If you can put the JS overrides I have into the right place then the rest is a matter to updating some .on to .live in the zone and widget code which should fix that.

4levels

unread,
Dec 27, 2014, 4:42:28 PM12/27/14
to diem-...@googlegroups.com
Hi Kye,

Thanks for the reply, I'll Skype you soon!  I recon I made good progress myself and exactly the issue with the widget interactions took me very far in the js code.  I can't find the documentation, maybe the code in the repository is just a compiled version of the original sources, maybe Stephane knows more about this ;-)

Anyway, as it renders some core functionality useless, I've decided to leave the issue aside and have a switch in the asset service to load a configurable different jQuery version when viewing the site in frontend without the front editing enabled.  At least that would solve the issue with recent themes and plugins.

I'm almost ready with a commit to add a new page/layout type, (besides top, content, left, right) for the common <nav> element, which proved to be surprisingly simple..

I'll keep you posted here!

4levels

unread,
Dec 27, 2014, 4:45:19 PM12/27/14
to diem-...@googlegroups.com
Autocorrect issues:
  - jury = jquery (title)
  - justice = jstree

4levels

unread,
Dec 28, 2014, 5:14:35 PM12/28/14
to diem-...@googlegroups.com
Hi Team,

I just added 2 branches to solve the issues with the wrapbootstrap theme compatibility.
Both branches are experimental and you can try them out by checking them out in your local repo.
  • zone_css_inner https://github.com/diem-project/diem/compare/zone_css_inner_class?expand=1
    Very often I'm stuck using bootstrap templates where I can't add the proper combination of .row and .container classes in diem zones.  This adds an extra div if set with the give css classes. You need to alter the dm_zone table, add css_class_inner using the same sql type and collation as the css_class field: ALTER TABLE dm_zone ADD css_class_inner VARCHAR(255) AFTER css_class;
  • dual_jquery_versions https://github.com/diem-project/diem/compare/dual-jquery-versions
    Added asset front.jquery pointing to the original diem version.  Override this in your project assets.yml to use another version of jQuery which is only loaded when front edit mode is disabled. When enabling front edit from the toolbar, the custom jQuery version is still in use. Dragging and dropping widgets around is likely not working if you're running a newer version than 1.7.  When you refresh the page with the edit mode enabled, the diem version of jQuery is loaded instead.  You could run into issues with the newer plugins on your front-end but at least the diem widget interactions work as before.
I'm still running more tests to see if this is production ready,

I'll keep you posted here ;-)

Erik
Reply all
Reply to author
Forward
0 new messages