@Bauer - if you are going to make this as a proper option, if you think my option 1 approach is ok then why not follow it.
Yeah, I came up with a way of using "the best of both worlds". (see attachment)
The problem with putting the trigger in the header is that the 'fabrikTip' class and options that are needed/used in tipsBootStrapMock.js are all set in the element.php file - on an element by element level.
Like I said, you can't just (dynamically, using javascript) add the fabrikTip class and move the opts attributes from the element span into the column header and it will magically work - It just doesn't work that way.
The only way I could think of to make it work like that would be to use the list javascript to insert the needed eventListener in the column header of elements that use option 3 (Header / Header) - and change the tip position to use the header (th) rather then the cell (td) containing the element.
Something like this...
JavaScript:
requirejs(['fab/fabrik'], function () {
jQuery("#list_283_com_fabrik_283 tbody tr.fabrik_row:first").find("td.fabrik_element span.fabrikTip").each( function(idx, el) {
var tipjson = jQuery(this).context.attributes[1].nodeValue;
var tipobj = JSON.parse(tipjson);
if (tipobj.listTip == "3") {
var thIndex = jQuery(this)["0"].offsetParent.cellIndex;
var thSpan = jQuery(this).closest("table")["0"].childNodes["1"].children["0"].children[thIndex].children["0"];
thSpan.addEventListener("mouseover", function(el2){
var pos = [];
pos.left = el2.pageX;
pos.top = thSpan.parentElement.offsetParent.offsetTop;
pos.width = el2.relatedTarget.offsetWidth;
pos.height = el2.relatedTarget.offsetHeight;
window.fabrikTipPos = pos;
jQuery(el).trigger('mouseover');
});
thSpan.addEventListener("mouseout", function(){
jQuery(el).trigger('mouseout');
delete window.fabrikTipPos;
});
}
});
});
Making just this one change without the other changes I made to tips would be a waste of my time.
I spent much of my day today adding these changes to that same code I had already created for the PR that has been sitting at Github (
#1958) and I tested it and it all works as expected. I have NOT yet changed the PR. But one change/method doesn't work without the other, sorry.
In addition to the checkboxes options shown in the image attached, I also changed the mouseover tip to: "Show tips in list view? - If so, select mouse hover trigger and tip location".