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
1=== modified file 'addons/web_calendar/static/src/js/calendar.js'
2--- addons/web_calendar/static/src/js/calendar.js 2012-12-18 15:16:57 +0000
3+++ addons/web_calendar/static/src/js/calendar.js 2013-01-14 11:18:24 +0000
4@@ -254,7 +254,7 @@
5 if (this.color_map[key]) {
6 return this.color_map[key];
7 }
8- var index = _.keys(this.color_map).length % this.COLOR_PALETTE.length;
9+ var index = key % this.COLOR_PALETTE.length;
10 var color = this.COLOR_PALETTE[index];
11 this.color_map[key] = color;
12 return color;