FileManager
This commit is contained in:
parent
c8948338bb
commit
f1e0900a7a
131 changed files with 5844 additions and 3081 deletions
|
|
@ -31,8 +31,8 @@
|
|||
<link rel="stylesheet" href="{{ mix('/vendor/libs/growl/growl.css') }}">
|
||||
|
||||
|
||||
@if(isset($helper))
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/laravel-filemanager/css/dropzone.min.css') }}">
|
||||
@if(isset($lfm_helper))
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/laravel-filemanager/css/dropzone.min.css') }}">
|
||||
@else
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/libs/dropzone/dropzone.css') }}">
|
||||
@endif
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
-->
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/dragula/dragula.css') }}">
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/minicolors/minicolors.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css?v=0.8.16') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/libs/nestable/nestable.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/css/pages/messages.css') }}">
|
||||
|
||||
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
@yield('styles')
|
||||
|
||||
|
||||
<!-- Application stylesheets -->
|
||||
<link rel="stylesheet" href="{{ mix('/css/application.css') }}{{ get_file_last_time('js/application.css') }}">
|
||||
<script src="{{ asset('/js/jquery.min.js') }}"></script>
|
||||
|
|
@ -103,11 +104,8 @@
|
|||
|
||||
@yield('layout-content')
|
||||
|
||||
<div class="modal fade" id="modals-load-content">
|
||||
<div class="modal-dialog modal-lg">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@include('iq.content.assets.modals')
|
||||
|
||||
<!-- Core scripts -->
|
||||
<script src="{{ mix('/vendor/libs/popper/popper.js') }}"></script>
|
||||
|
|
@ -116,7 +114,7 @@
|
|||
<script src="{{ mix('/vendor/libs/growl/growl.js') }}"></script>
|
||||
<script src="{{ asset('/vendor/libs/js-cookie/src/js.cookie.js') }}"></script>
|
||||
|
||||
@if(isset($helper))
|
||||
@if(isset($lfm_helper))
|
||||
<script src="{{ asset('/vendor/laravel-filemanager/js/dropzone.min.js') }}"></script>
|
||||
@else
|
||||
<script src="{{asset('/vendor/libs/dropzone/dropzone.js')}}"></script>
|
||||
|
|
@ -137,11 +135,16 @@
|
|||
<script src="{{ mix('/vendor/libs/dragula/dragula.js') }}"></script>
|
||||
<script src="{{asset('/vendor/libs/nestable/my-nestable.js')}}"></script>
|
||||
<script src="{{ mix('/vendor/libs/minicolors/minicolors.js') }}"></script>
|
||||
<script src="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.js') }}"></script>
|
||||
<script src="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.js?v=0.8.16') }}"></script>
|
||||
<script src="{{ asset('/vendor/libs/summernote/dist/lang/summernote-de-DE.js?v=0.8.16') }}"></script>
|
||||
|
||||
<script src="{{ asset('/vendor/laravel-filemanager/js/cropper.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/pages_file-manager.js') }}"></script>
|
||||
<script src="{{ asset('/js/filemanager.js?v1') }}"></script>
|
||||
<script src="{{ asset('/js/summernote-iq-content-extension.js?v=2') }}"></script>
|
||||
<script src="{{ asset('/js/summernote-image-title.js?v=2') }}"></script>
|
||||
|
||||
@if(isset($lfm_helper))
|
||||
<script src="{{ asset('/vendor/laravel-filemanager/js/cropper.min.js') }}"></script>
|
||||
<script src="{{ asset('/js/filemanager.js?v3') }}"></script>
|
||||
@endif
|
||||
|
||||
<!-- Libs -->
|
||||
<!-- `perfect-scrollbar` library required by SideNav plugin -->
|
||||
|
|
@ -151,34 +154,12 @@
|
|||
|
||||
<!-- Application javascripts -->
|
||||
<script src="{{ mix('/js/application.js') }}"></script>
|
||||
<script src="{{ asset('/js/custom.js?v') }}{{ get_file_last_time('js/custom.js') }}"></script>
|
||||
<script>
|
||||
@if(isset($helper))
|
||||
<script src="{{ asset('/js/custom.js?v1') }}{{ get_file_last_time('/js/custom.js') }}"></script>
|
||||
|
||||
Dropzone.options.uploadForm = {
|
||||
paramName: "upload[]", // The name that will be used to transfer the file
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 10,
|
||||
clickable: '#upload-button',
|
||||
//dictDefaultMessage: lang['message-drop'],
|
||||
init: function() {
|
||||
var _this = this; // For the closure
|
||||
this.on('success', function(file, response) {
|
||||
console.log(response);
|
||||
if (response == 'OK') {
|
||||
loadItems();
|
||||
} else {
|
||||
this.defaultOptions.error(file, response); //response.join('\n')
|
||||
}
|
||||
});
|
||||
},
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + getUrlParam('token')
|
||||
},
|
||||
// acceptedFiles: "{{ implode(',', $helper->availableMimeTypes()) }}",
|
||||
maxFilesize: ({{ $helper->maxUploadSize() }} / 1000),
|
||||
};
|
||||
@endif
|
||||
|
||||
@include('asset.js')
|
||||
|
||||
<script>
|
||||
// Dragula
|
||||
$(function() {
|
||||
// Drag handle
|
||||
|
|
@ -189,21 +170,98 @@
|
|||
});
|
||||
});
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
@if(isset($lfm_helper))
|
||||
$("#uploadForm").dropzone({
|
||||
paramName: "upload[]", // The name that will be used to transfer the file
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 10,
|
||||
clickable: '#upload-button',
|
||||
//dictDefaultMessage: LFileManager.lfm_config['lfm_lang']['message-drop'],
|
||||
init: function () {
|
||||
var _this = this; // For the closure
|
||||
this.on('success', function (file, response) {
|
||||
//console.log(response);
|
||||
if (response === 'OK') {
|
||||
LFileManager.loadItems();
|
||||
} else {
|
||||
_this.defaultOptions.error(file, response); //response.join('\n')
|
||||
}
|
||||
});
|
||||
},
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + LFileManager.getUrlParam('token')
|
||||
},
|
||||
// acceptedFiles: LFileManager.lfm_config['lfm_availableMimeTypes'] ,
|
||||
maxFilesize: (LFileManager.lfm_config['lfm_maxUploadSize'] / 1000),
|
||||
});
|
||||
@endif
|
||||
|
||||
/*Dropzone.options.uploadForm = {
|
||||
paramName: "upload[]", // The name that will be used to transfer the file
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 10,
|
||||
clickable: '#upload-button',
|
||||
//dictDefaultMessage: LFileManager.lfm_config['lfm_lang']['message-drop'],
|
||||
init: function() {
|
||||
console.log("Dinit")
|
||||
var _this = this; // For the closure
|
||||
this.on('success', function(file, response) {
|
||||
console.log(response);
|
||||
if (response === 'OK') {
|
||||
LFileManager.loadItems();
|
||||
} else {
|
||||
_this.defaultOptions.error(file, response); //response.join('\n')
|
||||
}
|
||||
});
|
||||
},
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + LFileManager.getUrlParam('token')
|
||||
},
|
||||
// acceptedFiles: LFileManager.lfm_config['lfm_availableMimeTypes'] ,
|
||||
maxFilesize: (LFileManager.lfm_config['lfm_maxUploadSize'] / 1000),
|
||||
};*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
|
||||
$('.summernote').summernote({
|
||||
height: 300,
|
||||
tabsize: 2,
|
||||
followingToolbar: true,
|
||||
imageTitle: {
|
||||
specificAltField: true,
|
||||
},
|
||||
lang: 'de-DE',
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['extensions', ['gallery']],
|
||||
['insert', ['link', 'picture', 'video', 'hr']],
|
||||
['view', ['fullscreen', 'codeview']],
|
||||
['help', ['help']]
|
||||
],
|
||||
popover: {
|
||||
image: [
|
||||
['image', ['resizeFull', 'resizeHalf', 'resizeQuarter', 'resizeNone']],
|
||||
['float', ['floatLeft', 'floatRight', 'floatNone']],
|
||||
['remove', ['removeMedia']],
|
||||
['custom', ['imageTitle']],
|
||||
],
|
||||
},
|
||||
callbacks :{
|
||||
onInit: function() {
|
||||
// $(this).data('image_dialog_images_html', '<div class="row"..');
|
||||
$(this).data('image_dialog_images_url', "/iq/content/assets/modal");
|
||||
$(this).data('image_dialog_title', "Medien");
|
||||
$(this).data('image_dialog_close_btn_text', "schließen");
|
||||
$(this).data('image_dialog_ok_btn_text', "Einfügen");
|
||||
}
|
||||
},
|
||||
/*
|
||||
callbacks: {
|
||||
onPaste: function (e) {
|
||||
|
|
@ -214,33 +272,51 @@
|
|||
}
|
||||
*/
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.summernote-small').summernote({
|
||||
height: 150,
|
||||
tabsize: 2,
|
||||
followingToolbar: true,
|
||||
imageTitle: {
|
||||
specificAltField: true,
|
||||
},
|
||||
toolbar: [
|
||||
['style', ['style']],
|
||||
['font', ['bold', 'italic', 'underline', 'clear']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['extensions', ['gallery']],
|
||||
['insert', ['link', 'picture', 'video', 'hr']],
|
||||
['view', ['fullscreen', 'codeview']],
|
||||
['help', ['help']]
|
||||
],
|
||||
popover: {
|
||||
image: [
|
||||
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
|
||||
['float', ['floatLeft', 'floatRight', 'floatNone']],
|
||||
['remove', ['removeMedia']],
|
||||
['custom', ['imageTitle']],
|
||||
],
|
||||
},
|
||||
callbacks :{
|
||||
onInit: function() {
|
||||
// $(this).data('image_dialog_images_html', '<div class="row"..');
|
||||
$(this).data('image_dialog_images_url', "/iq/content/assets/modal");
|
||||
$(this).data('image_dialog_title', "Medien");
|
||||
$(this).data('image_dialog_close_btn_text', "Fermer");
|
||||
$(this).data('image_dialog_ok_btn_text', "Ajouter");
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
//save in the codeview
|
||||
$('.note-codable').on('blur', function() {
|
||||
var codeviewHtml = $(this).val();
|
||||
var $summernoteTextarea = $(this).closest('.note-editor').siblings('textarea');
|
||||
$summernoteTextarea.val(codeviewHtml);
|
||||
});
|
||||
});
|
||||
|
||||
jQuery.each(jQuery('textarea.autoExpand'), function() {
|
||||
var offset = this.offsetHeight - this.clientHeight;
|
||||
var resizeTextarea = function(el) {
|
||||
jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset);
|
||||
};
|
||||
jQuery(this).on('keyup input', function() { resizeTextarea(this); }).removeClass('autoExpand');
|
||||
resizeTextarea(this);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue