Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 553aecb

Browse files
committed
Merge branch 'release/2.5.3'
2 parents d3ab83f + c4bf578 commit 553aecb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+491
-272
lines changed

CHANGELOG.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ CHANGELOG
33

44
This changelog references the relevant changes and bug fixes.
55

6+
* 2.5.3 (2015-08-17)
7+
* #375 add .clearfix class to the infobox element to avoid overflowing elements when floated !markup
8+
* #374 remove clearing of search-field when clicking on body element, enhance its clear button
9+
* #371 remove the p key shortcut to show the print view
10+
* #381 add .hidden-print class to content-sidebar anchors
11+
* #372 #370 fix print styles
12+
* #357 add optional parameter to the printPreview() function !markup -> see doc
13+
* #373 fix nav-page-list element to behave correctly on mobile
14+
* #381 set .clearfix class to collapse element to avoid issues with first-child heading
15+
* #381 change max-width of nav-main element from 140px to 110px
16+
* #376 fix slideshow carousel-controls element to make it work with bigger numbers !markup
17+
* #368 fix missing print function on publications page
18+
* #380 add info about favicons in the CDelements page
19+
* #367 #344 fix markup change in js for the focus and tabs elements
20+
* #381 fix various visual issues with tabs (background-color, padding, focus state)
21+
622
* 2.5.2 (2015-02-26)
723
* #356 fix error with active state of `.list-emphasis` as list parent
824
* #358 fix `.table-striped` error due to new Bootstrap version
@@ -44,17 +60,17 @@ This changelog references the relevant changes and bug fixes.
4460

4561
* 2.4.0 (2015-01-05)
4662
* #327 Anchor link for context information when placed at the bottom
47-
* #319 [icons] Icon in download list are shown twice.
48-
* #318 Distance in between checkboxes and text is wrong in search results.
49-
* #307 Social Sharing layout is moving on browser zoom
50-
* #306 Resetting of search value doesn't work.
51-
* #305 Search input field will only be initialised when typeahead values are available.
52-
* #295 Language navigation covers name of the organizational unit
53-
* #292 Invalid HTML in footer links.
54-
* #291 Invalid HTML in breadcrumb.
55-
* #290 Missing preset number at one-line order form.
56-
* #289 Global Navigation slipped down when scrolling.
57-
* #283 Single images will not be scaled and overlays their boxes.
63+
* #319 [icons] Icon in download list are shown twice.
64+
* #318 Distance in between checkboxes and text is wrong in search results.
65+
* #307 Social Sharing layout is moving on browser zoom
66+
* #306 Resetting of search value doesn't work.
67+
* #305 Search input field will only be initialised when typeahead values are available.
68+
* #295 Language navigation covers name of the organizational unit
69+
* #292 Invalid HTML in footer links.
70+
* #291 Invalid HTML in breadcrumb.
71+
* #290 Missing preset number at one-line order form.
72+
* #289 Global Navigation slipped down when scrolling.
73+
* #283 Single images will not be scaled and overlays their boxes.
5874

5975
* 2.2.0 (2014-10-08)
6076
* #243 Heading not in a logical sequence bug

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5.2
1+
2.5.3

