Re: couleur des évènements-[Résolu]
Publié : 21 févr. 2011, 11:34
Bonjour,
Chez moi, les couleurs restent lorsque les évènements sont passés.
Patrick
Chez moi, les couleurs restent lorsque les évènements sont passés.
Patrick
Forums d'assistance et de discussion sur les logiciels produits par Mozilla ou créés à partir des technologies Mozilla. Ce site ne dépend pas de la fondation Mozilla et est maintenu par un collectif de bénévoles.
https://forums.mozfr.org/
Effectivement sur un agenda local les couleurs restent ,mais pas sur l'agenda googlepvdh a écrit :Chez moi, les couleurs restent lorsque les évènements sont passés.
Code : Tout sélectionner
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
.calendar-event-box-container[categories] { margin: 1px !important;} /* add margin to the category-box */
.calendar-color-box:not([categories]) { color: black !important; background-color: #A6A6A6 !important;} /* events without category will appear grey */
calendar-category-box:not([categories]) { display: block !important; } /* category-box always displayed even if event doesn't have a category */
/* Two ways to use the next lines : 1 - using the calendar name (warning : some users can rename calendars...) */
.category-color-box[calendar="name of calendar"]{ background-color: #C0C0C0 !important; display:block !important; float:right;}
/* display the category-box with the specified color (forced color of the calendar) */
/* 2- using the calendar uri (much better) */
.category-color-box[calendar-uri="http://my.caldav.server/path/to/file"]{ background-color: #FF0000 !important; display:block !important; float:right;}
/* display the category-box with the specified color (forced color of the calendar) */
/* NB : You can add all the calendar links you have... with another color :) */
/* for each category, assign a forced color
NB : each category must be spelled lowercase in the css, spaces replaced with '_'
I didn't make any test with accents... but they may work (lowercase, spaces -> _) eg: "Appel Téléphonique" -> "appel_téléphonique"
*/
.calendar-color-box[categories="deplacement"] { color: black !important; background-color: #CCCCFF !important;}
.calendar-color-box[categories="administratif"] { color: black !important; background-color: #FF99FF !important;}
.calendar-color-box[categories="affaire"] { color: black !important; background-color: #FF0000 !important;}
.calendar-color-box[categories="appel_telephonique"] { color: black !important; background-color: #CC33CC !important;}
.calendar-color-box[categories="bureau"] { color: black !important; background-color: #0000FF !important;}
Code : Tout sélectionner
59c59
< xbl:inherits="calendar-uri,calendar-id"
> xbl:inherits="calendar-uri,calendar-id,categories"
84c84
< xbl:inherits="categories"
> xbl:inherits="categories,calendar-uri"
394c394
< xbl:inherits="categories">
> xbl:inherits="categories,calendar-uri">
Code : Tout sélectionner
64c64
< xbl:inherits="calendar-uri,calendar-id"
> xbl:inherits="calendar-uri,calendar-id,categories"
95c95
< <xul:calendar-category-box anonid="category-box" xbl:inherits="categories" pack="end"/>
> <xul:calendar-category-box anonid="category-box" xbl:inherits="categories,calendar-uri" pack="end"/>
Code : Tout sélectionner
2135c2135
< <xul:calendar-category-box anonid="category-box" xbl:inherits="categories" pack="end" />
> <xul:calendar-category-box anonid="category-box" xbl:inherits="categories,calendar-uri" pack="end" />
Oh oui, ce serait superbetu peux peut-être reprendre directement le code qui est dans la version d'origine et qui utilise les couleurs de calendrier et de nature d'évènement.
a été élargie pour augmenter la taille de la bordure.../skin/calendar/category-overlay.png
Code : Tout sélectionner
diff --git a/content/calendar/calendar-month-view.xml b/content/calendar/calendar-month-view.xml
index 0853ade..ba69e18 100644
--- a/content/calendar/calendar-month-view.xml
+++ b/content/calendar/calendar-month-view.xml
@@ -61,7 +61,7 @@
<xul:hbox>
<xul:box anonid="event-container"
class="calendar-color-box"
- xbl:inherits="calendar-uri,calendar-id"
+ xbl:inherits="calendar-uri,calendar-id,categories"
flex="1">
<xul:box class="calendar-event-selection" orient="horizontal" flex="1">
<xul:stack anonid="eventbox"
@@ -102,7 +102,7 @@
class="item-classification-box"
pack="end"/>
</xul:hbox>
- <xul:calendar-category-box anonid="category-box" xbl:inherits="categories" pack="end"/>
+ <xul:calendar-category-box anonid="category-box" xbl:inherits="categories,calendar-id" pack="end"/>
</xul:stack>
</xul:hbox>
<xul:image anonid="gradient"
diff --git a/content/calendar/calendar-multiday-view.xml b/content/calendar/calendar-multiday-view.xml
index 7e375a7..40f2bc6 100644
--- a/content/calendar/calendar-multiday-view.xml
+++ b/content/calendar/calendar-multiday-view.xml
@@ -2143,7 +2143,7 @@
class="item-classification-box"
pack="end"/>
</xul:hbox>
- <xul:calendar-category-box anonid="category-box" xbl:inherits="categories" pack="end" />
+ <xul:calendar-category-box anonid="category-box" xbl:inherits="categories,calendar-id" pack="end" />
</xul:stack>
<xul:box xbl:inherits="orient">
<xul:calendar-event-gripbar anonid="gripbar1"
diff --git a/content/calendar/calendar-view-core.xml b/content/calendar/calendar-view-core.xml
index 448ee4a..6372bb0 100644
--- a/content/calendar/calendar-view-core.xml
+++ b/content/calendar/calendar-view-core.xml
@@ -56,7 +56,7 @@
<xul:hbox>
<xul:box anonid="event-container"
class="calendar-color-box"
- xbl:inherits="calendar-uri,calendar-id"
+ xbl:inherits="calendar-uri,calendar-id,categories"
flex="1">
<xul:box class="calendar-event-selection" orient="horizontal" flex="1">
<xul:stack anonid="eventbox"
@@ -81,7 +81,7 @@
</xul:vbox>
<xul:stack>
<xul:calendar-category-box anonid="category-box"
- xbl:inherits="categories"
+ xbl:inherits="categories,calendar-id"
pack="end"/>
<xul:hbox anonid="alarm-icons-box"
class="alarm-icons-box"
@@ -401,7 +401,7 @@
<content>
<xul:vbox anonid="category-box"
class="category-color-box calendar-event-selection"
- xbl:inherits="categories">
+ xbl:inherits="categories,calendar-id">
<xul:hbox flex="1">
<xul:image class="calendar-category-box-gradient" height="1"/>
</xul:hbox>
diff --git a/content/calendar/calendar-views.js b/content/calendar/calendar-views.js
index c2b4490..2c8db06 100644
--- a/content/calendar/calendar-views.js
+++ b/content/calendar/calendar-views.js
@@ -512,7 +512,7 @@ function updateStyleSheetForViews(aCalendar) {
if (!(aCalendar.id in ruleCache)) {
// We haven't create a rule for this calendar yet, do so now.
let sheet = getViewStyleSheet();
- let ruleString = '.calendar-color-box[calendar-id="' + aCalendar.id + '"] {} ';
+ let ruleString = '.category-color-box[calendar-id="' + aCalendar.id + '"] {} '; // calendar
let ruleIndex = sheet.insertRule(ruleString, sheet.cssRules.length);
ruleCache[aCalendar.id] = sheet.cssRules[ruleIndex];
@@ -592,12 +592,12 @@ var categoryManagement = {
if (!(aCatName in this.categoryStyleCache)) {
// We haven't created a rule for this category yet, do so now.
let sheet = getViewStyleSheet();
- let ruleString = '.category-color-box[categories~="' + aCatName + '"] {} ';
+ let ruleString = '.calendar-color-box[categories~="' + aCatName + '"] {}'; // category
let ruleIndex = sheet.insertRule(ruleString, sheet.cssRules.length);
-
+
this.categoryStyleCache[aCatName] = sheet.cssRules[ruleIndex];
}
-
+
let color = cal.getPrefSafe("calendar.category.color." + aCatName) || "";
this.categoryStyleCache[aCatName].style.backgroundColor = color;
}
diff --git a/skin/calendar/calendar-views.css b/skin/calendar/calendar-views.css
index b2e6cd9..882bd34 100644
--- a/skin/calendar/calendar-views.css
+++ b/skin/calendar/calendar-views.css
@@ -44,7 +44,7 @@
/* Core */
calendar-category-box:not([categories]) {
- display: none;
+ /*display: none;*/
}
.calendar-item-image {
@@ -201,6 +201,11 @@ calendar-header-container[weekend="true"][selected="true"],
.calendar-event-box-container[categories] {
-moz-margin-end: 0px;
+ margin: 1px;
+}
+
+.calendar-event-box-container:not([categories]) {
+ background-color: #ACACAC;
}
.calendar-event-details {
@@ -233,7 +238,7 @@ calendar-event-box[selected="true"] {
border-bottom: 1px solid #727272;
}
-calendar-event-box[selected="true"] .calendar-event-selection {
+calendar-event-box[selected="true"] .calendar-event-box-container .calendar-event-selection {
color: #000000 !important;
background-color: #ffdb67 !important;
}
@@ -444,7 +449,7 @@ calendar-month-day-box-item {
padding: 0px 1px;
}
-calendar-month-day-box-item[selected="true"] .calendar-event-selection {
+calendar-month-day-box-item[selected="true"] .calendar-event-box-container .calendar-event-selection {
color: #000000 !important;
background-color: #ffdb67 !important;
}
@@ -468,7 +473,7 @@ calendar-month-day-box-item[selected="true"] .calendar-event-selection {
border-bottom: 1px solid #D2D2D2;
}
-calendar-editable-item[selected="true"] .calendar-event-selection {
+calendar-editable-item[selected="true"] .calendar-event-box-container .calendar-event-selection {
color: #000000 !important;
background-color: #ffdb67 !important;
}
diff --git a/skin/calendar/category-overlay.png b/skin/calendar/category-overlay.png
index d44fb60..bb5f306 100644
Binary files a/skin/calendar/category-overlay.png and b/skin/calendar/category-overlay.png differ