1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-02 17:07:01 +01:00

Miglioramento prestazioni tooltip calendario

This commit is contained in:
Fabio Lovato 2019-04-18 15:52:35 +02:00
parent bcf29081fe
commit 8135b53146

View File

@ -674,11 +674,16 @@ if (Modules::getPermission('Interventi') == 'rw') {
?>
eventAfterRender: function(event, element) {
element.find('.fc-title').html(event.title);
element.data('idintervento', event.idintervento);
<?php
if (setting('Utilizzare i tooltip sul calendario') == '1') {
?>
$.get(globals.rootdir + "/modules/dashboard/actions.php?op=get_more_info&id="+event.idintervento+"&timeStart="+moment(event.start).format("YYYY-MM-DD HH:mm")+"&timeEnd="+moment(event.end).format("YYYY-MM-DD HH:mm"), function(data,response){
element.mouseover( function(){
if( !element.hasClass('tooltipstered') ){
$(this).data('idintervento', event.idintervento );
$.get(globals.rootdir + "/modules/dashboard/actions.php?op=get_more_info&id="+$(this).data('idintervento'), function(data,response){
if( response=="success" ){
data = $.trim(data);
if( data!="ok" ){
@ -696,7 +701,6 @@ if (setting('Utilizzare i tooltip sul calendario') == '1') {
trigger: 'hover',
position: 'left'
});
}
else{
return false;
@ -705,6 +709,8 @@ if (setting('Utilizzare i tooltip sul calendario') == '1') {
$('#calendar').fullCalendar('option', 'contentHeight', 'auto');
}
});
}
});
<?php
}
?>