[Fix #929] Add a current-tab only print feature
This commit is contained in:
parent
3c5361a96f
commit
db3e07820a
5 changed files with 98 additions and 2 deletions
8
app/assets/javascripts/new_design/dossier.js
Normal file
8
app/assets/javascripts/new_design/dossier.js
Normal 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");
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -104,6 +104,13 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.icon-only {
|
||||
&::after {
|
||||
margin-left: 2px;
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue