Bug 372830 - Integrate unifinder todo into lightning as it is in sunbird, r=dbo

This commit is contained in:
michael.buettner%sun.com 2007-09-10 17:04:10 +00:00
Родитель ffc13e07df
Коммит 586394ae4e
20 изменённых файлов: 992 добавлений и 384 удалений

Просмотреть файл

@ -639,8 +639,8 @@ var calendarManagerObserver = {
if (isSunbird()) {
refreshEventTree();
toDoUnifinderRefresh();
}
toDoUnifinderRefresh();
break;
case "calendar.timezone.local":
var subject = aSubject.QueryInterface(Ci.nsIPrefBranch2);
@ -656,8 +656,8 @@ var calendarManagerObserver = {
if (isSunbird()) {
refreshEventTree();
toDoUnifinderRefresh();
}
toDoUnifinderRefresh();
break;
default :
break;

Просмотреть файл

@ -0,0 +1,750 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is OEone Calendar Code, released October 31st, 2001.
*
* The Initial Developer of the Original Code is
* OEone Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Garth Smedley <garths@oeone.com>
* Mike Potter <mikep@oeone.com>
* Chris Charabaruk <coldacid@meldstar.com>
* Colin Phillips <colinp@oeone.com>
* ArentJan Banck <ajbanck@planet.nl>
* Curtis Jewell <csjewell@mail.freeshell.org>
* Eric Belhaire <eric.belhaire@ief.u-psud.fr>
* Mark Swaffer <swaff@fudo.org>
* Michael Buettner <michael.buettner@sun.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*-----------------------------------------------------------------
* U N I F I N D E R
*
* This is a hacked in interface to the unifinder. We will need to
* improve this to make it usable in general.
*/
var ToDoUnifinderTreeName = "unifinder-todo-tree";
var kStatusOrder = ["NEEDS-ACTION", "IN-PROCESS", "COMPLETED", "CANCELLED"];
var gTaskArray = new Array();
/**
* Observer for the calendar event data source. This keeps the unifinder
* display up to date when the calendar event data is changed
*/
var unifinderToDoDataSourceObserver =
{
mInBatch: false,
QueryInterface: function (aIID) {
if (!aIID.equals(Components.interfaces.nsISupports) &&
!aIID.equals(Components.interfaces.calICompositeObserver) &&
!aIID.equals(Components.interfaces.calIObserver))
{
throw Components.results.NS_ERROR_NO_INTERFACE;
}
return this;
},
// calIObserver:
onStartBatch: function() {
this.mInBatch = true;
},
onEndBatch: function() {
this.mInBatch = false;
toDoUnifinderRefresh();
},
onLoad: function() {
if (!this.mInBatch) {
toDoUnifinderRefresh();
}
},
onAddItem: function(aItem) {
if (aItem instanceof Components.interfaces.calITodo &&
!this.mInBatch)
{
toDoUnifinderRefresh();
}
},
onModifyItem: function(aNewItem, aOldItem) {
if ((aNewItem instanceof Components.interfaces.calITodo ||
aOldItem instanceof Components.interfaces.calITodo) &&
!this.mInBatch)
{
toDoUnifinderRefresh();
}
},
onDeleteItem: function(aDeletedItem) {
if (aDeletedItem instanceof Components.interfaces.calITodo &&
!this.mInBatch)
{
toDoUnifinderRefresh();
}
},
onError: function(aErrNo, aMessage) {},
// calICompositeObserver:
onCalendarAdded: function(aDeletedItem) {
if (!this.mInBatch)
toDoUnifinderRefresh();
},
onCalendarRemoved: function(aDeletedItem) {
if (!this.mInBatch)
toDoUnifinderRefresh();
},
onDefaultCalendarChanged: function(aNewDefaultCalendar) {}
};
/**
* Called when the calendar is loaded
*/
function prepareCalendarToDoUnifinder()
{
const kSUNBIRD_ID = "{718e30fb-e89b-41dd-9da7-e25a45638b28}";
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo);
if (appInfo.ID == kSUNBIRD_ID) {
document.getElementById("todo-label").removeAttribute("collapsed");
}
var ccalendar = getCompositeCalendar();
ccalendar.addObserver(unifinderToDoDataSourceObserver);
toDoUnifinderRefresh();
}
/**
* Called when the calendar is unloaded
*/
function finishCalendarToDoUnifinder()
{
var ccalendar = getCompositeCalendar();
ccalendar.removeObserver(unifinderToDoDataSourceObserver);
}
/**
* Helper function to display todo datetimes in the unifinder
*/
function formatUnifinderToDoDateTime(aDateTime)
{
var dateFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
.getService(Components.interfaces.calIDateTimeFormatter);
// datetime is from todo object, it is not a javascript date
if (aDateTime && aDateTime.isValid)
return dateFormatter.formatDateTime(aDateTime);
return "";
}
/**
* Called by event observers to update the display
*/
function toDoUnifinderRefresh()
{
var hideCompleted = document.getElementById("hide-completed-checkbox").checked;
var savedThis = this;
var refreshListener = {
mTaskArray: new Array(),
onOperationComplete: function (aCalendar, aStatus, aOperationType, aId, aDateTime) {
setTimeout(function () { refreshToDoTree (refreshListener.mTaskArray); }, 0);
},
onGetResult: function (aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
for (var i = 0; i < aCount; i++) {
refreshListener.mTaskArray.push(aItems[i]);
}
}
};
var ccalendar = getCompositeCalendar();
var filter = 0;
if (hideCompleted)
filter |= ccalendar.ITEM_FILTER_COMPLETED_NO;
else
filter |= ccalendar.ITEM_FILTER_COMPLETED_ALL;
filter |= ccalendar.ITEM_FILTER_TYPE_TODO;
ccalendar.getItems(filter, 0, null, null, refreshListener);
var deck = document.getElementById("view-deck");
for each (view in deck.childNodes) {
view.showCompleted = !hideCompleted;
}
var selectedDay = deck.selectedPanel.selectedDay;
if (selectedDay) {
deck.selectedPanel.goToDay(selectedDay);
}
}
function getToDoFromEvent( event )
{
var tree = document.getElementById( ToDoUnifinderTreeName );
var row = tree.treeBoxObject.getRowAt( event.clientX, event.clientY );
if( row != -1 && row < tree.view.rowCount )
{
return( tree.taskView.getCalendarTaskAtRow( row ) );
}
return false;
}
function getSelectedToDo()
{
var tree = document.getElementById( ToDoUnifinderTreeName );
// .toDo object sometimes isn't available?
return( tree.taskView.getCalendarTaskAtRow(tree.currentIndex) );
}
/**
* This is attached to the onclik attribute of the to do list shown in the unifinder
*/
function modifyToDoCommand( event )
{
// we only care about button 0 (left click) events
if (event.button != 0) return;
//open the edit todo dialog box
var ThisToDo = getToDoFromEvent( event );
if( ThisToDo )
modifyEventWithDialog(ThisToDo);
else
createTodoWithDialog();
}
/**
* Set the context menu on mousedown to change it before it is opened
*/
function unifinderMouseDownToDo( event )
{
var tree = document.getElementById( ToDoUnifinderTreeName );
var treechildren = tree.getElementsByTagName( "treechildren" )[0];
var ThisToDo = getToDoFromEvent( event );
if( ThisToDo )
{
// TODO HACK notifiers should be rewritten to integrate events and todos
document.getElementById( "delete_todo_command" ).removeAttribute( "disabled" );
} else
{
tree.view.selection.clearSelection();
// TODO HACK notifiers should be rewritten to integrate events and todos
document.getElementById( "delete_todo_command" ).setAttribute( "disabled", "true" );
}
}
function checkboxClick(thisTodo, completed)
{
var newTodo = thisTodo.clone().QueryInterface(Components.interfaces.calITodo);
newTodo.isCompleted = completed;
doTransaction('modify', newTodo, newTodo.calendar, thisTodo, null);
}
/*
This function return the progress state of a ToDo task :
completed, overdue, duetoday, inprogress, future
*/
function ToDoProgressAtom( aTodo )
{
var now = new Date();
if (aTodo.isCompleted)
return "completed";
if (aTodo.dueDate && aTodo.dueDate.isValid) {
if (aTodo.dueDate.jsDate.getTime() < now.getTime())
return "overdue";
else if (aTodo.dueDate.year == now.getFullYear() &&
aTodo.dueDate.month == now.getMonth() &&
aTodo.dueDate.day == now.getDate())
return "duetoday";
}
if (aTodo.entryDate && aTodo.entryDate.isValid &&
aTodo.entryDate.jsDate.getTime() < now.getTime())
return "inprogress";
return "future";
}
var toDoTreeView =
{
rowCount : gTaskArray.length,
selectedColumn : null,
sortDirection : null,
sortStartedTime : new Date().getTime(), // updated just before sort
isContainer : function(){return false;},
// By getCellProperties, the properties defined with
// treechildren:-moz-tree-cell-text in CSS are used.
// It is use here to color a particular row with a color
// given by the progress state of the ToDo task.
getCellProperties : function( row,column, props )
{
calendarToDo = gTaskArray[row];
var aserv=Components.classes["@mozilla.org/atom-service;1"].getService(Components.interfaces.nsIAtomService);
// Moz1.8 trees require column.id, moz1.7 and earlier trees use column.
if( (typeof(column)=="object" ? column.id : column) == "unifinder-todo-tree-col-priority" )
{
if(calendarToDo.priority > 0 && calendarToDo.priority < 5)
props.AppendElement(aserv.getAtom("highpriority"));
if(calendarToDo.priority > 5 && calendarToDo.priority < 10)
props.AppendElement(aserv.getAtom("lowpriority"));
}
props.AppendElement(aserv.getAtom(ToDoProgressAtom(calendarToDo)));
},
getColumnProperties : function(){return false;},
// By getRowProperties, the properties defined with
// treechildren:-moz-tree-row in CSS are used.
// It is used here to color the background of a selected
// ToDo task with a color
// given by the progress state of the ToDo task.
getRowProperties : function( row,props ){
calendarToDo = gTaskArray[row];
var aserv=Components.classes["@mozilla.org/atom-service;1"].getService(Components.interfaces.nsIAtomService);
props.AppendElement(aserv.getAtom(ToDoProgressAtom( calendarToDo )));
},
isSorted : function(){return false;},
isEditable : function(){return true;},
isSeparator : function(){return false;},
// Return the empty string in order
// to use moz-tree-image pseudoelement :
// it is mandatory to return "" and not false :-(
getImageSrc : function(){return("");},
cycleCell : function(row,col)
{
calendarToDo = gTaskArray[row];
if(!calendarToDo)
return;
// Moz1.8 trees require column.id, moz1.7 and earlier trees use column.
if (col.id == "unifinder-todo-tree-col-completed") {
if (calendarToDo.completedDate)
checkboxClick( calendarToDo, false ) ;
else
checkboxClick( calendarToDo, true ) ;
}
},
cycleHeader : function(col, element) // element parameter used in Moz1.7-
{ // not in Moz1.8+
var sortActive;
var treeCols;
// Moz1.8 trees require column.id, moz1.7 and earlier trees use column.
this.selectedColumn = (typeof(col)=="object" ? col.id : col);
if (!element) element = col.element; // in Moz1.8+, get element from col
sortActive = element.getAttribute("sortActive");
this.sortDirection = element.getAttribute("sortDirection");
if (sortActive != "true")
{
var taskList = document.getElementById("unifinder-todo-tree");
treeCols = taskList.getElementsByTagName("treecol");
for (var i = 0; i < treeCols.length; i++)
{
treeCols[i].removeAttribute("sortActive");
treeCols[i].removeAttribute("sortDirection");
}
sortActive = true;
this.sortDirection = "ascending";
}
else
{
sortActive = true;
if (this.sortDirection == "" || this.sortDirection == "descending")
{
this.sortDirection = "ascending";
}
else
{
this.sortDirection = "descending";
}
}
element.setAttribute("sortActive", sortActive);
element.setAttribute("sortDirection", this.sortDirection);
this.sortStartedTime = now(); // for null dates during sort
gTaskArray.sort( compareTasks );
document.getElementById( ToDoUnifinderTreeName ).view = this;
},
setTree : function( tree ){this.tree = tree;},
getCellText : function(row,column)
{
calendarToDo = gTaskArray[row];
if( !calendarToDo )
return false;
// Moz1.8 trees require column.id, moz1.7 and earlier trees use column.
switch( typeof(column)=="object" ? column.id : column )
{
case "unifinder-todo-tree-col-completed":
return( "" );
case "unifinder-todo-tree-col-priority":
return( "" );
case "unifinder-todo-tree-col-title":
// return title, or "Untitled" if empty/null
return calendarToDo.title || gCalendarBundle.getString( "eventUntitled" );
case "unifinder-todo-tree-col-startdate":
return( formatUnifinderToDoDateTime( calendarToDo.entryDate ) );
case "unifinder-todo-tree-col-duedate":
return( formatUnifinderToDoDateTime( calendarToDo.dueDate ) );
case "unifinder-todo-tree-col-completeddate":
return( formatUnifinderToDoDateTime( calendarToDo.completedDate ) );
case "unifinder-todo-tree-col-percentcomplete":
return( calendarToDo.percentComplete+"%" );
case "unifinder-todo-tree-col-categories":
return( calendarToDo.getProperty("CATEGORIES") );
case "unifinder-todo-tree-col-location":
return( calendarToDo.getProperty("LOCATION") );
case "unifinder-todo-tree-col-status":
return getToDoStatusString(calendarToDo);
case "unifinder-todo-tree-col-calendarname":
return( calendarToDo.calendar.name );
default:
return false;
}
}
}
function compareTasks( taskA, taskB )
{
var modifier = 1;
if (toDoTreeView.sortDirection == "descending")
{
modifier = -1;
}
switch(toDoTreeView.selectedColumn)
{
case "unifinder-todo-tree-col-priority": // 0-9
// No priority set (0) sorts before high priority (1).
return compareNumber(taskA.priority, taskB.priority) * modifier;
case "unifinder-todo-tree-col-title":
return compareString(taskA.title, taskB.title) * modifier;
case "unifinder-todo-tree-col-startdate":
return compareDate(taskA.entryDate, taskB.entryDate) * modifier;
case "unifinder-todo-tree-col-duedate":
return compareDate(taskA.dueDate, taskB.dueDate) * modifier;
case "unifinder-todo-tree-col-completed": // checkbox if date exists
case "unifinder-todo-tree-col-completeddate":
return compareDate(taskA.completedDate, taskB.completedDate) * modifier;
case "unifinder-todo-tree-col-percentcomplete":
return compareNumber(taskA.percentComplete, taskB.percentComplete) * modifier;
case "unifinder-todo-tree-col-categories":
return compareString(taskA.getProperty("CATEGORIES"), taskB.getProperty("CATEGORIES")) * modifier;
case "unifinder-todo-tree-col-location":
return compareString(taskA.getProperty("LOCATION"), taskB.getProperty("LOCATION")) * modifier;
case "unifinder-todo-tree-col-status":
return compareNumber(kStatusOrder.indexOf(taskA.status), kStatusOrder.indexOf(taskB.status)) * modifier;
case "unifinder-todo-tree-col-calendarname":
return compareString(taskA.calendar.name, taskB.calendar.name) * modifier;
default:
return 0;
}
}
function compareString(a, b) {
a = nullToEmpty(a);
b = nullToEmpty(b);
return ((a < b) ? -1 :
(a > b) ? 1 : 0);
}
function nullToEmpty(value) {
return value == null? "" : value;
}
function compareNumber(a, b) {
// Number converts a date to msecs since 1970, and converts a null to 0.
a = Number(a);
b = Number(b);
return ((a < b) ? -1 : // avoid underflow problems of subtraction
(a > b) ? 1 : 0);
}
// Takes two calDateTimes
function compareDate(a, b) {
if (!a)
a = toDoTreeView.sortStartedTime;
if (!b)
b = toDoTreeView.sortStartedTime;
return (a.compare(b));
}
function calendarTaskView( taskArray )
{
this.contextTask = null;
this.taskArray = taskArray;
}
calendarTaskView.prototype.getCalendarTaskAtRow = function( i )
{
return( gTaskArray[ i ] );
}
calendarTaskView.prototype.getRowOfCalendarTask = function( Task )
{
if (!Task) {
return null;
}
for (var i in gTaskArray) {
if (gTaskArray[i].hashId == Task.hashId)
return i;
}
return null;
}
/**
* Redraw the categories unifinder tree
*/
function refreshToDoTree( taskArray )
{
if( taskArray === false )
taskArray = getTaskTable();
gTaskArray = taskArray;
toDoTreeView.rowCount = gTaskArray.length;
var ArrayOfTreeCols = document.getElementById( ToDoUnifinderTreeName ).getElementsByTagName( "treecol" );
for( var i = 0; i < ArrayOfTreeCols.length; i++ )
{
if( ArrayOfTreeCols[i].getAttribute( "sortActive" ) == "true" )
{
toDoTreeView.selectedColumn = ArrayOfTreeCols[i].getAttribute( "id" );
toDoTreeView.sortDirection = ArrayOfTreeCols[i].getAttribute("sortDirection");
toDoTreeView.sortStartedTime = now(); //for null/0 dates
gTaskArray.sort(compareTasks);
break;
}
}
document.getElementById( ToDoUnifinderTreeName ).view = toDoTreeView;
document.getElementById( ToDoUnifinderTreeName ).taskView = new calendarTaskView( gTaskArray );
}
function getTaskTable( )
{
return gTaskArray;
}
function contextChangeProgress( event, Progress )
{
var tree = document.getElementById( ToDoUnifinderTreeName );
var start = new Object();
var end = new Object();
var numRanges = tree.view.selection.getRangeCount();
var toDoItem;
if(numRanges == 0)
return;
startBatchTransaction();
for (var t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (var v = start.value; v <= end.value; v++) {
toDoItem = tree.taskView.getCalendarTaskAtRow( v );
var newItem = toDoItem.clone().QueryInterface( Components.interfaces.calITodo );
newItem.percentComplete = Progress;
switch (Progress) {
case 0:
newItem.isCompleted = false;
break;
case 100:
newItem.isCompleted = true;
break;
default:
newItem.status = "IN-PROCESS";
newItem.completedDate = null;
break;
}
doTransaction('modify', newItem, newItem.calendar, toDoItem, null);
}
}
endBatchTransaction();
}
function contextChangePriority( event, Priority )
{
var tree = document.getElementById( ToDoUnifinderTreeName );
var start = new Object();
var end = new Object();
var numRanges = tree.view.selection.getRangeCount();
var toDoItem;
if(numRanges == 0)
return;
startBatchTransaction();
for (var t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (var v = start.value; v <= end.value; v++) {
toDoItem = tree.taskView.getCalendarTaskAtRow( v );
var newItem = toDoItem.clone().QueryInterface( Components.interfaces.calITodo );
newItem.priority = Priority;
doTransaction('modify', newItem, newItem.calendar, toDoItem, null);
}
}
endBatchTransaction();
}
function modifyTaskFromContext() {
var task = document.getElementById( ToDoUnifinderTreeName ).taskView.contextTask;
if(task)
modifyEventWithDialog(task);
}
function changeContextMenuForToDo(event)
{
if (event.target.id != "taskitem-context-menu")
return;
var toDoItem = getToDoFromEvent(event);
// If only one task is selected, enable 'Edit Task'
var tree = document.getElementById(ToDoUnifinderTreeName);
var start = new Object();
var end = new Object();
var numRanges = tree.view.selection.getRangeCount();
tree.view.selection.getRangeAt(0, start, end);
if (numRanges == 1 && (start.value == end.value) && toDoItem) {
document.getElementById("task-context-menu-modify")
.removeAttribute("disabled");
tree.taskView.contextTask = toDoItem;
}
else {
document.getElementById("task-context-menu-modify")
.setAttribute("disabled", true);
tree.taskView.contextTask = null;
}
// make progress and priority popup menu visible
document.getElementById("is_editable").removeAttribute("hidden");
// enable/disable progress and priority popup menus
if (toDoItem)
{
document.getElementById("is_editable").removeAttribute("disabled");
var liveList = document.getElementById("taskitem-context-menu")
.getElementsByAttribute("checked", "true");
// Delete in reverse order. Moz1.8+ getElementsByAttribute list is
// 'live', so when attribute is deleted the indexes of later elements
// change, but Moz1.7- is not. Reversed order works with both.
for (var i = liveList.length - 1; i >= 0; i-- )
{
liveList.item(i).removeAttribute("checked");
}
if (document.getElementById("percent-"+toDoItem.percentComplete+"-menuitem"))
{
document.getElementById("percent-"+toDoItem.percentComplete+"-menuitem")
.setAttribute("checked", "true");
}
if (document.getElementById("priority-"+toDoItem.priority+"-menuitem"))
{
document.getElementById("priority-"+toDoItem.priority+"-menuitem")
.setAttribute("checked", "true");
}
} else {
document.getElementById("is_editable").setAttribute("disabled", "true");
}
}
function editToDo(task) {
if (!task)
return;
modifyEventWithDialog(getOccurrenceOrParent(task));
}
/**
* Delete the current selected item with focus from the ToDo unifinder list
*/
function deleteToDoCommand(aDoNotConfirm)
{
var selectedItems = new Array();
var tree = document.getElementById( ToDoUnifinderTreeName );
var start = new Object();
var end = new Object();
var numRanges = tree.view.selection.getRangeCount();
var t;
var v;
var toDoItem;
for (t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (v = start.value; v <= end.value; v++) {
toDoItem = tree.taskView.getCalendarTaskAtRow( v );
selectedItems.push( toDoItem );
}
}
calendarViewController.deleteOccurrences(selectedItems.length,
selectedItems,
false,
aDoNotConfirm);
tree.view.selection.clearSelection();
}
function toggleCompletedTasks() {
const kSUNBIRD_ID = "{718e30fb-e89b-41dd-9da7-e25a45638b28}";
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo);
if (appInfo.ID != kSUNBIRD_ID) {
agendaTreeView.refreshCalendarQuery();
}
toDoUnifinderRefresh();
}

