Drop year on calendar
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
5d9d169310
commit
6349c84136
@ -229,8 +229,16 @@
|
|||||||
<iron-pages id="pages" attr-for-selected="id" selected="[[mode]]">
|
<iron-pages id="pages" attr-for-selected="id" selected="[[mode]]">
|
||||||
<div id="time"><div>... time slider ...</div></div>
|
<div id="time"><div>... time slider ...</div></div>
|
||||||
<div id="memories" class="flex layout vertical center">
|
<div id="memories" class="flex layout vertical center">
|
||||||
<calendar-element date="{{date}}"></calendar-element>
|
<div>Pick a date on the calendar to look back in time and see photos from that day.</div>
|
||||||
<div>[[date]]</div>
|
<calendar-element
|
||||||
|
id="calendar"
|
||||||
|
min="2016-01-01"
|
||||||
|
max="2016-12-31"
|
||||||
|
date="{{date}}"></calendar-element>
|
||||||
|
<div>[[memoryDate]]</div>
|
||||||
|
<div hidden$="[[!thumbnails.length]]">
|
||||||
|
<div><b>[[thumbnails.length]]</b> photos taken across <b>[[years.length]]</b> years.</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="albums" class="flex layout vertical">
|
<div id="albums" class="flex layout vertical">
|
||||||
<template is="dom-repeat" items="[[breadcrumb(path)]]">
|
<template is="dom-repeat" items="[[breadcrumb(path)]]">
|
||||||
@ -324,7 +332,7 @@
|
|||||||
},
|
},
|
||||||
date: {
|
date: {
|
||||||
type: String,
|
type: String,
|
||||||
value: window.moment().format("YYYY-MM-DD")
|
value: "2016-" + window.moment().format("MM-DD")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -346,6 +354,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
dateChanged: function(date) {
|
dateChanged: function(date) {
|
||||||
|
this.years = [];
|
||||||
this.pendingPhotos = [];
|
this.pendingPhotos = [];
|
||||||
this.visibleThumbs = [];
|
this.visibleThumbs = [];
|
||||||
this.thumbnails = [];
|
this.thumbnails = [];
|
||||||
@ -781,6 +790,7 @@
|
|||||||
|
|
||||||
Polymer.dom(thumbnails).appendChild(thumbnail);
|
Polymer.dom(thumbnails).appendChild(thumbnail);
|
||||||
this.thumbnails.push(thumbnail);
|
this.thumbnails.push(thumbnail);
|
||||||
|
this.notifyPath("thumbnails.length");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the viewport is at the bottom when it finishes processing, trigger to load more. */
|
/* If the viewport is at the bottom when it finishes processing, trigger to load more. */
|
||||||
@ -930,6 +940,9 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
ready: function() {
|
ready: function() {
|
||||||
|
this.$.calendar.partsHidden = {
|
||||||
|
"year": true
|
||||||
|
};
|
||||||
window.addEventListener("hashchange", function(event) {
|
window.addEventListener("hashchange", function(event) {
|
||||||
this.hash = event.newURL.replace(/^[^#]*/, "");
|
this.hash = event.newURL.replace(/^[^#]*/, "");
|
||||||
}.bind(this), false);
|
}.bind(this), false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user