MuK IT GmbH
6 years ago
5 changed files with 4399 additions and 3 deletions
-
2muk_web_utils/__manifest__.py
-
183muk_web_utils/static/libs/simplebar/simplebar.css
-
4182muk_web_utils/static/libs/simplebar/simplebar.js
-
24muk_web_utils/static/src/js/libs/scrollbar.js
-
11muk_web_utils/template/assets.xml
@ -0,0 +1,183 @@ |
|||||
|
[data-simplebar] { |
||||
|
position: relative; |
||||
|
flex-direction: column; |
||||
|
flex-wrap: wrap; |
||||
|
justify-content: flex-start; |
||||
|
align-content: flex-start; |
||||
|
align-items: flex-start; |
||||
|
width: inherit; |
||||
|
height: inherit; |
||||
|
max-width: inherit; |
||||
|
max-height: inherit; |
||||
|
} |
||||
|
|
||||
|
.simplebar-wrapper { |
||||
|
overflow: hidden; |
||||
|
width: inherit; |
||||
|
height: inherit; |
||||
|
max-width: inherit; |
||||
|
max-height: inherit; |
||||
|
} |
||||
|
|
||||
|
.simplebar-mask { |
||||
|
direction: inherit; |
||||
|
position: absolute; |
||||
|
overflow: hidden; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
left: 0; |
||||
|
top: 0; |
||||
|
bottom: 0; |
||||
|
right: 0; |
||||
|
width: auto !important; |
||||
|
height: auto !important; |
||||
|
z-index: 0; |
||||
|
} |
||||
|
|
||||
|
.simplebar-offset { |
||||
|
direction: inherit !important; |
||||
|
box-sizing: inherit !important; |
||||
|
resize: none !important; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
bottom: 0; |
||||
|
right: 0; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
-webkit-overflow-scrolling: touch; |
||||
|
} |
||||
|
|
||||
|
.simplebar-content { |
||||
|
direction: inherit; |
||||
|
box-sizing: border-box !important; |
||||
|
position: relative; |
||||
|
display: block; |
||||
|
height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */ |
||||
|
width: auto; |
||||
|
visibility: visible; |
||||
|
overflow: scroll; /* Scroll on this element otherwise element can't have a padding applied properly */ |
||||
|
max-width: 100%; /* Not required for horizontal scroll to trigger */ |
||||
|
max-height: 100%; /* Needed for vertical scroll to trigger */ |
||||
|
} |
||||
|
|
||||
|
.simplebar-placeholder { |
||||
|
max-height: 100%; |
||||
|
max-width: 100%; |
||||
|
width: 100%; |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
|
||||
|
.simplebar-height-auto-observer-wrapper { |
||||
|
box-sizing: inherit !important; |
||||
|
height: 100%; |
||||
|
width: inherit; |
||||
|
max-width: 1px; |
||||
|
position: relative; |
||||
|
float: left; |
||||
|
max-height: 1px; |
||||
|
overflow: hidden; |
||||
|
z-index: -1; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
pointer-events: none; |
||||
|
flex-grow: inherit; |
||||
|
flex-shrink: 0; |
||||
|
flex-basis: 0; |
||||
|
} |
||||
|
|
||||
|
.simplebar-height-auto-observer { |
||||
|
box-sizing: inherit; |
||||
|
display: block; |
||||
|
opacity: 0; |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
height: 1000%; |
||||
|
width: 1000%; |
||||
|
min-height: 1px; |
||||
|
min-width: 1px; |
||||
|
overflow: hidden; |
||||
|
pointer-events: none; |
||||
|
z-index: -1; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track { |
||||
|
z-index: 1; |
||||
|
position: absolute; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
|
||||
|
.simplebar-scrollbar { |
||||
|
position: absolute; |
||||
|
right: 2px; |
||||
|
width: 7px; |
||||
|
min-height: 10px; |
||||
|
} |
||||
|
|
||||
|
.simplebar-scrollbar:before { |
||||
|
position: absolute; |
||||
|
content: ""; |
||||
|
background: black; |
||||
|
border-radius: 7px; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
opacity: 0; |
||||
|
transition: opacity 0.2s linear; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track .simplebar-scrollbar.simplebar-visible:before { |
||||
|
/* When hovered, remove all transitions from drag handle */ |
||||
|
opacity: 0.5; |
||||
|
transition: opacity 0s linear; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track.simplebar-vertical { |
||||
|
top: 0; |
||||
|
width: 11px; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track.simplebar-vertical .simplebar-scrollbar:before { |
||||
|
top: 2px; |
||||
|
bottom: 2px; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track.simplebar-horizontal { |
||||
|
left: 0; |
||||
|
height: 11px; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before { |
||||
|
height: 100%; |
||||
|
left: 2px; |
||||
|
right: 2px; |
||||
|
} |
||||
|
|
||||
|
.simplebar-track.simplebar-horizontal .simplebar-scrollbar { |
||||
|
right: auto; |
||||
|
left: 0; |
||||
|
top: 2px; |
||||
|
height: 7px; |
||||
|
min-height: 0; |
||||
|
min-width: 10px; |
||||
|
width: auto; |
||||
|
} |
||||
|
|
||||
|
/* Rtl support */ |
||||
|
[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical { |
||||
|
right: auto; |
||||
|
left: 0; |
||||
|
} |
||||
|
|
||||
|
.hs-dummy-scrollbar-size { |
||||
|
direction: rtl; |
||||
|
position: fixed; |
||||
|
opacity: 0; |
||||
|
visibility: hidden; |
||||
|
height: 500px; |
||||
|
width: 500px; |
||||
|
overflow-y: hidden; |
||||
|
overflow-x: scroll; |
||||
|
} |
4182
muk_web_utils/static/libs/simplebar/simplebar.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,24 @@ |
|||||
|
/********************************************************************************** |
||||
|
* |
||||
|
* Copyright (C) 2018 MuK IT GmbH |
||||
|
* |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU Affero General Public License as |
||||
|
* published by the Free Software Foundation, either version 3 of the |
||||
|
* License, or (at your option) any later version. |
||||
|
* |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU Affero General Public License for more details. |
||||
|
* |
||||
|
* You should have received a copy of the GNU Affero General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
* |
||||
|
**********************************************************************************/ |
||||
|
|
||||
|
$.fn.renderScrollBar = function() { |
||||
|
this.each(function() { |
||||
|
new SimpleBar(this); |
||||
|
}); |
||||
|
}; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue