Quick Info / Tooltip Extension


#42

Hello @Joseph,

Regarding the first question:
You can specify the container for the quick-info popup using the “setContainer()” method. In order to set the “grid” as a container, you can use the syntax from our documentation(gantt.$grid):

    gantt.ext.quickInfo.setContainer(gantt.$grid)

or you can get the grid element using jquery selector, like in the fragment below:

gantt.attachEvent("onTaskSelected", function(id){
  var gridElement = document.querySelector(".gantt_grid_data")
    gantt.ext.quickInfo.setContainer(gridElement)

}); 

Here is a demo:
http://snippet.dhtmlx.com/5/1c613e691

You can change the styles of the popup using the “.gantt_cal_quick_info” selector.

Reading the second question:

The behavior with “2 quick info dialogs” that you have occurred, was the result of using both:

gantt.plugins({
	quick_info: true,
});

in the “CODE” part of the snippet, and:

<script src="https://docs.dhtmlx.com/gantt/codebase/ext/dhtmlxgantt_quick_info.js?v=20180322"></script>

in the “HTML” part.

So they were two different dialogs from two “different” extensions. When you will remove the extension, which is added in the script tag, the issue will be fixed.


#43

Hi,
I want to, If task type is a project Quick Info should be hidden,.
If task type is not a project Quick Info should be show.

how can I do it?


#44

Hello,
You can try using the quick_info_class template:
https://docs.dhtmlx.com/gantt/api__gantt_quick_info_class_template.html
There, you can check the task type and return a custom class name. In the style rules, you use the display: none property to hide the Quick Info.
Here is an example of how it works:
http://snippet.dhtmlx.com/5/f930c8444