# HG changeset patch # User veltr # Date 1381765146 -7200 # Node ID c4c2f3be5ddda08e79408b5121cd671e6d35ea04 # Parent f6c662a079cdfe983ebc1eda9fd2bae466513a70 Fixes for 2013.10.14 meeting diff -r f6c662a079cd -r c4c2f3be5ddd data/extra-years.csv --- a/data/extra-years.csv Fri Oct 11 18:04:02 2013 +0200 +++ b/data/extra-years.csv Mon Oct 14 17:39:06 2013 +0200 @@ -1,4 +1,4 @@ -term_label;Ressource DbPedia;start_year;end_year +term_label;dbpedia_uri;start_year;end_year ;http://fr.dbpedia.org/resource/19e_si%C3%A8cle;1801;1900 ;http://fr.dbpedia.org/resource/18e_si%C3%A8cle;1701;1800 ;http://fr.dbpedia.org/resource/17e_si%C3%A8cle;1601;1700 @@ -119,3 +119,17 @@ Wanli;http://fr.dbpedia.org/resource/Ming_Wanli;1572;1620 XXIIIe dynastie;;-818;-715 XXIXe dynastie;;-398;-380 +;http://fr.dbpedia.org/resource/Alexandre_le_Grand;-356;-323 +;http://fr.dbpedia.org/resource/Constantin_Ier_%28empereur_romain%29;306;337 +;http://fr.dbpedia.org/resource/Lucien_Bonaparte;1775;1840 +;http://fr.dbpedia.org/page/Fran%C3%A7ois-Antoine_de_Boissy_d%27Anglas;1756;1826 +;http://fr.dbpedia.org/resource/Hyks%C3%B4s;-1674;-1548 +;http://fr.dbpedia.org/page/Jean-Baptiste_de_Belloy;1709;1808 +;http://fr.dbpedia.org/resource/P%C3%A9pin_le_Bref;715;768 +;http://fr.dbpedia.org/resource/M%C3%A9rov%C3%A9e;412;455 +;http://fr.dbpedia.org/resource/Clovis_Ier;466;511 +;http://fr.dbpedia.org/resource/S%C3%A9leucos_VI;-96;-93 +;http://fr.dbpedia.org/resource/Cyrus_II;-559;-529 +;http://fr.dbpedia.org/resource/Horace;-65;-8 +;http://fr.dbpedia.org/resource/Virgile;-70;-19 +;http://fr.dbpedia.org/resource/Confucius;-551;-479 diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/models/data.py --- a/src/jocondelab/models/data.py Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/models/data.py Mon Oct 14 17:39:06 2013 +0200 @@ -52,7 +52,7 @@ app_label = 'jocondelab' def __unicode__(self): - return u'%s: %d - %d'%(self.term.dbpedia_uri, self.start_year, self.end_year) + return u'%s: %d - %d'%(self.term.label, self.start_year, self.end_year) class DbpediaGeo(models.Model): term = models.ForeignKey(Term, unique=True, blank=False, null=False, db_index=True, related_name="geo") @@ -63,7 +63,7 @@ app_label = 'jocondelab' def __unicode__(self): - return u'%s: %.4f%s, %.4f%s'%(self.term.dbpedia_uri, abs(self.latitude), 'N' if self.latitude > 0 else 'S', abs(self.longitude), 'E' if self.longitude > 0 else 'W') + return u'%s: %.4f%s, %.4f%s'%(self.term.label, abs(self.latitude), 'N' if self.latitude > 0 else 'S', abs(self.longitude), 'E' if self.longitude > 0 else 'W') class NoticeYears(models.Model): notice = models.ForeignKey(Notice, unique=True, blank=False, null=False, db_index=True, related_name="years") diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/css/front-common.css --- a/src/jocondelab/static/jocondelab/css/front-common.css Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/front-common.css Mon Oct 14 17:39:06 2013 +0200 @@ -117,11 +117,11 @@ font-family: 'OpenSans'; font-size: 10px; overflow-x: hidden; } -.header-wrapper, .menus-wrapper, .main-wrapper, .language-menu-wrapper { +.header-wrapper, .menu-wrapper, .main-wrapper { padding: 0 10px; clear: both; } -.language-menu-wrapper { +.menu-wrapper { background: #ffffff; } @@ -129,11 +129,11 @@ background: url('../img/background-pinstripe-blue.png'); } -.menus-wrapper { - background: #ffffff; box-shadow: 0 2px 4px #666666; +.main-menu-wrapper, .header-wrapper { + box-shadow: 0 2px 2px #cccccc; } -header, .main, footer, .menu-list, .language-menu { +header, .main, footer, .menu-list { margin: 0 auto; max-width: 960px; clear: both; } @@ -175,7 +175,7 @@ } .header-widgets { - float: right; + display: none; float: right; } html[dir=rtl] .header-widgets { @@ -202,10 +202,6 @@ font-weight: 800; } -.header-widgets { - padding: 5px 0; -} - /* HEADER > SEARCH FORM */ .search-input, .search-form .tagit { @@ -302,10 +298,6 @@ background-position: -28px -26px; } -.language-menu-link { - display: none; -} - /* MENUS */ @@ -314,7 +306,7 @@ } .menu-list { - width: 100%; font-size: 13px; padding: 8px 0; line-height: 2em; text-align: right; + width: 100%; font-size: 13px; padding: 5px 0; line-height: 2em; text-align: right; } .menu-item { @@ -333,10 +325,6 @@ display: none; } -.main-menu { - display: none; -} - /* DBPEDIA OVERLAY */ .dbpedia-overlay { @@ -425,7 +413,7 @@ } .notice-contents h2 { - font-size: 15px; margin-bottom: 6px; line-height: 1.1em; + font-size: 13px; margin-bottom: 6px; line-height: 1.1em; } .notice-title { @@ -433,12 +421,28 @@ } .notice-thesaurus { - font-size: 13px; margin-bottom: 6px; + font-size: 12px; margin-bottom: 6px; } .notice-term { - display: inline-block; padding: 3px; background: #d0e0f0; - border-radius: 3px; margin: 0 5px 2px 0; + display: inline-block; background: #d0e0f0; + border-radius: 3px; +} + +.notice-metadata .notice-term { + padding: 2px; margin: 0 4px 2px 0; +} + +.notice-datasheet .notice-term { + font-size: 13px; padding: 3px; margin: -2px 5px 4px 0; +} + +.notice-term.term-untranslated { + background: transparent; padding: 0; +} + +.notice-label { + display: inline-block; font-style: italic; } .notice-term:hover { @@ -535,12 +539,20 @@ @media screen and (max-width: 540px) { - .language-menu-link { - display: table-cell; + .header-widgets { + display: block; } - .language-menu { + .menu-list { display: none; } } + +@media screen and (min-width: 540px) { + + .menu-list { + display: block !important; + } + +} diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/css/front-geo.css --- a/src/jocondelab/static/jocondelab/css/front-geo.css Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/front-geo.css Mon Oct 14 17:39:06 2013 +0200 @@ -1,5 +1,5 @@ .map-container { - position: relative; width: 100%; height: 460px; margin-top: 10px; + position: relative; width: 100%; height: 460px; margin-top: 15px; } #map { diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/css/front-home.css --- a/src/jocondelab/static/jocondelab/css/front-home.css Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/front-home.css Mon Oct 14 17:39:06 2013 +0200 @@ -1,5 +1,5 @@ .about-jl { - font-size: 18px; font-weight: bold; margin: 20px 0; + font-size: 18px; font-weight: bold; margin: 15px 0; } .module-list { diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/css/front-notice.css --- a/src/jocondelab/static/jocondelab/css/front-notice.css Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/front-notice.css Mon Oct 14 17:39:06 2013 +0200 @@ -75,14 +75,6 @@ padding-top: 10px; } -.notice-term { - margin: -2px 5px 4px 0; -} - -.notice-term.term-untranslated { - background: transparent; padding: 0; -} - .notice-term.term-untranslated:after { content: " ;"; } diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/css/front-termlist.css --- a/src/jocondelab/static/jocondelab/css/front-termlist.css Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/front-termlist.css Mon Oct 14 17:39:06 2013 +0200 @@ -9,7 +9,7 @@ } .term-tabs { - width: 100%; clear: both; height: 41px; margin-top: 20px; + width: 100%; clear: both; height: 41px; margin-top: 15px; } .term-tab { diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/css/front-timeline.css --- a/src/jocondelab/static/jocondelab/css/front-timeline.css Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/css/front-timeline.css Mon Oct 14 17:39:06 2013 +0200 @@ -1,5 +1,5 @@ .timeline-section-title { - font-size: 16px; font-weight: bold; margin: 10px 0 0; padding: 5px 10px; background: #ffffff; + font-size: 16px; font-weight: bold; margin: 15px 0 0; padding: 5px 10px; background: #ffffff; border-width: 1px; border-color: #cccccc; border-style: solid solid none; border-radius: 10px 10px 0 0; display: inline-block; } @@ -21,7 +21,7 @@ } .timeline-canvas { - width: 100%; height: 100%; background: #ffffff; + width: 100%; height: 100%; } .timeline-list { diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/js/front-common.js --- a/src/jocondelab/static/jocondelab/js/front-common.js Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/js/front-common.js Mon Oct 14 17:39:06 2013 +0200 @@ -333,7 +333,7 @@ $nc.css({ left: isleft ? "0" : "", right: isleft ? "" : "0", - width: isfull ? nw : (nw + 260), + width: isfull ? nw : (nw + 250), "margin-top": ((gridsize - nh) / 3 - 10) + "px", "margin-left": isleft ? ((gridsize - nw) / 2 - 10) + "px" : 0, "margin-right": isleft ? 0 : ((gridsize - nw) / 2 - 10) + "px" @@ -514,34 +514,13 @@ }).scroll(recentreDbpediaBox); $overlayImg.load(recentreDbpediaBox); - - var hideTo, $mm = $(".main-menu"); - - function hideMenu() { - clearTimeout(hideTo); - hideTo = setTimeout(function() { - $mm.stop(true).slideUp(); - }, 3000); - } - function showMenu(selector) { - clearTimeout(hideTo); - $mm.stop(true).slideDown(); - } - $(".main-menu-link").mouseenter(showMenu).mouseleave(hideMenu).click(function() { - $mm.stop(true).slideToggle(); - return false; - }); - - $mm.mouseover(showMenu).mouseout(hideMenu); - + $(".language-menu-link").click(function() { $(".language-menu").slideToggle(); }); - $(".language-menu a").click(function() { - $(".language-input").val($(this).attr("data-language-code")); - $(".language-form").submit(); - return false; + $(".main-menu-link").click(function() { + $(".main-menu").slideToggle(); }); }); diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/js/front-notice.js --- a/src/jocondelab/static/jocondelab/js/front-notice.js Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/js/front-notice.js Mon Oct 14 17:39:06 2013 +0200 @@ -295,10 +295,5 @@ }); return false; }); - - $(".back-button").click(function() { - window.history.back(); - return false; - }); }); diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/static/jocondelab/js/front-timeline.js --- a/src/jocondelab/static/jocondelab/js/front-timeline.js Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/static/jocondelab/js/front-timeline.js Mon Oct 14 17:39:06 2013 +0200 @@ -169,8 +169,8 @@ var itemTpl = _.template( '
  • "' - + ' data-dbpedia-uri="<%- item.dbpedia_uri %>" style="left: <%- left %>px; width: <%- width %>px;">' - + '
    <%- item.label %>
  • ' + + ' data-dbpedia-uri="<%- dbpedia_uri %>" style="left: <%- left %>px; width: <%- width %>px;">' + + '
    <%- label %>
    ' ); function redrawView() { @@ -240,7 +240,7 @@ /* Now displaying the different terms that we will show on the timeline */ var html = _(tlCache).chain() .filter(function(item) { // Only show those within the range - return (item.end_year >= fromYear && item.start_year <= toYear); + return (item.end_year >= fromYear && item.start_year <= toYear && item.label); }).first(itemCount) // Take the first 12 .sortBy(function(item) { // Sort by mean year return (item.start_year + item.end_year); @@ -249,7 +249,8 @@ r = Math.min(cWidth, Math.max(0, yrToX(item.end_year + 1))); return itemTpl({ current: (item.dbpedia_uri == currentTerm), - item: item, + dbpedia_uri: item.dbpedia_uri, + label: (item.label.length > 24) ? item.label.substr(0,20) + '…' : item.label, left: Math.min(l,r), width: Math.abs(r-l) }); diff -r f6c662a079cd -r c4c2f3be5ddd src/jocondelab/templates/jocondelab/front_base.html --- a/src/jocondelab/templates/jocondelab/front_base.html Fri Oct 11 18:04:02 2013 +0200 +++ b/src/jocondelab/templates/jocondelab/front_base.html Mon Oct 14 17:39:06 2013 +0200 @@ -42,7 +42,7 @@ {% block body %} -
    +