[Fix #929] Add a current-tab only print feature

This commit is contained in:
gregoirenovel 2017-11-23 18:00:13 +01:00
parent 3c5361a96f
commit db3e07820a
5 changed files with 98 additions and 2 deletions

View file

@ -0,0 +1,8 @@
$(document).on("click", "body", function () {
$(".print-menu").removeClass("open fade-in-down");
});
TPS.togglePrintMenu = function(event) {
event.stopPropagation();
$(".print-menu").toggleClass("open fade-in-down");
}

View file

@ -30,3 +30,58 @@
font-size: 14px;
line-height: 20px;
}
.print-menu-opener {
position: relative;
}
.print-menu {
display: none;
position: absolute;
right: 0;
top: 45px;
font-size: 14px;
background: #FFFFFF;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
border: 1px solid $border-grey;
min-width: 270px;
max-width: 340px;
z-index: 20;
&.open {
display: block;
}
li {
border-bottom: 1px solid $border-grey;
&:last-child {
border-bottom: none;
}
.menu-item {
align-items: center;
padding: 14px;
color: $grey;
overflow: hidden;
text-overflow: ellipsis;
img {
margin-right: 14px;
}
}
.menu-link {
display: flex;
color: $black;
&:hover {
background: $light-grey;
}
}
}
}
.print-header {
display: none;
}

View file

@ -104,6 +104,13 @@
font-weight: bold;
}
&.icon-only {
&::after {
margin-left: 2px;
color: $blue;
}
}
.dropdown-content {
display: none;
}

View file

@ -1,6 +1,20 @@
@import "colors";
@import "fonts";
.new-header,
.backoffice-header,
footer {
display: none;
}
.print-header {
display: block;
margin-top: 30px;
font-size: 30px;
line-height: 50px;
font-weight: bold;
}
body {
font-family: "Muli";
}