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

Commit 4f69689

Browse files
committed
Merge branch 'release/2.5.4'
2 parents 553aecb + a98f221 commit 4f69689

Some content is hidden

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

43 files changed

+92
-64
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ CHANGELOG
33

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

6+
* 2.5.4 (2015-08-19)
7+
* #357 Missing print function in contact box fix IE9 bug
8+
69
* 2.5.3 (2015-08-17)
710
* #375 add .clearfix class to the infobox element to avoid overflowing elements when floated !markup
811
* #374 remove clearing of search-field when clicking on body element, enhance its clear button

VERSION

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

assets/examples/functions.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ You can target a specific element to isolate and print by adding a `data-print="
3131
3232
- change the `onclick="window.print()"` by `onclick="$.printPreview.printPreview()"`
3333
- add an optional target to the printPreview function: `onclick="$.printPreview.printPreview('target id')"`
34+
35+
<br>
36+
**2.5.4:**
37+
38+
- place a title like `<h3 class="visible-print-block">Contact</h3>` at the top of your `.tab-pane` elements to display only when printing
3439
</div>
3540
3641

assets/js/print.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828

2929
// if an element is passed, we want it to be the only thing to print out
3030
if (element) {
31-
element = $('[data-print=' + element + ']');
32-
var header = $('header');
31+
element = $('[data-print=' + element + ']').clone(); // clone to fix issue with IE render
32+
var header = $('header').clone(); // clone to fix issue with IE render
3333
title = element.attr('data-title') ? '<h1>' + element.attr('data-title') + '</h1>' : '';
34-
$container.addClass('print-element').html('').append(header).append(title).append(element);
34+
$container.addClass('print-element').html('').append(header, title, element);
3535
}
3636

3737
$body.addClass('print-preview');
@@ -67,7 +67,7 @@
6767
var target = $(this).attr('href');
6868
target = String(target);
6969

70-
if (target != "undefined" && target.indexOf("http") >= 0) {
70+
if (target != "undefined" && target.indexOf("http") === 0) {
7171
linksIndex ++;
7272
footnoteLinks += '<li>'+target+'</li>';
7373
$('<sup class="link-ref">('+linksIndex+')</sup>').insertAfter(this);

assets/pages/detail.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
<!-- Tab panes -->
123123
<div class="tab-content tab-border">
124124
<div class="tab-pane active" id="documents">
125+
<h3 class="visible-print-block">Documents</h3>
125126
<article>
126127
<h4>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</h4>
127128
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
@@ -135,13 +136,15 @@
135136
</article>
136137
</div>
137138
<div class="tab-pane" id="links">
139+
<h3 class="visible-print-block">Links</h3>
138140
<p><a href="#" class="icon icon--after icon--external">external link</a></p>
139141
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, eum amet architecto corporis aut cumque ratione dolores odit et libero impedit ipsa. Enim, deleniti, quae ipsa nostrum doloremque nihil repellendus.</p>
140142
<hr>
141143
<p><a href="#" class="icon icon--after icon--external">external link</a></p>
142144
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, eum amet architecto corporis aut cumque ratione dolores odit et libero impedit ipsa. Enim, deleniti, quae ipsa nostrum doloremque nihil repellendus.</p>
143145
</div>
144146
<div class="tab-pane" id="news">
147+
<h3 class="visible-print-block">News</h3>
145148
<!-- Add .clearfix class to prevent errors with floated elements -->
146149
<article class="clearfix">
147150
<h4><a href="#">Title Lorem ipsum</a></h4>

assets/pages/layout.twig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@
449449

450450
<!-- Tab panes -->
451451
<div class="tab-content tab-border" data-print="contact" data-title="Contact info">
452-
<div class="tab-pane active" id="contact" title="Contact">
452+
<div class="tab-pane active" id="contact">
453+
<h2 class="visible-print-block">Contact</h2>
453454
<address itemprop="address" itemscope="itemscope" itemtype="http://data-vocabulary.org/Address">
454455
<strong itemprop="name">UNO-Mission New York</strong>
455456
<span>Permanent Mission of Switzerland to the UN</span><br>
@@ -476,13 +477,14 @@
476477
closed</p>
477478
<p><a href="#" onclick="$.printPreview.printPreview('contact')" class="icon icon--before icon--print">Print contact infos</a></p>
478479
</div>
479-
<div class="tab-pane" id="map" title="Map">
480+
<div class="tab-pane" id="map">
481+
<h2 class="visible-print-block">Map</h2>
480482
<h3>UNO-Mission New York</h3>
481483
<p>633, Third Avenue<br>
482484
New York, NY10017-6706</p>
483485
<p><img src="http://placehold.it/158x120" alt="Map"></p>
484486
<p><a href="#" class="icon icon--after icon--external">See on the map</a></p>
485-
<p><a href="#" class="icon icon--before icon--print">Print contact infos</a></p>
487+
<p><a href="#" onclick="$.printPreview.printPreview('contact')" class="icon icon--before icon--print">Print contact infos</a></p>
486488
</div>
487489
</div>
488490
<br>

assets/sass/print/print-general.scss

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ unbedingt Reihenfolge behalten
7272
color: blue !important;
7373
text-decoration: underline;
7474
}
75-
a:not([name="context-sidebar"]):after{
75+
a:not([name="context-sidebar"]):not([href="#"]):after{
7676
content:" (" attr(href) ") " !important;
7777
font-size:0.8em;
7878
font-weight:normal;
79+
font-family: sans-serif;
7980
}
8081
a[href*="tel:"]:after {content: none !important;}
8182
.breadcrumb li:not(:nth-last-child(3)) a:after,
@@ -99,12 +100,7 @@ unbedingt Reihenfolge behalten
99100
.tab-content>.tab-pane {
100101
display: block !important;
101102
visibility: visible;
102-
border-top: 1px dashed #6d6d6d;
103103
margin-bottom: 15px;
104-
&:before {
105-
content: attr(title) ' tab:';
106-
opacity: .6;
107-
}
108104
}
109105
.tab-content, .tab-content.tab-border {
110106
padding: 0;
@@ -121,12 +117,15 @@ unbedingt Reihenfolge behalten
121117
.news-feed .scroll-y {
122118
max-height: 10000000000000px !important;
123119
}
124-
120+
address {padding: 0;}
125121
.link-ref {display: none;}
126122
&.print-footnotes .link-ref {display: inline;}
127123
&.print-footnotes a:after {content: none !important;}
128124
#print-settings .btn {display: inline-block !important;}
129125
#print-settings .pagination-container {display: block !important;}
126+
.visible-print-inline {display: inline !important;}
127+
.visible-print-block {display: block !important;}
128+
.visible-print-inline-block {display: inline-block !important;}
130129
}
131130

132131
.print-preview {

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swiss-styleguide",
3-
"version": "2.5.3",
3+
"version": "2.5.4",
44
"homepage": "http://swiss.github.io/styleguide",
55
"authors": "Antistatique.net",
66
"description": "Swiss Admin Styleguide",

build/css/print.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/js/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ function disableControl(element) {
277277

278278
// if an element is passed, we want it to be the only thing to print out
279279
if (element) {
280-
element = $('[data-print=' + element + ']');
281-
var header = $('header');
280+
element = $('[data-print=' + element + ']').clone(); // clone to fix issue with IE render
281+
var header = $('header').clone(); // clone to fix issue with IE render
282282
title = element.attr('data-title') ? '<h1>' + element.attr('data-title') + '</h1>' : '';
283-
$container.addClass('print-element').html('').append(header).append(title).append(element);
283+
$container.addClass('print-element').html('').append(header, title, element);
284284
}
285285

286286
$body.addClass('print-preview');
@@ -316,7 +316,7 @@ function disableControl(element) {
316316
var target = $(this).attr('href');
317317
target = String(target);
318318

319-
if (target != "undefined" && target.indexOf("http") >= 0) {
319+
if (target != "undefined" && target.indexOf("http") === 0) {
320320
linksIndex ++;
321321
footnoteLinks += '<li>'+target+'</li>';
322322
$('<sup class="link-ref">('+linksIndex+')</sup>').insertAfter(this);

0 commit comments

Comments
 (0)