diff --git a/mozilla/calendar/base/content/calendar-management.js b/mozilla/calendar/base/content/calendar-management.js index 26988768727..bdb23d98c61 100644 --- a/mozilla/calendar/base/content/calendar-management.js +++ b/mozilla/calendar/base/content/calendar-management.js @@ -226,7 +226,7 @@ function calendarListUpdateColor(aCalendar) { } } - var ruleString = selectorPrefix + "(color-" + color.substr(1) + ") { }"; + var ruleString = selectorPrefix + "(calendar-list-tree-color, color-" + color.substr(1) + ") { }"; var rule = gCachedStyleSheet .insertRule(ruleString, gCachedStyleSheet.cssRules.length); @@ -335,43 +335,49 @@ var calendarListTreeView = { return this.mCalendarList.length; }, - getRowProperties: function cLTV_getRowProperties(aRow, aProps) {}, getCellProperties: function cLTV_getCellProperties(aRow, aCol, aProps) { + this.getRowProperties(aRow, aProps); + this.getColumnProperties(aCol, aProps); + }, + + getRowProperties: function cLTV_getRowProperties(aRow, aProps) { var calendar = this.mCalendarList[aRow]; var composite = getCompositeCalendar(); - switch (aCol.id) { - case "calendar-list-tree-checkbox": - if (composite.getCalendar(calendar.uri)) { - aProps.AppendElement(getAtomFromService("checked")); - } else { - aProps.AppendElement(getAtomFromService("unchecked")); - } - break; - case "calendar-list-tree-color": - // Get the calendar color - var color = calendar.getProperty("color"); - color = color && color.substr(1); + // Set up the composite calendar status + if (composite.getCalendar(calendar.uri)) { + aProps.AppendElement(getAtomFromService("checked")); + } else { + aProps.AppendElement(getAtomFromService("unchecked")); + } - // Set up the calendar color (background) - var bgColorProp = "color-" + (color || "default"); - aProps.AppendElement(getAtomFromService(bgColorProp)); + // Get the calendar color + var color = calendar.getProperty("color"); + color = color && color.substr(1); - // Set a property to get the contrasting text color (foreground) - var fgColorProp = getContrastingTextColor(color || "a8c2e1"); - aProps.AppendElement(getAtomFromService(fgColorProp)); + // Set up the calendar color (background) + var bgColorProp = "color-" + (color || "default"); + aProps.AppendElement(getAtomFromService(bgColorProp)); - // Set up the readonly symbol - if (calendar.readOnly) { - aProps.AppendElement(getAtomFromService("readOnly")); - } + // Set a property to get the contrasting text color (foreground) + var fgColorProp = getContrastingTextColor(color || "a8c2e1"); + aProps.AppendElement(getAtomFromService(fgColorProp)); - break; + // Set up the readonly symbol + if (calendar.readOnly) { + aProps.AppendElement(getAtomFromService("readOnly")); + } + + // Set up the disabled state + if (calendar.getProperty("disabled")) { + aProps.AppendElement(getAtomFromService("disabled")); + } else { + aProps.AppendElement(getAtomFromService("enabled")); } }, - getColumnProperties: function cLTV_getColumnProperties(a, aProps) {}, + getColumnProperties: function cLTV_getColumnProperties(aCol, aProps) {}, isContainer: function cLTV_isContainer(aRow) { return false; diff --git a/mozilla/calendar/base/themes/pinstripe/calendar-management.css b/mozilla/calendar/base/themes/pinstripe/calendar-management.css index 45a8c18223e..7ce6e3ea760 100644 --- a/mozilla/calendar/base/themes/pinstripe/calendar-management.css +++ b/mozilla/calendar/base/themes/pinstripe/calendar-management.css @@ -34,42 +34,46 @@ * * ***** END LICENSE BLOCK ***** */ -treechildren::-moz-tree-image(calendar-list-tree-checkbox) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-checkbox) { list-style-image: url(chrome://calendar/skin/unifinder/checkbox_unchecked.png); } -treechildren::-moz-tree-image(calendar-list-tree-checkbox, checked) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-checkbox, checked) { list-style-image: url(chrome://calendar/skin/unifinder/checkbox_checked.png); } -treechildren::-moz-tree-cell(color-default) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-checkbox, disabled) { + list-style-image: url(chrome://calendar/skin/unifinder/checkbox_unchecked.png); +} + +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-color, color-default) { background-color: #a8c2e1; } -treechildren::-moz-tree-cell(calendar-list-tree-checkbox) { +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-checkbox) { padding: 0; } -treechildren::-moz-tree-cell(calendar-list-tree-color) { +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-color) { margin: 1px; padding: 0; } -treechildren::-moz-tree-cell(calendar-list-tree-calendar) { +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-calendar) { -moz-margin-start: 1px; } -treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, black) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, black) { list-style-image: url(chrome://calendar/skin/calendar-readOnly.png); -moz-image-region: rect(0, 10px, 10px, 0); } -treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, white) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, white) { list-style-image: url(chrome://calendar/skin/calendar-readOnly.png); -moz-image-region: rect(0, 20px, 10px, 10px); } -tree { +#calendar-list-tree-widget { border: none; padding: 0; margin: 4px; diff --git a/mozilla/calendar/base/themes/winstripe/calendar-management.css b/mozilla/calendar/base/themes/winstripe/calendar-management.css index 8cca165de8a..aac974c4882 100644 --- a/mozilla/calendar/base/themes/winstripe/calendar-management.css +++ b/mozilla/calendar/base/themes/winstripe/calendar-management.css @@ -34,37 +34,47 @@ * * ***** END LICENSE BLOCK ***** */ -treechildren::-moz-tree-image(calendar-list-tree-checkbox) { + +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-checkbox) { list-style-image: url(chrome://calendar/skin/unifinder/checkbox_unchecked.png); } -treechildren::-moz-tree-image(calendar-list-tree-checkbox, checked) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-checkbox, checked) { list-style-image: url(chrome://calendar/skin/unifinder/checkbox_checked.png); } -treechildren::-moz-tree-cell(color-default) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-checkbox, disabled) { + list-style-image: url(chrome://calendar/skin/unifinder/checkbox_unchecked.png); +} + +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-color, color-default) { background-color: #a8c2e1; } -treechildren::-moz-tree-cell(calendar-list-tree-color) { +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-color) { margin: 1px; padding: 0; } -treechildren::-moz-tree-cell(calendar-list-tree-calendar) { +#calendar-list-tree-widget > treechildren::-moz-tree-cell(calendar-list-tree-calendar) { -moz-margin-start: 1px; } -treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, black) { + +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, black) { list-style-image: url(chrome://calendar/skin/calendar-readOnly.png); -moz-image-region: rect(0, 10px, 10px, 0); } -treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, white) { +#calendar-list-tree-widget > treechildren::-moz-tree-image(calendar-list-tree-color, readOnly, white) { list-style-image: url(chrome://calendar/skin/calendar-readOnly.png); -moz-image-region: rect(0, 20px, 10px, 10px); } -tree { +#calendar-list-tree-widget > treechildren::-moz-tree-cell-text(disabled) { + color: GrayText; +} + +#calendar-list-tree-widget { border: none; padding: 0; margin: 4px;