mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Some calendar planner view rendering performance improvements, gives ~20% reduction in render time.
This commit is contained in:
parent
afa19c7d30
commit
23384d14f1
@ -933,7 +933,9 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e
|
||||
}
|
||||
|
||||
// Add actual events
|
||||
row._update_events(events);
|
||||
window.setTimeout(jQuery.proxy(function() {
|
||||
this.row._update_events(this.events);
|
||||
}, {row: row, events: events} ),0)
|
||||
|
||||
return row;
|
||||
},
|
||||
|
@ -66,6 +66,8 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
||||
this.set_start_date(this.options.start_date);
|
||||
this.set_end_date(this.options.end_date);
|
||||
|
||||
this._cached_rows = [];
|
||||
|
||||
},
|
||||
|
||||
doLoadingFinished: function() {
|
||||
@ -483,6 +485,7 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
||||
var rows = this._spread_events();
|
||||
var row = jQuery('<div class="calendar_plannerEventRowWidget"></div>').appendTo(this.rows);
|
||||
var height = rows.length * (parseInt(window.getComputedStyle(row[0]).getPropertyValue("height")) || 20);
|
||||
var row_width = this.rows.width();
|
||||
row.remove();
|
||||
|
||||
for(var c = 0; c < rows.length; c++)
|
||||
@ -500,7 +503,7 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
||||
rows[c][i].div.css('top', top+'%');
|
||||
rows[c][i].div.css('height', (100/rows.length)+'%');
|
||||
rows[c][i].div.css('left', left.toFixed(1)+'%');
|
||||
rows[c][i].div.outerWidth(width/100 *this.rows.width() +'px');
|
||||
rows[c][i].div.outerWidth((width/100 * row_width) +'px');
|
||||
}
|
||||
}
|
||||
if(height)
|
||||
|
Loading…
Reference in New Issue
Block a user