assets/docs/CDElements.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,25 @@ Interactive elements are either indicated by their position (e.g. in the navigat
5757
5858
The uniform foot bar closes the pages. It contains a copyright notice as well as links to the “legal notice” and “further legal information”.
5959
60+
## Favicon
61+
62+
Don't forget the favicon before putting the website in production. The favicon ressources are located in the `/build/img/ico/` directory. Include them with the adequate code in your index file:
63+
64+
```html
65+
<link rel="shortcut icon" href="build/img/ico/favicon.ico">
66+
<link rel="apple-touch-icon" sizes="57x57" href="build/img/ico/apple-touch-icon-57x57.png">
67+
<link rel="apple-touch-icon" sizes="114x114" href="build/img/ico/apple-touch-icon-114x114.png">
68+
<link rel="apple-touch-icon" sizes="72x72" href="build/img/ico/apple-touch-icon-72x72.png">
69+
<link rel="apple-touch-icon" sizes="144x144" href="build/img/ico/apple-touch-icon-144x144.png">
70+
<link rel="apple-touch-icon" sizes="60x60" href="build/img/ico/apple-touch-icon-60x60.png">
71+
<link rel="apple-touch-icon" sizes="120x120" href="build/img/ico/apple-touch-icon-120x120.png">
72+
<link rel="apple-touch-icon" sizes="76x76" href="build/img/ico/apple-touch-icon-76x76.png">
73+
<link rel="icon" type="image/png" href="build/img/ico/favicon-96x96.png" sizes="96x96">
74+
<link rel="icon" type="image/png" href="build/img/ico/favicon-16x16.png" sizes="16x16">
75+
<link rel="icon" type="image/png" href="build/img/ico/favicon-32x32.png" sizes="32x32">
76+
<meta name="msapplication-TileColor" content="#ffffff">
77+
<meta name="msapplication-TileImage" content="img/ico/mstile-144x144.png">
78+
<meta name="msapplication-config" content="img/ico/browserconfig.xml">
79+
```
80+
6081
*/

assets/examples/functions.scss

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,34 @@ category: Content Modules - Functions
2121
2222
<span class="label label-admin">FLEX</span>
2323
24-
The "Print" icon, with a link to the print version, can be integrated into every page (except the home page). It is positioned at the top right of the content column. A click on the icon opens the browser’s or operating system’s print dialog.
24+
The "Print" icon, with a link to the print version, can be integrated into every page (except the home page). It is positioned at the top right of the content column. A click on the icon opens the print dialog window.
25+
26+
You can target a specific element to isolate and print by adding a `data-print="ID"` on the wrapper and setting `onclick="$.printPreview.printPreview(ID)"` on the print button. If a `data-title` attribute is set on the wrapper, it will be displayed as the title of the printed page.
27+
28+
<br>
29+
<div class="alert alert-warning">
30+
**2.5.3:**
31+
32+
- change the `onclick="window.print()"` by `onclick="$.printPreview.printPreview()"`
33+
- add an optional target to the printPreview function: `onclick="$.printPreview.printPreview('target id')"`
34+
</div>
35+
36+
37+
```html_example
38+
<a href="#" onclick="$.printPreview.printPreview()" class="icon icon--before icon--print"></a>
39+
40+
<br><br>
41+
```
42+
43+
With a specific target:
2544
2645
```html_example
27-
<a href="#" onclick="window.print()" class="icon icon--before icon--print"></a>
46+
<div class="example" data-print="example-print" data-title="Big pretty Title">
47+
<h4>We only want to print this</h4>
48+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos labore non cum eligendi cumque, ipsa, repudiandae consequatur aut ducimus, molestiae nesciunt consectetur laborum pariatur accusamus in aspernatur quod quae possimus!</p>
49+
</div>
50+
51+
<a href="#" onclick="$.printPreview.printPreview('example-print')" class="icon icon--before icon--print"></a>
2852
2953
<br><br>
3054
```
@@ -63,4 +87,4 @@ Links with which a file can be downloaded are always preceded by a document icon
6387
</div>
6488
</div>
6589
```
66-
*/
90+
*/

assets/examples/standard-element.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,21 @@ category: Content Modules - Standard elements
134134
135135
The info box is a "text and image" element that has a gray background. It can be integrated into the running text body in order highlight additional information.
136136
137-
To have this grey background, add a `well` wrapper around your content.
137+
To have this grey background, add a `.well .clearfix` wrapper around your content.
138+
139+
<br>
140+
<div class="alert alert-warning">
141+
**2.5.3:**
142+
- add a `.clearfix` class to the `.well` wrapper
143+
</div>
138144
139145
```html_example
140146
<!-- Use normal `container` instead of `container-fluid` -->
141147
<div class="container-fluid">
142148
<div class="row">
143149
<div class="col-sm-8 col-sm-offset-2">
144150
145-
<div class="well">
151+
<div class="well clearfix">
146152
<h2>Big image</h2>
147153
<br>
148154
<figure>
@@ -157,7 +163,7 @@ To have this grey background, add a `well` wrapper around your content.
157163
158164
<br>
159165
160-
<div class="well">
166+
<div class="well clearfix">
161167
<h2>Small image</h2>
162168
<br>
163169
<figure class="pull-left">
@@ -178,7 +184,7 @@ To have this grey background, add a `well` wrapper around your content.
178184
<a href="#" class="icon icon--after icon--external">External link</a>
179185
</div>
180186
181-
<div class="well">
187+
<div class="well clearfix">
182188
<h2>Tiny image</h2>
183189
<br>
184190
<figure class="pull-left">

assets/js/autocomplete.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@
3838
$('.form-search').append('<button class="icon icon--search icon--before"></button>');
3939

4040
$('body').on('click', '[data-form-search-clear]', function () {
41-
$(this).siblings('.search-field').focus().val('');
42-
});
43-
44-
$('body').on('click', function () {
45-
$('#search-field').val('');
41+
$('#search-field').val('').focus(); // clear search field and refocus it
4642
});
4743

4844
}) (jQuery, (typeof searchData === 'undefined' ? false : searchData));

