Permalink
Browse files

fix delete bug - don't delete if they have been restored

  • Loading branch information...
anotherjesse committed Apr 21, 2008
1 parent 45f2316 commit ee5124fc2093f29fd7a14e6c6ae4508059133403
Showing with 7 additions and 3 deletions.
  1. +1 −1 chrome/content/calendar.js
  2. +6 −1 chrome/content/trash.js
  3. +0 −1 todo
@@ -137,7 +137,7 @@ function Calendar(container) {
var curDate = new Date(self.year, self.month, date);
if (!tr) {
- tr = document.createElement('tr');
+ tr = TR();
for (var i=0; i<curDate.getDay(); i++) {
tr.appendChild(TD({class: 'blank'}));
}
View
@@ -25,7 +25,12 @@ function Trash(container) {
deleteAll.onclick = function() {
for (var i in deleted) {
- controller.tabFinalDelete(deleted[i].tab, deleted[i].el);
+ // if parentNode doesn't exist, it has already been removed from page
+ // eg - it has been undeleted or deleted - but we don't keep deleted
+ // array up to date so we need to check.
+ if (deleted[i].el.parentNode) {
+ controller.tabFinalDelete(deleted[i].tab, deleted[i].el);
+ }
}
};
container.appendChild(deleteAll);
View
1 todo
@@ -33,4 +33,3 @@ This release:
unable to delete from mosaic
persist grid size on change
visual styling for grid size
- deleting all taboos will delete those restored during the same session!

0 comments on commit ee5124f

Please sign in to comment.