From b37ccad2b9b96ff1b26477265072a0fc0d565094 Mon Sep 17 00:00:00 2001 From: djcp Date: Wed, 25 Apr 2012 21:28:19 -0400 Subject: [PATCH] Look and feel. . --- index.html | 4 +++- javascripts/covered.js | 30 +++++++++++++++++------------- stylesheets/covered.css | 10 ++++++++-- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index b9eed9b..2e009fe 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ + Add Term
-
+
@@ -30,5 +30,7 @@
+ + diff --git a/javascripts/covered.js b/javascripts/covered.js index 69562d1..3743f67 100644 --- a/javascripts/covered.js +++ b/javascripts/covered.js @@ -30,25 +30,28 @@ $.extend({ var node = $('
').attr({class: 'doc ' + d['dpla.contributor'], id: 'doc-' + d['dpla.id']}); var nodeContent = ''; - if(typeof(d['dpla.isbn']) === 'object'){ - var isbn = d['dpla.isbn'][0].split('%%')[0]; - nodeContent += ''; - }else if(typeof(d['dpla.isbn'] == 'string')){ - nodeContent += ''; - } - if(d['dpla.content_link']){ nodeContent += ''; } - nodeContent += '' + ( (d['dpla.title']) ? $.ellipsisSubstr(d['dpla.title']) : 'Untitled Work' ) + ''; + nodeContent += '

' + ( (d['dpla.title']) ? $.ellipsisSubstr(d['dpla.title']) : 'Untitled Work' ).replace(/\\|\//g,'') + '

'; if(d['dpla.content_link']){ nodeContent += '
'; } + + nodeContent += $.insertOpenLibraryCover(d); + nodeContent += '' + ((typeof(d['dpla.date']) === 'object') ? d['dpla.date'][0] : d['dpla.date']) + ''; nodeContent += '
' + d['dpla.contributor'] + ''; facets[d['dpla.contributor']] = (facets[d['dpla.contributor']] == undefined) ? 1 : (facets[d['dpla.contributor']] + 1); return node.append(nodeContent).data('d',d); }, - + + insertOpenLibraryCover: function(d){ + var output = ''; + var isbn = ((typeof(d['dpla.isbn']) === 'object') ? d['dpla.isbn'][0].split('%%')[0] : d['dpla.isbn']); + output += ''; + return output; + }, + relatedEditions: function(doc,isbn){ $.getJSON('http://xisbn.worldcat.org/webservices/xid/isbn/' + isbn + '?method=getEditionsa&format=json&fl=*&callback=?') .done(function(data){ @@ -156,6 +159,7 @@ $(document).ready(function(){ $('.searchable_term sup').live({ click: function(){ $(this).closest('.searchable_term').remove(); + $('#submit').click(); } }); @@ -203,7 +207,7 @@ $(document).ready(function(){ $('#target').html(''); $('#target').isotope('destroy'); $('#facets').html(''); - $('#meta').html(''); + $('.meta_inf').html(''); }, complete: function(){ $('#submit').val('go!'); @@ -228,13 +232,13 @@ $(document).ready(function(){ var limit = parseInt(json.limit); var num_found = parseInt(json.num_found); - $('#meta').append((start + 1) + ' to ' + ((num_found < (start + limit)) ? num_found : (start + limit) )+ ' of ' + num_found + ' found'); + $('.meta_inf').append((start + 1) + ' to ' + ((num_found < (start + limit)) ? num_found : (start + limit) )+ ' of ' + num_found + ' found'); if(start != 0){ - $('#meta').prepend($('').attr('data_pagination_start',start - limit).html('« Previous')); + $('.meta_inf').prepend($('').attr('data_pagination_start',start - limit).html('« Previous')); } if((start + limit) < num_found){ - $('#meta').append($('').attr('data_pagination_start',start + limit).html('Next »')); + $('.meta_inf').append($('').attr('data_pagination_start',start + limit).html('Next »')); } } diff --git a/stylesheets/covered.css b/stylesheets/covered.css index 8e59d27..fe09577 100644 --- a/stylesheets/covered.css +++ b/stylesheets/covered.css @@ -64,11 +64,17 @@ input, select{ color: blue; } -#meta{ +.meta_inf{ text-align: center; margin-left: 1em; } +.footer.meta_inf{ + margin: 10px 0px 20px 0px; + padding-top: 10px; + border-top: 2px dotted #ccc; +} + .paginate{ color: red; } @@ -128,7 +134,6 @@ input, select{ .doc .data_source{ font-size: 10px; - margin-left: 1em; } .doc .cover{ @@ -137,5 +142,6 @@ input, select{ } .doc .title{ + margin-top: 0px; font-weight: bold; }