Просмотреть файл

@ -0,0 +1,210 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Lightning code.
-
- The Initial Developer of the Original Code is Oracle Corporation
- Portions created by the Initial Developer are Copyright (C) 2005
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Mike Shaver <shaver@mozilla.org>
- Simon Paquet <bugzilla@babylonsounds.com>
- Robin Edrenius <robin.edrenius@gmail.com>
- Michael Buettner <michael.buettner@sun.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay [
<!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/calendar.dtd" > %dtd2;
<!ENTITY % dtd3 SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd"> %dtd3;
]>
<?xml-stylesheet href="chrome://calendar/skin/calendar-unifinder-todo.css" type="text/css"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://calendar/content/calendar-unifinder-todo.js"/>
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<popupset id="calendar-popupset">
<!-- TASK ITEM CONTEXT MENU -->
<popup id="taskitem-context-menu" onpopupshowing="changeContextMenuForToDo( event );">
<menuitem label="&calendar.context.newtodo.label;"
accesskey="&calendar.context.newtodo.accesskey;"
id="task-context-menu-new"
observes="calendar_new_todo_command"/>
<menuitem id="task-context-menu-modify"
label="&calendar.context.modifytask.label;"
accesskey="&calendar.context.modifytask.accesskey;"
oncommand="modifyTaskFromContext()"/>
<menuitem label="&calendar.context.deletetask.label;"
accesskey="&calendar.context.deletetask.accesskey;"
id="task-context-menu-delete"
observes="delete_todo_command"/>
<menu label="&calendar.context.progress.label;"
accesskey="&calendar.context.progress.accesskey;"
id="task-context-menu-progress"
observes="is_editable">
<menupopup>
<menuitem type="checkbox"
id="percent-0-menuitem"
label="&progress.level.0;"
accesskey="&progress.level.0.accesskey;"
oncommand="contextChangeProgress( event, 0 );"/>
<menuitem type="checkbox"
id="percent-25-menuitem"
label="&progress.level.25;"
accesskey="&progress.level.25.accesskey;"
oncommand="contextChangeProgress( event, 25 );"/>
<menuitem type="checkbox"
id="percent-50-menuitem"
label="&progress.level.50;"
accesskey="&progress.level.50.accesskey;"
oncommand="contextChangeProgress( event, 50 );"/>
<menuitem type="checkbox"
id="percent-75-menuitem"
label="&progress.level.75;"
accesskey="&progress.level.75.accesskey;"
oncommand="contextChangeProgress( event, 75 );"/>
<menuitem type="checkbox"
id="percent-100-menuitem"
label="&progress.level.100;"
accesskey="&progress.level.100.accesskey;"
oncommand="contextChangeProgress( event, 100 );"/>
</menupopup>
</menu>
<menu label="&calendar.context.priority.label;"
accesskey="&calendar.context.priority.accesskey;"
id="task-context-menu-priority"
observes="is_editable">
<menupopup>
<menuitem type="checkbox"
id="priority-0-menuitem"
label="&priority.level.none;"
accesskey="&priority.level.none.accesskey;"
oncommand="contextChangePriority( event, 0 );"/>
<menuitem type="checkbox"
id="priority-9-menuitem"
label="&priority.level.low;"
accesskey="&priority.level.low.accesskey;"
oncommand="contextChangePriority( event, 9 );"/>
<menuitem type="checkbox"
id="priority-5-menuitem"
label="&priority.level.medium;"
accesskey="&priority.level.medium.accesskey;"
oncommand="contextChangePriority( event, 5 );"/>
<menuitem type="checkbox"
id="priority-1-menuitem"
label="&priority.level.high;"
accesskey="&priority.level.high.accesskey;"
oncommand="contextChangePriority( event, 1 );"/>
</menupopup>
</menu>
</popup>
</popupset>
<vbox id="todo-tab-panel" persist="height,collapsed" flex="1">
<box id="todo-label" align="left" collapsed="true">
<label flex="1" crop="end" style="font-weight: bold" value="&calendar.unifinder.todoitems.label;"/>
</box>
<box align="center">
<checkbox id="hide-completed-checkbox"
label="&calendar.unifinder.hidecompletedtodos.label;"
flex="1"
crop="end"
oncommand="toggleCompletedTasks();"
persist="checked"/>
</box>
<tree id="unifinder-todo-tree" flex="1" enableColumnDrag="false"
ondblclick="modifyToDoCommand( event )"
context="taskitem-context-menu">
<treecols id="unifinder-todo-tree-cols">
<treecol id="unifinder-todo-tree-col-completed"
persist="hidden ordinal width sortDirection sortActive" width="18" cycler="true"
label="&calendar.unifinder.tree.done.label;">
<image id="checkboximg" />
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-priority"
persist="hidden ordinal width sortDirection sortActive" width="18"
label="&calendar.unifinder.tree.priority.label;">
<image id="priorityimg"/>
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-title"
persist="hidden ordinal width sortDirection sortActive" flex="1"
label="&calendar.unifinder.tree.title.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-startdate"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.startdate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-duedate"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.duedate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-completeddate"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.completeddate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-percentcomplete"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.percentcomplete.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-categories"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.categories.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-location"
persist="hidden ordinal width sortDirection sortActive"
flex="1"
hidden="true"
label="&calendar.unifinder.tree.location.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-status"
persist="hidden ordinal width sortDirection sortActive"
flex="1"
hidden="true"
label="&calendar.unifinder.tree.status.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-calendarname"
persist="hidden ordinal width sortDirection sortActive"
flex="1"
hidden="true"
label="&calendar.unifinder.tree.calendarname.label;"/>
</treecols>
<treechildren tooltip="taskTreeTooltip"
onmousedown="unifinderMouseDownToDo( event )"/>
</tree>
</vbox>
</overlay>