assets/js/print.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,25 @@
1515
$.fn.printPreview = function() {
1616
return this;
1717
};
18-
18+
1919
$.printPreview = {
2020

21-
printPreview: function() {
21+
printPreview: function(element) {
2222
var $body = $('body'),
2323
$container = $('.container-main'),
2424
footnoteLinks = "",
2525
linksIndex = 0;
2626

2727
$body.find('.nav-mobile, .drilldown, .nav-main, .header-separator, .nav-service, .nav-lang, .form-search, .yamm--select, header > div:first-child, footer, .alert, .icon--print, .social-sharing, form, .nav-process, .carousel-indicators, .carousel-control, .breadcrumb, .pagination-container').remove();
28+
29+
// if an element is passed, we want it to be the only thing to print out
30+
if (element) {
31+
element = $('[data-print=' + element + ']');
32+
var header = $('header');
33+
title = element.attr('data-title') ? '<h1>' + element.attr('data-title') + '</h1>' : '';
34+
$container.addClass('print-element').html('').append(header).append(title).append(element);
35+
}
36+
2837
$body.addClass('print-preview');
2938

3039
$container.prepend('<div class="row" id="print-settings">'+
@@ -94,16 +103,4 @@
94103

95104
};
96105

97-
$('a.truc').printPreview();
98-
$(document).bind('keydown', function(e) {
99-
var code = (e.keyCode ? e.keyCode : e.which);
100-
if (code == 80 && !$('body').hasClass('print-preview')) {
101-
$.printPreview.printPreview();
102-
return false;
103-
}
104-
});
105-
106-
// To test print preview mode
107-
// $.printPreview.printPreview();
108-
109106
}) (jQuery);

assets/js/shame.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
$(document).ready(function () {
1515
var id;
16+
var isCarouselified = false;
17+
var isCollapsified = false;
1618
carouselify();
1719
collapsify();
1820

@@ -29,37 +31,40 @@
2931
function carouselify() {
3032
var $tabFocus = $(".tab-focus"),
3133
focusIndex = 0;
32-
if($tabFocus && $(window).width() < 767 ) {
34+
if($tabFocus && $(window).width() <= 767 && !isCarouselified ) {
35+
isCarouselified = true;
3336
$tabFocus.each(function () {
3437
var $that = $(this),
3538
itemIndex = -1;
3639
focusIndex += 1;
3740
$that.attr('id', 'tab-focus-'+focusIndex);
38-
$that.next(".nav-tabs").hide();
41+
$that.next(".nav-tabs").hide().removeClass('nav-tabs-focus').addClass('focus');
3942
$that.addClass('carousel slide').removeClass('tab-content tab-border');
4043
$that.wrapInner( "<div class='carousel-inner'></div>");
4144
$that.prepend( "<ol class=\"carousel-indicators\"></ol>" );
4245

4346
$that.find('.tab-pane').each(function () {
4447
itemIndex += 1;
45-
$(this).removeClass('tab-pane fade in active').addClass('item');
48+
$(this).removeClass('tab-pane in active').addClass('item');
4649
$that.find('.carousel-indicators').append("<li data-target=\"#tab-focus-"+focusIndex+"\" data-slide-to=\""+itemIndex+"\" class=\"\"></li>");
4750
});
4851
$that.find('.item:first').addClass('active');
4952
$that.find('.carousel-indicators li:first-child').addClass('active');
5053

5154
$that.append( "<a class=\"left carousel-control icon icon--before icon--less\" href=\"#tab-focus-"+focusIndex+"\" data-slide=\"prev\"></a><a class=\"right carousel-control icon icon--before icon--greater\" href=\"#tab-focus-"+focusIndex+"\" data-slide=\"next\"></a>" );
5255
});
53-
} else if($tabFocus) {
56+
} else if($tabFocus && $(window).width() > 767 && isCarouselified) {
57+
isCarouselified = false;
5458
$tabFocus.each(function () {
5559
var $that = $(this);
5660
focusIndex -= 1;
57-
$that.next(".nav-tabs").show();
61+
$that.attr('id', '');
62+
$that.next(".focus").addClass('nav-tabs-focus').removeClass('focus').css('display', 'flex'); // we can't use .show() because it should be a flex wrapper
5863
$that.removeClass('carousel slide').addClass('tab-content tab-border');
5964
$that.find( "ol.carousel-indicators" ).remove();
6065

6166
$that.find('.item').each(function () {
62-
$(this).addClass('tab-pane fade').removeClass('item');
67+
$(this).addClass('tab-pane').removeClass('item');
6368
$(this).css('height', 'auto');
6469
});
6570
$that.find('.tab-pane:first-child').addClass('active in');
@@ -74,10 +79,11 @@
7479
}
7580

7681
function collapsify() {
77-
var $navTab = $(".nav-tabs"),
82+
var $navTab = $(".nav-tabs:not(.focus)"),
7883
$collapsify = $(".collapsify"),
7984
linkIndex = 0;
80-
if($navTab && $(window).width() < 767 ) {
85+
if($navTab && $(window).width() <= 767 && !isCollapsified ) {
86+
isCollapsified = true;
8187
$navTab.not('.tab-focus').each(function (){
8288
var $that = $(this);
8389
$that.removeClass("nav-tabs").addClass('collapsify');
@@ -96,7 +102,8 @@
96102
});
97103
//$that.find('a:first-child').removeClass('collapse-closed').next('.collapse').addClass('in');
98104
});
99-
} else if($collapsify) {
105+
} else if($collapsify && $(window).width() > 767 && isCollapsified) {
106+
isCollapsified = false;
100107
$collapsify.each(function (){
101108
var $that = $(this);
102109
$that.addClass("nav-tabs").removeClass('collapsify');

assets/js/tabs.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,24 @@
1515
var interval = 3000;
1616
var tabCarousel = setInterval(nextSlide, interval);
1717

18-
$('.tab-content.tab-focus, .nav-tabs.nav-tabs-focus').hover(function(e){
18+
$(document).on({
19+
mouseenter: function () {
1920
clearInterval(tabCarousel);
20-
}, function(e){
21+
},
22+
mouseleave: function () {
2123
tabCarousel = setInterval( nextSlide, interval);
22-
});
24+
}
25+
}, ".tab-content.tab-focus, .nav-tabs.nav-tabs-focus");
2326

2427
function nextSlide() {
25-
var tabs = $('.nav-tabs-focus.nav-tabs > li'),
26-
active = tabs.filter('.active'),
27-
next = active.next('li'),
28-
toClick = next.length ? next.find('a') : tabs.eq(0).find('a');
28+
if ($('.nav-tabs-focus.nav-tabs > li').length) {
29+
var tabs = $('.nav-tabs-focus.nav-tabs > li'),
30+
active = tabs.filter('.active'),
31+
next = active.next('li'),
32+
toClick = next.length ? next.find('a') : tabs.eq(0).find('a');
2933

30-
toClick.tab('show');
34+
toClick.tab('show');
35+
}
3136
}
3237

3338
}) (jQuery);

assets/pages/detail.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% block content %}
77
<div class="col-md-8">
88
<div class="visible-xs visible-sm">
9-
<p><a href="#context-sidebar" class="icon icon--before icon--root">Context sidebar</a></p>
9+
<p><a href="#context-sidebar" class="icon icon--before icon--root hidden-print">Context sidebar</a></p>
1010
</div>
1111
<a href="#" onclick="$.printPreview.printPreview()" class="icon icon--before icon--print pull-right"></a>
1212
<h1 class="text-inline">This is the page title, and it can be really quite long.</h1>
@@ -110,7 +110,7 @@
110110
<br>
111111

112112
<!-- Contextual information -->
113-
<a name="context-sidebar"></a>
113+
<a name="context-sidebar" class="hidden-print"></a>
114114

115115
<!-- Nav tabs -->
116116
<ul class="nav nav-tabs">

0 commit comments

Comments
 (0)