Merge lp:~openerp-dev/openerp-web/7.0-base-calendar-api into lp:openerp-web/7.0

Proposed by Arnaud Pineux (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-base-calendar-api
Merge into: lp:openerp-web/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web_calendar/static/src/js/calendar.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-base-calendar-api
Reviewer Review Type Date Requested Status
qdp (OpenERP) Pending
Review via email: mp+143080@code.launchpad.net

Description of the change

This branch allows to always have the same color for a specific user in the calendar view. Unfortunately this change also create more collision than before. It is possible for two or more users to have the same color. This is due to a small set of color.

To post a comment you must log in.

Unmerged revisions

3699. By Arnaud Pineux (OpenERP)

[MERGE] with Web/7.0

3698. By Arnaud Pineux (OpenERP)

[IMP] calendar color is always the same for a user

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web_calendar/static/src/js/calendar.js'
--- addons/web_calendar/static/src/js/calendar.js 2012-12-18 15:16:57 +0000
+++ addons/web_calendar/static/src/js/calendar.js 2013-01-14 11:18:24 +0000
@@ -254,7 +254,7 @@
254 if (this.color_map[key]) {254 if (this.color_map[key]) {
255 return this.color_map[key];255 return this.color_map[key];
256 }256 }
257 var index = _.keys(this.color_map).length % this.COLOR_PALETTE.length;257 var index = key % this.COLOR_PALETTE.length;
258 var color = this.COLOR_PALETTE[index];258 var color = this.COLOR_PALETTE[index];
259 this.color_map[key] = color;259 this.color_map[key] = color;
260 return color;260 return color;