Added the resizer

This commit is contained in:
Andy Miller
2017-05-26 13:35:48 -06:00
parent 5f204e8795
commit a555c4a7c4
9 changed files with 32 additions and 11 deletions

View File

@@ -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() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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;

View File

@@ -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;

View File

@@ -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>