Modal s vyberem kdy, kde a v kolik, upraveny modal pro vyber fotky, pridan wysiwyg editor
This commit is contained in:
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
|
||||
var editors =new Jodit('.wysiwyg');
|
||||
|
||||
function readURL(input, preview) {
|
||||
|
||||
// ignore
|
||||
if (preview == null) {
|
||||
alert('preview is null');
|
||||
return;
|
||||
}
|
||||
|
||||
// display preview in given element
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = function(e) {
|
||||
preview.attr('src', e.target.result).show();
|
||||
}
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
}
|
||||
|
||||
$(".file-upload").change(function() {
|
||||
var preview = null;
|
||||
|
||||
if ($(this).data('preview')) {
|
||||
preview = $($(this).data('preview'));
|
||||
}
|
||||
|
||||
readURL(this, preview);
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.select-time').datetimepicker({
|
||||
format: 'LT',
|
||||
locale: 'cs',
|
||||
stepping: 10,
|
||||
});
|
||||
$('.select-date').datetimepicker({
|
||||
format: 'D. M. Y',
|
||||
locale: 'cs',
|
||||
minDate: new Date()
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#mainInfoModal').on('show.bs.modal', function (e) {
|
||||
$ ('#map').locationpicker ({
|
||||
location: {latitude: 46.15242437752303, longitude: 2.7470703125},
|
||||
radius: 10,
|
||||
enableReverseGeocode: true,
|
||||
draggable: true,
|
||||
inputBinding: {
|
||||
latitudeInput: null,
|
||||
longitudeInput: null,
|
||||
radiusInput: null,
|
||||
locationNameInput: $ ('#map-input')
|
||||
},
|
||||
enableAutocomplete: true
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user