Skip to content

Commit

Permalink
Bug #1286 - Fix the date separator to be correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfiguiere committed Aug 17, 2014
1 parent 6d3a143 commit 4c9b9bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/html/assets/themes/fabrizio1.0/javascripts/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ var Gallery = (function($) {
var pinnedClass = !batchEmpty && OP.Batch.exists(item.id) ? 'pinned' : '';
var imageContainer = $('<div class="imageContainer photo-id-'+item.id+' '+pinnedClass+'"/>');

var d = new Date(item.dateTaken*1000);

var pathKey = 'path' + configuration['thumbnailSize'];
var defaultWidthValue = configuration['defaultWidthValue'];
var defaultHeightValue = configuration['defaultHeightValue'];
Expand Down Expand Up @@ -220,9 +218,10 @@ var Gallery = (function($) {
imageContainer.append(overflow);

// insert calendar icon
currentDate = d.getYear()+'-'+d.getMonth()+'-'+d.getDay();
var d = new Date(item.dateTakenYear, item.dateTakenMonth - 1, item.dateTakenDay);
currentDate = item.dateTakenYear + '-' + item.dateTakenMonth + '-' + item.dateTakenDay;
if(currentDate !== lastDate)
imageContainer.prepend(dateSeparator(item.dateTaken));
imageContainer.prepend(dateSeparator(d));
lastDate = currentDate;

/**
Expand Down

0 comments on commit 4c9b9bd

Please sign in to comment.