Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1936)

Unified Diff: Tools/GardeningServer/ui/ct-last-updated.html

Issue 466783002: Hide last updated data until date is populated. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove "visible" property Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/test/ct-last-updated-tests.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/ct-last-updated.html
diff --git a/Tools/GardeningServer/ui/ct-last-updated.html b/Tools/GardeningServer/ui/ct-last-updated.html
index e2e832bd9ac494f9d80713f80b37ea2ed72125fa..388f766d75668b9568111237f4b884b5233119b1 100644
--- a/Tools/GardeningServer/ui/ct-last-updated.html
+++ b/Tools/GardeningServer/ui/ct-last-updated.html
@@ -6,12 +6,14 @@ found in the LICENSE file.
<polymer-element name="ct-last-updated" attributes="date">
<template>
- Updated {{ date | _deltaMinutes }} min ago @ {{ date | _hours }}:{{ date | _minutes }}
+ <template if="{{ date }}">
+ Updated {{ date | _deltaMinutes }} min ago @ {{ date | _hours }}:{{ date | _minutes }}
+ </template>
</template>
<script>
(function() {
Polymer({
- date: new Date(0),
+ date: null,
_deltaMinutes: function(date) {
return date.minutesAgo();
@@ -20,7 +22,10 @@ found in the LICENSE file.
return date.getHours();
},
_minutes: function(date) {
- return date.getMinutes();
+ var s = date.getMinutes().toString();
+ if (s.length == 1)
+ s = "0" + s;
+ return s;
},
});
})();
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/test/ct-last-updated-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698