`
joeblow
  • 浏览: 176176 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

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

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

lightning-1.8:
1. 去掉任务前面的图标
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;
}

--------------------------------------------------------------------------
gantt view-1.0.0.2:
1. 修改任务条的高度
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;
}


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


3.修改日历单元格宽度
还是上面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;
}


4. 修改任务排序为:按照开始时间倒序
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;
  }
}


最终效果图:

















  • 大小: 101.5 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics