TNT23 Posted September 11, 2014 Share Posted September 11, 2014 I am using the code bellow to display hints when the mouse is over an event... The problem i'm having is that the hint is displayed the second time the mouse goes over the event. I searched the net and i found that the problem is because i create the tooltip inside the eventover .... Is there a workaround??? function eventover(sender, rec, el, eOpts) { var pop_content = "<div id='popup-data'><p><b>Details: </b>" +rec.data.Notes.replace(/\n/g, "<br />")+"</p></div>"; new Ext.ToolTip({ target: el ,title: rec.data.Title ,dismissDelay: 2000 // auto hide after 2 seconds ,anchor: 'top' ,anchorOffset: 85 ,trackMouse: true ,renderTo: Ext.getBody() ,html: pop_content }).show; } Link to comment Share on other sites More sharing options...
TNT23 Posted September 11, 2014 Author Share Posted September 11, 2014 I found the answer .... Add the code bellow to CalendarPanel.ExtEvents.eventsrendered function eventsrendered(sender, eOpts) { var curView = sender; var evtElements = Ext.select('.ext-cal-evt', true); if (evtElements) { //Loop through all elements Ext.each(evtElements.elements, function(eachEl) { //Get EventId from from elment var evtId = curView.getEventIdFromEl(eachEl); var rec = sender.getEventRecord(evtId); if (!Ext.isEmpty(rec)) if (!Ext.isEmpty(evtId)){ var pop_content = "<div id='popup-data'><p><b>Details: </b>" +rec.data.Notes.replace(/\n/g, "<br />")+"</p></div>"; new Ext.ToolTip({ target: eachEl ,title: rec.data.Title ,dismissDelay: 2000 // auto hide after 2 seconds ,anchor: 'top' ,anchorOffset: 85 ,trackMouse: true ,html: pop_content }); } }, this); } } 1 Link to comment Share on other sites More sharing options...
David Oliveira Posted October 3, 2014 Share Posted October 3, 2014 Code to Pascal, good luck! UniCalendarioPanel.ClientEvents.ExtEvents.Values['eventsrendered'] := 'function (sender, eOpts)' + '{ var curView = sender;' + ' var evtElements = Ext.select(''.ext-cal-evt'', true);' + ' if (evtElements)' + ' {' + ' Ext.each(evtElements.elements, function(eachEl) {' + ' var evtId = curView.getEventIdFromEl(eachEl);' + ' var rec = sender.getEventRecord(evtId);' + ' if (!Ext.isEmpty(rec)) {' + ' if (!Ext.isEmpty(evtId)){' + ' var pop_content = "<div id=''popup-data''><p><b>Detalles: </b>" +rec.data.Notes.replace(/\n/g, "<br />")+"</p></div>";' + ' new Ext.ToolTip({' + ' target: eachEl' + ' ,title: rec.data.Title' + // ' ,dismissDelay: 2000 // auto hide after 2 seconds' + // ' ,anchor: ''top''' + // ' ,anchorOffset: 85' + ' ,trackMouse: true' + ' ,html: pop_content' + ' }); ' + ' }' + ' }' + ' }, this);' + ' }' + '}'; 1 1 Link to comment Share on other sites More sharing options...
AntonioM Posted August 6, 2020 Share Posted August 6, 2020 This worked fine in old Unigui, but in Unigui 1.90 it does not work! Any solution? Link to comment Share on other sites More sharing options...
Recommended Posts