Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SebastiendOrnano/coop_sqlpage_custom_components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

¡¡¡ More detailed explanations are given in the wiki ¡¡¡

Intro

SQLPage component templates

SQLPage templates are handlebars files that are used to render the results of SQL queries.

Default components

SQLPage comes with a set of default components that you can use without having to write any code. These are documented on https://sql.datapage.app/components.sql

Custom components

You can write your own component templates and place them in the sqlpage/templates directory. To override a default component, create a file with the same name AS the default component. If you want to start FROM an existing component, you can copy it FROM the sqlpage/templates directory in the SQLPage source code.

COOP SQLPage custom components

Context

The following custom components had been developed as part of the COOP template to add features that are not available in the standard SQLPage components.

Disclaimer: I am a self-taught developer. I copy and paste snippets of code found in forums or tutorials or created using AI engines. I don't even understand always what I am pasting ! A professional developer will surely be able to produce a faster and cleaner code. Your comments and suggestions are therefore welcome!

chart1 (link in a rangeBar chart)

COOP is mainly a project management template. In a project, you have to display timelines showing the starting and ending dates of the work packages. You have often to update those dates. In sophisticated project management software programs, you can change the date by moving manually the limit of the rangeBar or by opening a popup form on a click on the rangeBar.

chart1 is a variant of the standard chart component, where he adds the possibility to open a sql file on a click on the rangeBar. You can choose to open, in a new tab, a facts sheet or a form to modify the starting and ending dates.

chart2 (link in a rangeBar chart)

chart2 is a variant of chart1. It was develop for a timeline where the rangeBar were very short. So it was tricky to click on the rangeBar. With chart2, it is possible to click on the labels of the y-axis.

table2 and modal2 (modal popup window on a dynamic url)

The modal component was introduced in SQLPage V37.0 and the _sql_actions in SQLPage V39.0. But in the standard version of the modal and table components, it is not possible to open a popup window on dynmic url generated by a link like /e_project_forum/project_forum_doc_attach_table_4.sql?project_forum_message_id={id}.

To open open a popup window on dynmic url generated by a link, you have to customize two components : table and modal.

About

Custom components for sqlpage used in the coop template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published