[pgAdmin4][Patch]: Slickgrid loading issue in Query tool - Mailing list pgadmin-hackers

From Surinder Kumar
Subject [pgAdmin4][Patch]: Slickgrid loading issue in Query tool
Date
Msg-id CAM5-9D8fkGNhktgspPc2wS78EEnxtzgCaQsaXADcn0oV=dLhoA@mail.gmail.com
Whole thread Raw
Responses Re: [pgAdmin4][Patch]: Slickgrid loading issue in Query tool  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
Hi

Issue:
Slick-grid libraries loads when an instance of query tool is opened. But sometimes it throws exception "jQuery is not defined" and it doesn't opens up.

Solution:
As per my understanding, In datagrid/index.html file, we set the order of loading libraries such as 
require(['jquery', 'pgadmin', 'pgadmin.sqleditor']) 
but it still loads pgadmin.sqleditor.js file before jQuery for unknown reason.

To fix this, we load pgadmin.sqleditor.js file using require([], function(){}) module loader which ensures that the code within function(){} will be executed when pgadmin.sqleditor.js is loaded.

Please find attache patch.
This issue is fixed by Ashesh Vashi.

Thanks,
Surinder Kumar
Attachment

pgadmin-hackers by date:

Previous
From: Navnath Gadakh
Date:
Subject: Re: pgAdmin IV- Testing framework: Enhanced Test Result Summary
Next
From: Surinder Kumar
Date:
Subject: [pgAdmin4][Patch]: RM1592 - Download as CSV should be supported for DDL