| <html> |
| <head> |
| <title>commit-detail-picker-sk demo</title> |
| <meta charset="utf-8"> |
| <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> |
| <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> |
| <script src="/res/common/js/common.js"></script> |
| <script src="/res/imp/bower_components/webcomponentsjs/webcomponents-lite.js"></script> |
| <link rel=import href="/res/imp/bower_components/polymer/polymer.html"> |
| <link rel=import href="commit-detail-picker.html"> |
| <style type="text/css" media="screen"> |
| body { |
| font-family:helvetica,arial,'bitstream vera sans',sans-serif; |
| } |
| |
| </style> |
| </head> |
| <body> |
| <h1>commits</h1> |
| |
| <commit-detail-picker-sk title="Choose a git commit." id=picker></commit-detail-picker-sk> |
| |
| <h3>event</h3> |
| <pre id=event></pre> |
| |
| <script type="text/javascript" charset="utf-8"> |
| var commitinfo = [ |
| { |
| author: "foo (foo@example.org)", |
| url: "skia.googlesource.com/foo/1", |
| message: "Commit from foo.", |
| ts: 1439649711, |
| }, |
| { |
| author: "bar (bar@example.org)", |
| url: "skia.googlesource.com/foo/2", |
| message: "Commit from bar.", |
| ts: 1439669711, |
| }, |
| ]; |
| $$$('#picker').setCommitDetail(commitinfo); |
| $$$('#picker').addEventListener('commit-selected', function(e) { |
| $$$('#event').textContent = JSON.stringify(e.detail, null, 2); |
| }); |
| </script> |
| |
| </body> |
| </html> |