Просмотреть файл

@ -24,6 +24,8 @@ calendar.jar:
content/calendar/calendar-item-editing.js (content/calendar-item-editing.js)
content/calendar/calendar-month-view.xml (content/calendar-month-view.xml)
content/calendar/calendar-multiday-view.xml (content/calendar-multiday-view.xml)
* content/calendar/calendar-unifinder-todo.xul (content/calendar-unifinder-todo.xul)
content/calendar/calendar-unifinder-todo.js (content/calendar-unifinder-todo.js)
content/calendar/calendar-summary-dialog.js (content/calendar-summary-dialog.js)
content/calendar/calendar-summary-dialog.xul (content/calendar-summary-dialog.xul)
* content/calendar/today-pane.xul (content/today-pane.xul)
@ -75,6 +77,7 @@ calendar.jar:
#expand skin/classic/calendar/calendar-toolbar.css (themes/__THEME__/calendar-toolbar.css)
#expand skin/classic/calendar/today-pane.css (themes/__THEME__/today-pane.css)
#expand skin/classic/calendar/calendar-event-dialog.css (themes/__THEME__/calendar-event-dialog.css)
#expand skin/classic/calendar/calendar-unifinder-todo.css (themes/__THEME__/calendar-unifinder-todo.css)
#expand skin/classic/calendar/calendar-views.css (themes/__THEME__/calendar-views.css)
#expand skin/classic/calendar/toolbar-large.png (themes/__THEME__/toolbar-large.png)
#expand skin/classic/calendar/toolbar-small.png (themes/__THEME__/toolbar-small.png)

