# HG changeset patch # User Chloe Laisne # Date 1467544390 -7200 # Node ID c174124d1849252e3fcc139646912326eb8c0f19 # Parent 82878d132784c7f77e0023563b7e387bee77fb43 /discours and /chrono design changes Playlist-component error when no items returned diff -r 82878d132784 -r c174124d1849 cms/app-client/app/components/discourses-component.js --- a/cms/app-client/app/components/discourses-component.js Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/components/discourses-component.js Sun Jul 03 13:13:10 2016 +0200 @@ -14,9 +14,8 @@ didRender: function() { var self = this; var baseURL = env.baseURL.replace(/\/$/,"")+'/api/v1'; - + d3.json(baseURL + "/discourses", function(discourses) { - var width = self.$().parent().width(); var height = self.$().parent().height() - self.$().siblings().height(); @@ -31,7 +30,6 @@ var caption = element.append("div") .attr("class", "caption"); - var caption_nodes = caption.selectAll(".node") .data(bubbles); @@ -46,7 +44,6 @@ .on('click', function(d) { self.get('filter').set('discourse', d.id); }); - item.append("span") .text(function(d) { return d.name; }) .style("display", function(d) { return d.children ? 'none' : 'inline-block'; }) @@ -61,7 +58,6 @@ var svg_nodes = svg.selectAll(".node") .data(bubbles); - svg_nodes.enter().append("g") .attr("class", function(d) { return "node" + (!d.children ? " leaf" : ""); }) .attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); @@ -74,8 +70,7 @@ leaf.append("circle") .attr("r", function(d) { return Math.max(7.5 + d.r * 2, d.r * 2); }) .attr("fill", function(d) { return d.fill; }) - .attr("stroke", function() { return "#13212d"; }); - + .attr("stroke", function() { return "#859097"; }); element.style("height", height + "px"); }); diff -r 82878d132784 -r c174124d1849 cms/app-client/app/components/playlist-component.js --- a/cms/app-client/app/components/playlist-component.js Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/components/playlist-component.js Sun Jul 03 13:13:10 2016 +0200 @@ -38,8 +38,9 @@ this.get('player').set('items', this.get('documents').map(function(document) { return document.get('id'); })); - - this.get('player').set('item', this.get('player').get('items')[0]); + if(this.get('player').get('items').length) { + this.get('player').set('item', this.get('player').get('items')[0]); + } }).on('init'), init: function() { diff -r 82878d132784 -r c174124d1849 cms/app-client/app/helpers/if-and.js --- a/cms/app-client/app/helpers/if-and.js Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/helpers/if-and.js Sun Jul 03 13:13:10 2016 +0200 @@ -1,7 +1,7 @@ import Ember from 'ember'; export function ifAnd(params) { - return params[0] && params[1]; + return params.every(element => element === true); } export default Ember.Helper.helper(ifAnd); diff -r 82878d132784 -r c174124d1849 cms/app-client/app/styles/app.scss --- a/cms/app-client/app/styles/app.scss Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/styles/app.scss Sun Jul 03 13:13:10 2016 +0200 @@ -37,24 +37,25 @@ } h2 { - color: #ffffff; text-transform: uppercase; - font-size: 14px; text-align: center; } -body.tabs-discours h2 { - color: #59626b; -} - .corpus-app-container { color: #687a84; box-sizing: border-box; + background-color: #becfd4; +} + +.corpus-app-container h2 { + padding: 15px; + font-size: 13px; + color: #253946; } body.tabs-discours .corpus-app-container, body.tabs-chrono .corpus-app-container { - padding: 20px; + padding: 0px 20px; } body.tabs-thematiques .corpus-app-container { @@ -65,12 +66,6 @@ padding: 0px; } -body.tabs-carto .corpus-app-container, -body.tabs-chrono .corpus-app-container, -body.tabs-thematiques .corpus-app-container { - background-color: #becfd4; -} - .corpus-app-wrapper { background-color: #253946; box-shadow: -4px 0px 8px -4px #59626b; diff -r 82878d132784 -r c174124d1849 cms/app-client/app/styles/components/filter-component.scss --- a/cms/app-client/app/styles/components/filter-component.scss Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/styles/components/filter-component.scss Sun Jul 03 13:13:10 2016 +0200 @@ -5,6 +5,7 @@ .filter-component h2 { color: #ffffff; + font-size: 13px; } .filter-component ul { diff -r 82878d132784 -r c174124d1849 cms/app-client/app/styles/components/playlist-component.scss --- a/cms/app-client/app/styles/components/playlist-component.scss Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/styles/components/playlist-component.scss Sun Jul 03 13:13:10 2016 +0200 @@ -5,9 +5,10 @@ .playlist-component h2 { line-height: 40px; text-transform: none; - padding: 0px 20px; + padding: 0px 15px; text-align: left; color: #ffffff; + font-size: 13px; } .playlist-component ul { diff -r 82878d132784 -r c174124d1849 cms/app-client/app/styles/tabs/chrono.scss --- a/cms/app-client/app/styles/tabs/chrono.scss Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/styles/tabs/chrono.scss Sun Jul 03 13:13:10 2016 +0200 @@ -1,5 +1,5 @@ #chrono-table{ - margin-top: 20px; + margin-top: 40px; line-height: 40px; } @@ -7,6 +7,15 @@ margin-bottom: 5px; } +#chrono-table .tens { + color: #71848d; + font-size: 13px; +} + +#chrono-table .tens::after { + content: ' -'; +} + #chrono-table ul { margin: 0px; padding: 0px; diff -r 82878d132784 -r c174124d1849 cms/app-client/app/templates/components/filter-component.hbs --- a/cms/app-client/app/templates/components/filter-component.hbs Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/templates/components/filter-component.hbs Sun Jul 03 13:13:10 2016 +0200 @@ -1,20 +1,22 @@

Filtres

+{{#if (ifOr filter.location filter.language filter.discourse filter.date filter.theme)}} \ No newline at end of file + {{/if}} + +{{/if}} \ No newline at end of file diff -r 82878d132784 -r c174124d1849 cms/app-client/app/templates/components/visu-chrono.hbs --- a/cms/app-client/app/templates/components/visu-chrono.hbs Fri Jul 01 22:15:35 2016 +0200 +++ b/cms/app-client/app/templates/components/visu-chrono.hbs Sun Jul 03 13:13:10 2016 +0200 @@ -1,5 +1,5 @@
- 1960 - + 1960
- 1970 - + 1970
- 1980 - + 1980
- 1990 - + 1990
- 2000 - + 2000
- 2010 - + 2010