forked from extern/egroupware
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
|
// 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;
|
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_start_date(this.options.start_date);
|
||||||
this.set_end_date(this.options.end_date);
|
this.set_end_date(this.options.end_date);
|
||||||
|
|
||||||
|
this._cached_rows = [];
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
doLoadingFinished: function() {
|
doLoadingFinished: function() {
|
||||||
@ -483,6 +485,7 @@ var et2_calendar_planner_row = (function(){ "use strict"; return et2_valueWidget
|
|||||||
var rows = this._spread_events();
|
var rows = this._spread_events();
|
||||||
var row = jQuery('<div class="calendar_plannerEventRowWidget"></div>').appendTo(this.rows);
|
var row = jQuery('<div class="calendar_plannerEventRowWidget"></div>').appendTo(this.rows);
|
||||||
var height = rows.length * (parseInt(window.getComputedStyle(row[0]).getPropertyValue("height")) || 20);
|
var height = rows.length * (parseInt(window.getComputedStyle(row[0]).getPropertyValue("height")) || 20);
|
||||||
|
var row_width = this.rows.width();
|
||||||
row.remove();
|
row.remove();
|
||||||
|
|
||||||
for(var c = 0; c < rows.length; c++)
|
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('top', top+'%');
|
||||||
rows[c][i].div.css('height', (100/rows.length)+'%');
|
rows[c][i].div.css('height', (100/rows.length)+'%');
|
||||||
rows[c][i].div.css('left', left.toFixed(1)+'%');
|
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)
|
if(height)
|
||||||
|
Loading…
Reference in New Issue
Block a user