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 0687a4187f5a9b56dcd0347993dcf9d1cee45584..c4120842d269aa01d7dc5474b6e121794382664f 100644 |
| --- a/Tools/GardeningServer/scripts/ui/notifications.js |
| +++ b/Tools/GardeningServer/scripts/ui/notifications.js |
| @@ -50,15 +50,19 @@ ui.notifications.Notification = base.extends('li', { |
| this._what = this.appendChild(document.createElement('div')); |
| this._what.className = 'what'; |
| this._index = 0; |
| - $(this).hide().fadeIn('fast'); |
| + requestAnimationFrame(function() { |
| + this.animate([ |
| + {opacity: '0'}, |
| + {opacity: '1'}, |
| + ], 200); |
| + }.bind(this)); |
|
abarth-chromium
2014/06/30 04:26:03
What's the point of using requestAnimationFrame?
ojan
2014/06/30 04:49:59
It didn't work to do it synchronously. I didn't fe
|
| }, |
| dismiss: function() |
| { |
| - // FIXME: These fade in/out effects are lame. |
| - $(this).fadeOut(function() |
| - { |
| - this.parentNode && this.parentNode.removeChild(this); |
| - }); |
| + this.animate([ |
| + {opacity: '1'}, |
| + {opacity: '0'}, |
| + ], 200).onfinish = this.remove.bind(this); |
| }, |
| }); |
| @@ -73,7 +77,7 @@ ui.notifications.Info = base.extends(ui.notifications.Notification, { |
| }, |
| updateWithNode: function(node) |
| { |
| - $(this._what).empty(); |
| + this._what.innerHTML = ''; |
| this._what.appendChild(node); |
| } |
| }); |
| @@ -123,7 +127,7 @@ ui.notifications.SuspiciousCommit = base.extends(Cause, { |
| span.className = part; |
| if (linkFunction) { |
| - var parts = $.isArray(content) ? content : [content]; |
| + var parts = Array.isArray(content) ? content : [content]; |
| parts.forEach(function(item, index) { |
| if (index > 0) |
| span.appendChild(document.createTextNode(', ')); |
| @@ -170,7 +174,7 @@ ui.notifications.FailingTests = base.extends(ui.notifications.Failure, { |
| if (this.containsFailureAnalysis(failureAnalysis)) |
| return false; |
| this._testNameList.push(failureAnalysis.testName); |
| - $(this._effects).empty(); |
| + this._effects.innerHTML = ''; |
| this._forEachTestGroup(function(groupName, testNameList) { |
| this._effects.appendChild(new ui.notifications.FailingTestGroup(groupName, testNameList)) |
| }.bind(this)); |
| @@ -223,12 +227,13 @@ ui.notifications.BuildersFailing = base.extends(ui.notifications.Failure, { |
| }, |
| setFailingBuilders: function(failuresList) |
| { |
| - $(this._effects).empty().append(Object.keys(failuresList).map(function(builderName) { |
| + this._effects.innerHTML = ''; |
| + Object.keys(failuresList).map(function(builderName) { |
| var effect = document.createElement('li'); |
| effect.className = 'builder'; |
| effect.appendChild(new ui.failures.Builder(builderName, failuresList[builderName])); |
| - return effect; |
| - })); |
| + this._effects.appendChild(effect); |
| + }.bind(this)); |
| } |
| }); |