Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Fixed a thumbnail "select as album thumbnail" bug
Browse files Browse the repository at this point in the history
… also caused by the update of React, just like the other edit bugs
  • Loading branch information
deanmoses committed Jan 2, 2018
1 parent 632880f commit 106ec8d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/scripts/components/album.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ class AlbumPage extends React.Component {
// If the admin updates the cache for this album, this triggers
// rerendering so that the new album info gets drawn.
album.on('change', function (model, val) {
console.log('Album has changed.');
this.setState({album: model});
}, this);
}
Expand Down Expand Up @@ -242,6 +241,10 @@ YearAlbumPage.propTypes = {
* Component that displays a week album (like 2014/12-31/)
*/
class WeekAlbumPage extends React.Component {
constructor() {
this.onThumbSelect = this.onThumbSelect.bind(this);
}

render() {
var a = this.props.album;
var user = this.props.user;
Expand Down
3 changes: 3 additions & 0 deletions app/scripts/components/site.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ Site.SearchButton = SearchButton;
* Wrapper around Bootstrap CSS icons
*/
class GlyphIcon extends React.Component {
constructor() {
this.click = this.click.bind(this);
}
render() {
return(
<span className={'glyphicon glyphicon-' + this.props.glyph} onClick={this.click}/>
Expand Down
4 changes: 4 additions & 0 deletions app/scripts/components/thumb.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Thumb.List = List;
* Component that displays a thumbnail of either an album or an image.
*/
class Nail extends React.Component {
constructor() {
this.onSelect = this.onSelect.bind(this);
}

render() {
var item = this.props.item;
if (!item) {
Expand Down

0 comments on commit 106ec8d

Please sign in to comment.