This topic is locked

Integration of JavaScript libraries in PHPRunner "dashboard" pages

9/17/2018 10:55:53 AM
PHPRunner Tips and Tricks
fhumanes author

Following the example of Hierarchy, I want to comment on how I integrate any Javascript library that I select from the Internet to use it in the "dashborad" pages of PHPRunner.
Among the examples I want to highlight the following characteristics:

  • How Javascript libraries are integrated in this type of page.
  • What type of page should be defined to show the result of these libraries.
  • How the headers of information detail panels are set.


As an example I have developed this application that you can download from the download area of this page.


Also, tell you that I have worked with the following libraries:

  • AnyChart Versions more current than those that include PHPRunner.
  • AnyGantt.
  • AnyMap
  • AmCharts. Very good solution and in some cases it solves in a much more powerful and easy way than AnyChart, the graphic representations of great quality.
  • jsGantt It is the one in the example

.
The most detailed explanation and an example to download is in [size="6"]my blog[/size].
If you have doubts, once you have reviewed the example, please contact by email and I will try to help you.



Explanation:

How is Javascript libraries integrated into this type of page?
I really like to use a field of view / table to make a presentation through a "custom" presentation.


Normally in the code I put an "Include" of an element of a PHP element that I include in "Custom File".

Also, at this point I include all the sources of the library, including in some cases the examples, to verify and test that they work in this location


What type of page should be defined to show the result of these libraries?
Important, for the presentation of the panel to be correct it always has to be a "LIST" page. On this page you have to remove all fields and headers other than the presentation that you want. In the third image, the page used in the example is shown.
How are the headers of information detail panels set?

tion


As shown in the image, use the formula "{% master.<Field of the master table>}", so that the code of the project from which the data is provided is displayed in the header of the panel.

K
klyle 10/18/2018

Super helpful. Thanks, Fernando!

fhumanes author 10/27/2018

Thanks to Chris Clement for detecting the problem and telling me.
The example did not work in version PHPRunner 10.0.
The problem is that in this version when the page "list.php" is executed, I think that by mistake the page "masterlist.php" is also running and at that moment it has no context to capture the "id of project" and gives error.
The correction is that when there is no "masterkey" it does not build the GANTT.
I have created a new version that is downloadable from my blog.
Regards,
fernando

fhumanes author 2/4/2020

Hi:
A fairly complete example of Javascript library integration in PHPRunner 9.8, which integrates library solutions from: