Bug 384726: avoid duplicate items, r=mickey
git-svn-id: svn://10.0.0.236/trunk@228308 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f9a943498b
commit
90cd0574e0
@ -188,6 +188,12 @@
|
||||
<method name="addTodo">
|
||||
<parameter name="aTodo"/>
|
||||
<body><![CDATA[
|
||||
for (var i=0; i < this.childNodes.length; i++) {
|
||||
var elem = this.childNodes[i];
|
||||
if (elem.todo.hasSameIds(aTodo)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
void("adding new todo " + aTodo.title + "\n");
|
||||
var newTodoElt = document.createElement("calendar-todo-item");
|
||||
newTodoElt.setAttribute("item-calendar", aTodo.calendar.uri.spec);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user