Thunderbird + lightning + ganttview 修改源代码个性化订制

以下修改都是针对ganttview的样式修改,由于UI提供的属性配置有限,所以干脆直接修改源代码,供有需要的同学参考。

[color=red]lightning-1.8:[/color]
[b]1. 去掉任务前面的图标[/b]
C:\Users\***\AppData\Roaming\Thunderbird\Profiles\q6bxvxzw.default\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\chrome\calendar\skin\calendar\common\calendar-views.css
第24行到32行

.calendar-item-image[itemType="todo"] {
-moz-image-region: rect(0px 11px 11px 0px);
display: none;
}

.calendar-item-image[itemType="todo"][progress="completed"] {
-moz-image-region: rect(0px 22px 11px 11px);
display: none;
}

--------------------------------------------------------------------------
[color=red]gantt view-1.0.0.2:[/color]
[b]1. 修改任务条的高度[/b]
C:\Users\***\AppData\Roaming\Thunderbird\Profiles\q6bxvxzw.default\extensions\{1510928E-A4FA-43C2-A9AF-99E521B90BC5}\chrome\ganttview\skin\classic\ganttview\ganttview.css
第386行到422行
.GanttView-item-box
{
min-height : 1.4em; /* 26px; */
max-height : 1.4em; /* 26px; */
padding-bottom : 0px;
padding-right : 1px;
}


.GanttView-row-class,
.GanttView-item-header-box
{
min-height : 1.5em; /* 26px; */
max-height : 1.5em; /* 26px; */
padding-bottom : 0px;
border-bottom : 1px solid #D2D2D2;
}

.GanttView-item-box[showprogressbar="true"]
{
min-height : 1.6em; /* 26px; */
max-height : 1.6em; /* 26px; */
padding-bottom : 0px;
padding-right : 1px;
}


.GanttView-row-class[showprogressbar="true"],
.GanttView-item-header-box[showprogressbar="true"]
{
min-height : 2.4em; /* 26px; */
max-height : 2.4em; /* 26px; */
padding-bottom : 0px;
border-bottom : 1px solid #D2D2D2;
}


[b]2. 去掉日历左侧任务列表右边的时间[/b]
还是上面ganttview.css的526行到529行
GanttView-item-header-box .GanttView-item-date-box {
visibility: visible;
display: none;
}


[b]3.修改日历单元格宽度[/b]
还是上面ganttview.css的201行到210行
.GanttView-day-class,
.GanttView-day-header-class
{
background-color : #ffffff;
border-bottom : 1px solid #D2D2D2;
border-right: 1px solid #D2D2D2;
width: 40px;
}


[b]4. 修改任务排序为:按照开始时间倒序[/b]
C:\Users\***\AppData\Roaming\Thunderbird\Profiles\q6bxvxzw.default\extensions\{1510928E-A4FA-43C2-A9AF-99E521B90BC5}\modules\ganttview.jsm
第197行到220行
GanttView.compareItemBoxStart = function compareItemBoxStart(a, b) {
//Sort Items by StartDate, sort same startdate items by EndDate
if (a && b) {
var diff = a.itemBoxStartColIndex-b.itemBoxStartColIndex;
if (diff == 0) {
//sort by end date
var endDiff = a.itemBoxEndColIndex-b.itemBoxEndColIndex;

if (endDiff == 0) {
return 0;
} else if (endDiff<0) {
return 1;
} else {
return -1;
}
} else if (diff<0) {
return 1;
} else {
return -1;
}
} else {
return 0;
}
}


最终效果图:
[img]http://dl.iteye.com/upload/attachment/0077/8531/2c96e035-5015-3bbe-8689-ba388f5a713b.jpg[/img]

你可能感兴趣的:(Thunderbird + lightning + ganttview 修改源代码个性化订制)