[Vtigercrm-developers] Hovering over contacts

Preexo preexo at googlemail.com
Fri Feb 12 06:58:00 GMT 2016


I put it into our customization module with some javascript. since only one
user didn't want the popup, I just checked the user name, lol... dirty, but
it works fine. This is in the document ready part of my custom extension.
You might leave away the ajax request... if not, write your own adapter...
Does that help you enough?


    	if (typeof Vtiger_Index_Js != 'undefined') {
    		// remember old register tooltip event before overriding
    		var _registerTooltipEvents = Vtiger_Index_Js.registerTooltipEvents;
    		// override register tooltip event
    		Vtiger_Index_Js.registerTooltipEvents = function() {
        	// get all customization data first
            	var data = null;
            	var url =
'index.php?module=MSACustomizations&action=MSACustomizationsAjax&mode=getData';
            	AppConnector.request(url).then(
        			function(data) {
        				if(data.result != null && data.result != ''){
        					// EXTENSION 1
        					// only if the user name is not equals abc register the
tooltips
        					if(data.result.content.user_name !=
"userNameThatDoesNotWantThePopUp"){
        						_registerTooltipEvents();
        					}
        				} else{
        					console.log("couldn't get data from API")
        				}
        			}
            	);
    		}
    	}



--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Hovering-over-contacts-tp18396p18398.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list