| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 --> | 5 --><html><head><link rel="import" href="ct-user-prefs.html"> |
| 6 | 6 |
| 7 <link rel="import" href="ct-user-prefs.html"> | 7 <dom-module id="ct-commit"> |
| 8 | 8 <style> |
| 9 <polymer-element name="ct-commit" attributes="data suspected" noscript> | |
| 10 <template> | |
| 11 <style> | |
| 12 :host { | 9 :host { |
| 13 display: flex; | 10 display: flex; |
| 14 align-items: flex-start; | 11 align-items: flex-start; |
| 15 } | 12 } |
| 16 :host > * { | 13 :host > * { |
| 17 flex-shrink: 0; | 14 flex-shrink: 0; |
| 18 } | 15 } |
| 19 a { | 16 a { |
| 20 padding: 5px; | 17 padding: 5px; |
| 21 margin-right: 5px; | 18 margin-right: 5px; |
| 22 border-radius: 4px; | 19 border-radius: 4px; |
| 23 } | 20 } |
| 24 div { | 21 div { |
| 25 flex: 1; | 22 flex: 1; |
| 26 padding-top: 5px; | 23 padding-top: 5px; |
| 27 } | 24 } |
| 28 .suspected-commit { | 25 .suspected-commit { |
| 29 color: red; | 26 color: red; |
| 30 font-weight: bold; | 27 font-weight: bold; |
| 31 } | 28 } |
| 32 :host(:hover) a { | 29 :host(:hover) a { |
| 33 background-color: #555; | 30 background-color: #555; |
| 34 color: white; | 31 color: white; |
| 35 } | 32 } |
| 36 :host(:hover) a.suspected-commit { | 33 :host(:hover) a.suspected-commit { |
| 37 background-color: #555; | 34 background-color: #555; |
| 38 color: red; | 35 color: red; |
| 39 } | 36 } |
| 40 </style> | 37 </style> |
| 38 <template> |
| 41 <ct-user-prefs id="userPrefs"></ct-user-prefs> | 39 <ct-user-prefs id="userPrefs"></ct-user-prefs> |
| 42 <template if="{{ suspected }}"> | 40 <template is="dom-if" if="{{ suspected }}"> |
| 43 <span class="suspected-commit">*</span><a class="suspected-commit" href="{
{ data.url }}">{{ data.revision }}</a> | 41 <span class="suspected-commit">*</span><a class="suspected-commit" href$="
{{ data.url }}">{{ data.revision }}</a> |
| 44 </template> | 42 </template> |
| 45 <template if="{{ !suspected }}"> | 43 <template is="dom-if" if="{{ !suspected }}"> |
| 46 <a target="{{ $.userPrefs.values.linkTarget }}" href="{{ data.url }}">{{ d
ata.revision }}</a> | 44 <a target="{{ $.userPrefs.values.linkTarget }}" href$="{{ data.url }}">{{
data.revision }}</a> |
| 47 </template> | 45 </template> |
| 48 <div>{{ data.summary }}<br><em>{{ data.author }}</em></div> | 46 <div>{{ data.summary }}<br><em>{{ data.author }}</em></div> |
| 49 </template> | 47 </template> |
| 50 </polymer-element> | 48 <script> |
| 49 Polymer({ |
| 50 is: 'ct-commit', |
| 51 properties: { |
| 52 data: { notify: true }, |
| 53 suspected: { notify: true } |
| 54 } |
| 55 }); |
| 56 </script> |
| 57 </dom-module> |
| OLD | NEW |