Просмотреть файл

@ -12,7 +12,7 @@ overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar
overlay chrome://messenger/content/preferences/preferences.xul chrome://calendar/content/preferences/views.xul
overlay chrome://messenger/content/mailWindowOverlay.xul chrome://lightning/content/messenger-overlay-toolbar.xul
overlay chrome://global/content/customizeToolbar.xul chrome://lightning/content/customize-toolbar.xul
overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://lightning/content/todo-list-overlay.xul
overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://calendar/content/calendar-unifinder-todo.xul
overlay chrome://lightning/content/lightning-standalone.xul chrome://lightning/content/messenger-overlay-sidebar.xul
overlay chrome://global/content/customizeToolbar.xul chrome://lightning/content/toolkit-overlay-custombar.xul
skin lightning classic/1.0 jar:chrome/lightning.jar!/skin/classic/lightning/

Просмотреть файл

@ -414,10 +414,10 @@ agendaTreeView.refreshCalendarQuery =
function refreshCalendarQuery()
{
var filter = this.calendar.ITEM_FILTER_CLASS_OCCURRENCES;
if (document.getElementById("completed-tasks-checkbox").checked) {
filter |= this.calendar.ITEM_FILTER_COMPLETED_ALL;
} else {
if (document.getElementById("hide-completed-checkbox").checked) {
filter |= this.calendar.ITEM_FILTER_COMPLETED_NO;
} else {
filter |= this.calendar.ITEM_FILTER_COMPLETED_ALL;
}
if (!this.filterType)
@ -507,8 +507,8 @@ function observer_onAddItem(item)
}
if (isToDo(item)) {
var showCompleted = document.getElementById("completed-tasks-checkbox").checked;
if (item.isCompleted && !showCompleted) {
var hideCompleted = document.getElementById("hide-completed-checkbox").checked;
if (item.isCompleted && hideCompleted) {
return;
}
}
@ -541,8 +541,8 @@ function observer_onModifyItem(newItem, oldItem)
this.onDeleteItem(oldItem, "no-rebuild");
if (isToDo(newItem)) {
var showCompleted = document.getElementById("completed-tasks-checkbox").checked;
if (newItem.isCompleted && !showCompleted) {
var hideCompleted = document.getElementById("hide-completed-checkbox").checked;
if (newItem.isCompleted && hideCompleted) {
return;
}
}

Просмотреть файл

@ -392,6 +392,8 @@ function ltnOnLoad(event)
document.getElementById("displayDeck")
.addEventListener("dayselect", observeViewDaySelect, false);
prepareCalendarToDoUnifinder();
// Make sure we update ourselves if the program stays open over midnight
scheduleMidnightUpdate(refreshUIBits);
@ -479,7 +481,7 @@ function showCalendarView(type)
var tasksMenu = document.getElementById("ltn-tasks-in-view")
view.tasksInView = (tasksMenu.getAttribute("checked") == 'true');
view.showCompleted = document.getElementById("completed-tasks-checkbox").checked;
view.showCompleted = !document.getElementById("hide-completed-checkbox").checked;
view.rotated = (rotated.getAttribute("checked") == 'true');
}
@ -588,6 +590,8 @@ function LtnObserveDisplayDeckChange(event)
function ltnFinish() {
getCompositeCalendar().removeObserver(agendaTreeView.calendarObserver);
finishCalendarToDoUnifinder();
unloadCalendarManager();
}

Просмотреть файл

@ -174,6 +174,9 @@
</menubar>
<window id="messengerWindow">
<broadcasterset id="calendar_broadcasters">
<broadcaster id="is_editable" hidden="false"/>
</broadcasterset>
<commandset id="calendar_commands">
<command id="calendar_new_event_command" oncommand="createEventWithDialog(getSelectedCalendar());"/>
<command id="calendar_new_todo_command" oncommand="createTodoWithDialog(getSelectedCalendar());"/>
@ -194,6 +197,9 @@
<command id="multiweek-view-command" oncommand="showCalendarView('multiweek')"/>
<command id="month-view-command" oncommand="showCalendarView('month')"/>
<command id="calendar-delete-command" oncommand="ltnDeleteSelectedItem()" disabledwhennoeventsselected="true"/>
<command id="calendar_new_todo_command" oncommand="createTodoWithDialog(getSelectedCalendar());"/>
<command id="modify_todo_command" oncommand="editToDo()"/>
<command id="delete_todo_command" oncommand="deleteToDoCommand()" disabled="true"/>
</commandset>
<keyset>

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -12,10 +12,6 @@ lightning.jar:
content/lightning/lightning-migration.xul (content/lightning-migration.xul)
content/lightning/messenger-overlay-toolbar.js (content/messenger-overlay-toolbar.js)
content/lightning/messenger-overlay-toolbar.xul (content/messenger-overlay-toolbar.xul)
content/lightning/todo-list-overlay.xul (content/todo-list-overlay.xul)
content/lightning/todo-list.js (content/todo-list.js)
content/lightning/calendar-todo-list.css (content/calendar-todo-list.css)
content/lightning/calendar-todo-list.xml (content/calendar-todo-list.xml)
content/lightning/toolkit-overlay-custombar.xul (content/toolkit-overlay-custombar.xul)
content/lightning/imip-bar-overlay.xul (content/imip-bar-overlay.xul)
content/lightning/imip-bar.js (content/imip-bar.js)
@ -69,6 +65,11 @@ calendar.jar:
#expand skin/classic/calendar/datetimepickers/right-arrow.gif (/calendar/resources/skin/classic/datetimepickers/right-arrow.gif)
#expand skin/classic/calendar/pageupdown.png (/calendar/sunbird/themes/__THEME__/sunbird/pageupdown.png)
#expand skin/classic/calendar/prevnextarrow.png (/calendar/sunbird/themes/__THEME__/sunbird/prevnextarrow.png)
skin/classic/calendar/unifinder/checkbox_checked.png (skin/classic/unifinder/checkbox_checked.png)
skin/classic/calendar/unifinder/checkbox_unchecked.png (skin/classic/unifinder/checkbox_unchecked.png)
skin/classic/calendar/unifinder/priority_header.png (/calendar/resources/skin/classic/unifinder/priority_header.png)
skin/classic/calendar/unifinder/priority_high.png (/calendar/resources/skin/classic/unifinder/priority_high.png)
skin/classic/calendar/unifinder/priority_low.png (/calendar/resources/skin/classic/unifinder/priority_low.png)
calendar-en-US.jar:
locale/en-US/calendar/global.dtd (/calendar/locales/en-US/chrome/calendar/global.dtd)

Просмотреть файл

@ -249,34 +249,6 @@ function calendarFinish()
unloadCalendarManager();
}
/**
* Delete the current selected item with focus from the ToDo unifinder list
*/
function deleteToDoCommand(aDoNotConfirm)
{
var selectedItems = new Array();
var tree = document.getElementById( ToDoUnifinderTreeName );
var start = new Object();
var end = new Object();
var numRanges = tree.view.selection.getRangeCount();
var t;
var v;
var toDoItem;
for (t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (v = start.value; v <= end.value; v++) {
toDoItem = tree.taskView.getCalendarTaskAtRow( v );
selectedItems.push( toDoItem );
}
}
calendarViewController.deleteOccurrences(selectedItems.length,
selectedItems,
false,
aDoNotConfirm);
tree.view.selection.clearSelection();
}
function goFindNewCalendars()
{
//launch the browser to http://www.apple.com/ical/library/

Просмотреть файл

Просмотреть файл

@ -21,7 +21,6 @@ calendar.jar:
content/calendar/publishDialog.js (content/publishDialog.js)
content/calendar/publishDialog.xul (content/publishDialog.xul)
content/calendar/unifinder.js (content/unifinder.js)
content/calendar/unifinderToDo.js (content/unifinderToDo.js)
content/calendar/mouseoverPreviews.js (content/mouseoverPreviews.js)
content/calendar/converters/date-time.xsl (content/converters/date-time.xsl)
content/calendar/converters/ecsJune.xsl (content/converters/ecsJune.xsl)

Просмотреть файл

@ -72,7 +72,7 @@
<script type="application/x-javascript" src="chrome://calendar/content/calendarWindow.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/mouseoverPreviews.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/unifinder.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/unifinderToDo.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendar-unifinder-todo.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendar-views.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/migration.js"/>
<script type="application/x-javascript" src="chrome://calendar/content/calendar-dnd-listener.js"/>

Просмотреть файл

@ -58,6 +58,7 @@
<!-- Overlays -->
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://calendar/content/calendar-calendars-list.xul"?>
<?xul-overlay href="chrome://calendar/content/calendar-unifinder-todo.xul"?>
<!-- All DTD information is stored in a separate file so that it can be shared by
hiddenWindow.xul. -->
@ -154,81 +155,6 @@
observes="toggle_tasks_in_view"/>
</popup>
<!-- TASK ITEM CONTEXT MENU -->
<popup id="taskitem-context-menu" onpopupshowing="changeContextMenuForToDo( event );">
<menuitem label="&calendar.context.newtodo.label;"
accesskey="&calendar.context.newtodo.accesskey;"
id="task-context-menu-new"
observes="calendar_new_todo_command"/>
<menuitem id="task-context-menu-modify"
label="&calendar.context.modifytask.label;"
accesskey="&calendar.context.modifytask.accesskey;"
oncommand="modifyTaskFromContext()"/>
<menuitem label="&calendar.context.deletetask.label;"
accesskey="&calendar.context.deletetask.accesskey;"
id="task-context-menu-delete"
observes="delete_todo_command"/>
<menu label="&calendar.context.progress.label;"
accesskey="&calendar.context.progress.accesskey;"
id="task-context-menu-progress"
observes="is_editable">
<menupopup>
<menuitem type="checkbox"
id="percent-0-menuitem"
label="&progress.level.0;"
accesskey="&progress.level.0.accesskey;"
oncommand="contextChangeProgress( event, 0 );"/>
<menuitem type="checkbox"
id="percent-25-menuitem"
label="&progress.level.25;"
accesskey="&progress.level.25.accesskey;"
oncommand="contextChangeProgress( event, 25 );"/>
<menuitem type="checkbox"
id="percent-50-menuitem"
label="&progress.level.50;"
accesskey="&progress.level.50.accesskey;"
oncommand="contextChangeProgress( event, 50 );"/>
<menuitem type="checkbox"
id="percent-75-menuitem"
label="&progress.level.75;"
accesskey="&progress.level.75.accesskey;"
oncommand="contextChangeProgress( event, 75 );"/>
<menuitem type="checkbox"
id="percent-100-menuitem"
label="&progress.level.100;"
accesskey="&progress.level.100.accesskey;"
oncommand="contextChangeProgress( event, 100 );"/>
</menupopup>
</menu>
<menu label="&calendar.context.priority.label;"
accesskey="&calendar.context.priority.accesskey;"
id="task-context-menu-priority"
observes="is_editable">
<menupopup>
<menuitem type="checkbox"
id="priority-0-menuitem"
label="&priority.level.none;"
accesskey="&priority.level.none.accesskey;"
oncommand="contextChangePriority( event, 0 );"/>
<menuitem type="checkbox"
id="priority-9-menuitem"
label="&priority.level.low;"
accesskey="&priority.level.low.accesskey;"
oncommand="contextChangePriority( event, 9 );"/>
<menuitem type="checkbox"
id="priority-5-menuitem"
label="&priority.level.medium;"
accesskey="&priority.level.medium.accesskey;"
oncommand="contextChangePriority( event, 5 );"/>
<menuitem type="checkbox"
id="priority-1-menuitem"
label="&priority.level.high;"
accesskey="&priority.level.high.accesskey;"
oncommand="contextChangePriority( event, 1 );"/>
</menupopup>
</menu>
</popup>
<!-- CALENDAR LIST CONTEXT MENU -->
<popup id="calendarlist-context-menu" onpopupshowing="checkCalListTarget()">
<menuitem label="&calendar.context.newserver.label;"
@ -474,86 +400,7 @@
<splitter id="calendar-todo-splitter" collapse="before"
persist="state,collapsed" orient="vertical"/>
<vbox id="taskBox" persist="height,collapsed" flex="1">
<box align="left">
<label flex="1" crop="end" style="font-weight: bold" value="&calendar.unifinder.todoitems.label;"/>
</box>
<box align="center">
<checkbox id="hide-completed-checkbox"
label="&calendar.unifinder.hidecompletedtodos.label;"
flex="1"
crop="end"
oncommand="toDoUnifinderRefresh( event )"
persist="checked"/>
</box>
<tree id="unifinder-todo-tree" flex="1" enableColumnDrag="false"
ondblclick="modifyToDoCommand( event )"
context="taskitem-context-menu">
<treecols id="unifinder-todo-tree-cols">
<treecol id="unifinder-todo-tree-col-completed"
persist="hidden ordinal width sortDirection sortActive" width="18" cycler="true"
label="&calendar.unifinder.tree.done.label;">
<image id="checkboximg" />
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-priority"
persist="hidden ordinal width sortDirection sortActive" width="18"
label="&calendar.unifinder.tree.priority.label;">
<image id="priorityimg"/>
</treecol>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-title"
persist="hidden ordinal width sortDirection sortActive" flex="1"
label="&calendar.unifinder.tree.title.label;" />
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-startdate"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.startdate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-duedate"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.duedate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-completeddate"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.completeddate.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-percentcomplete"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.percentcomplete.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-categories"
persist="hidden ordinal width sortDirection sortActive"
hidden="true"
flex="1" label="&calendar.unifinder.tree.categories.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-location"
persist="hidden ordinal width sortDirection sortActive"
flex="1"
hidden="true"
label="&calendar.unifinder.tree.location.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-status"
persist="hidden ordinal width sortDirection sortActive"
flex="1"
hidden="true"
label="&calendar.unifinder.tree.status.label;"/>
<splitter class="tree-splitter"/>
<treecol id="unifinder-todo-tree-col-calendarname"
persist="hidden ordinal width sortDirection sortActive"
flex="1"
hidden="true"
label="&calendar.unifinder.tree.calendarname.label;"/>
</treecols>
<treechildren tooltip="taskTreeTooltip"
onmousedown="unifinderMouseDownToDo( event )"/>
</tree>
</vbox>
<vbox id="todo-tab-panel" persist="height,collapsed" flex="1"/>
</vbox>
<splitter id="calendar-splitter" collapse="before" persist="state"

Просмотреть файл

@ -622,98 +622,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
-moz-box-align : start;
}
/* TO DO ITEMS */
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(inprogress) {
color: green;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(inprogress,selected) {
background-color: green;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(overdue) {
color: red;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(overdue,selected) {
background-color: red;
}
#unifinder-todo-tree > treechildren::-moz-tree-row {
border-bottom: 1px dotted #AAA;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(duetoday) {
color: blue;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(duetoday,selected) {
background-color: blue;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(future) {
color: gray;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(future,selected) {
background-color: gray;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(completed) {
text-decoration: line-through;
color: black;
}
/* TO DO LIST IMAGES */
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, completed),
#unifinder-todo-tree-col-completed {
list-style-image: url("chrome://calendar/skin/unifinder/checkbox_checked.png");
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, duetoday),
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, overdue),
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, future),
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, inprogress) {
list-style-image: url("chrome://calendar/skin/unifinder/checkbox_unchecked.png");
}
#unifinder-todo-tree-col-priority {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_header.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-priority, mediumpriority) {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_header.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-priority, highpriority) {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_high.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-priority, lowpriority) {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_low.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(selected) {
color: HighlightText;
}
.todo-due-image-class
{
list-style-image : url( "chrome://calendar/skin/unifinder/priority_header.png" )
}
.todo-due-image-class[highpriority="true"]
{
list-style-image : url( "chrome://calendar/skin/unifinder/priority_high.png" )
}
.todo-due-image-class[lowpriority="true"]
{
list-style-image : url( "chrome://calendar/skin/unifinder/priority_low.png" )
}
/*--------------------------------------------------------------------
* Unifinder
*-------------------------------------------------------------------*/

Просмотреть файл

@ -766,98 +766,6 @@ toolbar[iconsize="small"] #navigator-throbber[busy="true"] {
-moz-box-align : start;
}
/* TO DO ITEMS */
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(inprogress) {
color: green;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(inprogress,selected) {
background-color: green;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(overdue) {
color: red;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(overdue,selected) {
background-color: red;
}
#unifinder-todo-tree > treechildren::-moz-tree-row {
border-bottom: 1px dotted #AAA;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(duetoday) {
color: blue;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(duetoday,selected) {
background-color: blue;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(future) {
color: gray;
}
#unifinder-todo-tree > treechildren::-moz-tree-row(future,selected) {
background-color: gray;
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(completed) {
text-decoration: line-through;
color: black;
}
/* TO DO LIST IMAGES */
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, completed),
#unifinder-todo-tree-col-completed {
list-style-image : url("chrome://calendar/skin/unifinder/checkbox_checked.png");
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, duetoday),
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, overdue),
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, future),
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-completed, inprogress) {
list-style-image: url("chrome://calendar/skin/unifinder/checkbox_unchecked.png");
}
#unifinder-todo-tree-col-priority {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_header.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-priority, mediumpriority) {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_header.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-priority, highpriority) {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_high.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-image(unifinder-todo-tree-col-priority, lowpriority) {
list-style-image: url( "chrome://calendar/skin/unifinder/priority_low.png" )
}
#unifinder-todo-tree > treechildren::-moz-tree-cell-text(selected) {
color: HighlightText;
}
.todo-due-image-class
{
list-style-image : url( "chrome://calendar/skin/unifinder/priority_header.png" )
}
.todo-due-image-class[highpriority="true"]
{
list-style-image : url( "chrome://calendar/skin/unifinder/priority_high.png" )
}
.todo-due-image-class[lowpriority="true"]
{
list-style-image : url( "chrome://calendar/skin/unifinder/priority_low.png" )
}
/*--------------------------------------------------------------------
* Unifinder
*-------------------------------------------------------------------*/