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 20, 2014
1 parent 8bcdd88 commit e4d905f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/html/assets/themes/fabrizio1.0/javascripts/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,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'];
Expand Down Expand Up @@ -255,12 +254,13 @@ var Gallery = (function($) {
});

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

Expand Down

0 comments on commit e4d905f

Please sign in to comment.