mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 01:38:51 +00:00
Monotone-Parent: 1f7df7709595f90e31a77eb48e262817f79b279f
Monotone-Revision: 6b80a82a1c8467dead7e9167694acac4cd8cae38 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-21T21:22:25 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2010-05-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/SchedulerUI.js: (resetCategoriesStyles):
|
||||
fixed an exception occurring when
|
||||
UserDefaults['SOGoCalendarCategoriesColors'] is undefined.
|
||||
|
||||
2010-05-21 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxPreferences.js (endEditable,
|
||||
|
||||
@@ -1252,10 +1252,11 @@ function resetCategoriesStyles() {
|
||||
categoriesStyleSheet.removeChild(categoriesStyleSheet.firstChild);
|
||||
}
|
||||
|
||||
// Update stylesheet with new categories colors
|
||||
var selectors = [];
|
||||
var rules = [];
|
||||
categoriesStyles.keys().each(function(category) {
|
||||
if (UserDefaults['SOGoCalendarCategoriesColors']) {
|
||||
// Update stylesheet with new categories colors
|
||||
var selectors = [];
|
||||
var rules = [];
|
||||
categoriesStyles.keys().each(function(category) {
|
||||
var color = UserDefaults['SOGoCalendarCategoriesColors'][category];
|
||||
if (color) {
|
||||
rules[rules.length] = '{ border-right: 8px solid ' + color + '; }';
|
||||
@@ -1263,18 +1264,19 @@ function resetCategoriesStyles() {
|
||||
}
|
||||
});
|
||||
|
||||
if (selectors.length > 0) {
|
||||
if (categoriesStyleSheet.styleSheet && categoriesStyleSheet.styleSheet.addRule) {
|
||||
// IE
|
||||
for (var i = 0; i < selectors.length; i++)
|
||||
categoriesStyleSheet.styleSheet.addRule(selectors[i],
|
||||
rules[i]);
|
||||
}
|
||||
else {
|
||||
// Mozilla + Safari
|
||||
for (var i = 0; i < selectors.length; i++)
|
||||
categoriesStyleSheet.appendChild(document.createTextNode(selectors[i] +
|
||||
' ' + rules[i]));
|
||||
if (selectors.length > 0) {
|
||||
if (categoriesStyleSheet.styleSheet && categoriesStyleSheet.styleSheet.addRule) {
|
||||
// IE
|
||||
for (var i = 0; i < selectors.length; i++)
|
||||
categoriesStyleSheet.styleSheet.addRule(selectors[i],
|
||||
rules[i]);
|
||||
}
|
||||
else {
|
||||
// Mozilla + Safari
|
||||
for (var i = 0; i < selectors.length; i++)
|
||||
categoriesStyleSheet.appendChild(document.createTextNode(selectors[i] +
|
||||
' ' + rules[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user