Chromium Code Reviews| Index: Tools/GardeningServer/scripts/ui/notifications.js |
| diff --git a/Tools/GardeningServer/scripts/ui/notifications.js b/Tools/GardeningServer/scripts/ui/notifications.js |
| index 466b7b587e56cb071a174b69c092a2e6f1a13499..459a87d033c28cebf65d48ef4d65f78a490d6855 100644 |
| --- a/Tools/GardeningServer/scripts/ui/notifications.js |
| +++ b/Tools/GardeningServer/scripts/ui/notifications.js |
| @@ -37,14 +37,7 @@ ui.notifications.Stream = base.extends('ol', { |
| }, |
| add: function(notification) |
| { |
| - var insertBefore = null; |
| - Array.prototype.some.call(this.children, function(existingNotification) { |
| - if (existingNotification.index() < notification.index()) { |
| - insertBefore = existingNotification; |
| - return true; |
| - } |
| - }); |
| - this.insertBefore(notification, insertBefore); |
| + this.appendChild(notification); |
|
ojan
2014/06/14 18:42:11
Now that Notification doesn't have index, we would
|
| return notification; |
| } |
| }); |
| @@ -59,14 +52,6 @@ ui.notifications.Notification = base.extends('li', { |
| this._index = 0; |
| $(this).hide().fadeIn('fast'); |
| }, |
| - index: function() |
| - { |
| - return this._index; |
| - }, |
| - setIndex: function(index) |
| - { |
| - this._index = index; |
| - }, |
| dismiss: function() |
| { |
| // FIXME: These fade in/out effects are lame. |
| @@ -136,7 +121,7 @@ ui.notifications.SuspiciousCommit = base.extends(Cause, { |
| var span = this._details.appendChild(document.createElement('span')); |
| span.className = part; |
| - |
| + |
| if (linkFunction) { |
| var parts = $.isArray(content) ? content : [content]; |
| parts.forEach(function(item, index) { |
| @@ -155,7 +140,6 @@ ui.notifications.SuspiciousCommit = base.extends(Cause, { |
| ui.notifications.Failure = base.extends(ui.notifications.Notification, { |
| init: function() |
| { |
| - this._time = this._how.appendChild(new ui.RelativeTime()); |
| this._problem = this._what.appendChild(document.createElement('div')); |
| this._problem.className = 'problem'; |
| this._effects = this._problem.appendChild(document.createElement('ul')); |
| @@ -163,10 +147,6 @@ ui.notifications.Failure = base.extends(ui.notifications.Notification, { |
| this._causes = this._what.appendChild(document.createElement('ul')); |
| this._causes.className = 'causes'; |
| }, |
| - date: function() |
| - { |
| - return this._time.date; |
| - } |
| }); |
| ui.notifications.FailingTests = base.extends(ui.notifications.Failure, { |
| @@ -246,11 +226,6 @@ ui.notifications.FailingTestsSummary = base.extends(ui.notifications.FailingTest |
| { |
| if (this._commitDataPinned) |
| return null; |
| - var commitDataDate = new Date(commitData.time); |
| - if (this._time.date > commitDataDate); { |
|
ojan
2014/06/14 18:42:11
This looks like non-dead code, but we never call s
|
| - this.setIndex(commitDataDate.getTime()); |
| - this._time.setDate(commitDataDate); |
| - } |
| return this._causes.appendChild(new ui.notifications.SuspiciousCommit(commitData)); |
| } |
| }); |