Skip to content

Commit

Permalink
addendum numbering correct. closes #18
Browse files Browse the repository at this point in the history
  • Loading branch information
owise1 committed Jun 16, 2016
1 parent d504826 commit 7824121
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions js/interface.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var currentExhibition, allExhibitions
var currentExhibition, allExhibitions, addendumCount

artAdder.getAllExhibitions()
.then(function (shows) {
Expand All @@ -16,7 +16,6 @@ $(function (){
artAdder.localGet('disableAutoUpdate')
.then(function (res){
var disableAutoUpdate = res.disableAutoUpdate || false
console.log(disableAutoUpdate)
$('input[name=autoUpdate]').attr('checked', !disableAutoUpdate)
})

Expand All @@ -31,6 +30,7 @@ function buildInterface(sources) {
$infoPages = $('#infoPages');
$infoPageTemplate = $('#infoPages .infoPage');
$('body').addClass('loading')
addendumCount = sources.filter(R.prop('addendum')).length

for(var i = 0; i < sources.length; i++) {
addModules(sources[i],i);
Expand Down Expand Up @@ -85,7 +85,7 @@ function buildInterface(sources) {

}

var addendumI = 1
var addendumI = 0
function addModules(show, i) {
var $square = $('ul#shows li.show').eq(i);
var description = show.description
Expand All @@ -99,7 +99,8 @@ function addModules(show, i) {
}
if (show.addendum) {
$square.addClass('addendum')
$square.find('.thumb .short-title').text('Addendum #' + addendumI++);
$square.find('.thumb .short-title').text('Addendum #' + (addendumCount - addendumI));
addendumI++
} else if (show.url) {
description += "\n\nEssay URL:\n" + show.url
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Add Art",
"description": "Replacing ads with art.",
"author" : "@owise1,Corey Tegeler",
"version": "2.2.8",
"version": "2.2.9",
"homepage_url" : "http://add-art.org/",
"icons": {
"16": "images/icon-16.png",
Expand Down

0 comments on commit 7824121

Please sign in to comment.