blob: cacae7fec69647577fdac453c3651abcea4355ef [file] [log] [blame]
<!-- The <commit-picker-sk> custom element declaration.
commit - A serialized types.Commit of the chosen commit. This is null if
no selection has been made.
repo - The URL of the underlying git repo. This assumes a
googlesource repo when deriving URLs from this value.
commit-selected - Event produced when a commit is selected. The event
detail contains:
description: "fixed lengh string descripting the commit",
hash: "1213982193 (the commit hash)",
selectHash - Forces the selection of the given hash.
setCommitInfo(commitinfo) - Where commitinfo is an array of objects of the form:
author: ""
commit_time: 1428574804
hash: "d9f8862ab6bed4195cbfe5dda48693e1062b01e2"
commits - The sk.Mailbox name to listen for the data to populate
the element. The mailbox data needs to be a serialized slice
of []*types.Commit. If not set then the data must be supplied
by the setCommitInfo method.
commit_time: 1439649751,
author: "reed (",
hash: "bb886749feb444edfd8fbf053a9ea815e3605f8a",
author: "reed (",
commit_time: 1439648914,
hash: "e02716908fe82c7c4ae9b415793277620a22bcd6",
Note that the hashes need to be in order, but not necessarily
contiguous. Note that they also need to be supplied in time ascending
order, that is, the commit at index 0 needs to be the oldest commit, and
the last commit in the array needs to be the newest commit.
<link rel="stylesheet" href="/res/common/css/md.css">
<link rel="import" href="commit-panel.html">
<link rel="import" href="/res/imp/bower_components/paper-dialog/paper-dialog.html">
<link rel="import" href="/res/imp/bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html">
<dom-module id="commit-picker-sk">
<button class=raised id=select><pre id=desc>Select a commit</pre></button>
<paper-dialog id=dialog>
<commits-panel-sk id=panel repo="[[repo]]" selection origin="[[origin]]"></commits-panel-sk>
<div class=buttons>
<button dialog-confirm>Close</button>
is: "commit-picker-sk",
properties: {
commit: {
type: Object,
value: null,
repo: {
type: String,
value: "",
notify: true
origin: {
type: Boolean,
value: false,
listeners: {
"select.tap": "_selectTap",
"panel.commit-selected": "_panelSelect",
selectHash: function(hash) {
setCommitInfo: function(commits) {
_selectTap: function() {
_panelSelect: function(e) {
this.$.desc.textContent = e.detail.description;
this.commit = e.detail.commit;