mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 06:16:56 +02:00
Added the resizer
This commit is contained in:
@@ -4,8 +4,17 @@ import Scrollbar from '../../utils/scrollbar';
|
||||
$(function() {
|
||||
var modal = '';
|
||||
|
||||
var treescroll = new Scrollbar('.pages-list-container .mediapicker-scroll');
|
||||
var thumbscroll = new Scrollbar('.thumbs-list-container .mediapicker-scroll');
|
||||
var treescroll = new Scrollbar('.pages-list-container .mediapicker-scroll', { autoshow: true });
|
||||
var thumbscroll = new Scrollbar('.thumbs-list-container .mediapicker-scroll', { autoshow: true });
|
||||
|
||||
// Thumb Resizer
|
||||
$('.media-container .media-range').change(function() {
|
||||
var cards = $('.media-container div.card-item');
|
||||
var width = $(this).val() + 'px';
|
||||
cards.each(function() {
|
||||
$(this).css('width', width);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('opened', '.remodal', function() {
|
||||
setTimeout(function() {
|
||||
|
||||
2
themes/grav/css-compiled/preset.css
vendored
2
themes/grav/css-compiled/preset.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
themes/grav/js/admin.min.js
vendored
2
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -251,13 +251,23 @@ $dark-text: #333;
|
||||
.thumbs-list-container {
|
||||
position: relative;
|
||||
|
||||
.media-range {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
bottom: 5px;
|
||||
}
|
||||
|
||||
.mediapicker-scroll {
|
||||
position: absolute;
|
||||
top: 55px;
|
||||
bottom: 0px;
|
||||
bottom: 30px;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.gm-scrollbar.-horizontal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -270,7 +280,7 @@ $dark-text: #333;
|
||||
align-content: flex-start;
|
||||
|
||||
.card-item {
|
||||
width: 250px;
|
||||
width: 100px;
|
||||
padding: 2px;
|
||||
margin: 0 5px 5px 0;
|
||||
border: 0;
|
||||
|
||||
@@ -3,7 +3,7 @@ $ir_slider_height: 20px;
|
||||
$ir_counter_width: 60px;
|
||||
$ir_margin: 10px 0;
|
||||
|
||||
input[type=range] {
|
||||
input[type=range].rangefield {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
-webkit-appearance: none;
|
||||
|
||||
@@ -10,5 +10,7 @@
|
||||
<div class="mediapicker-scroll">
|
||||
{% include 'partials/media-list-wrapper__list.html.twig' with { is_modal: is_modal } %}
|
||||
</div>
|
||||
|
||||
<input name="thumb-size" class="media-range" type="range" min="50" max="250" value="100" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user