first commit

This commit is contained in:
ericli1018
2025-06-13 12:36:48 +08:00
commit 0475d9de8e
167 changed files with 20145 additions and 0 deletions

0
resources/css/app.css Normal file
View File

1
resources/js/app.js Normal file
View File

@ -0,0 +1 @@
import './bootstrap';

32
resources/js/bootstrap.js vendored Normal file
View File

@ -0,0 +1,32 @@
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo';
// import Pusher from 'pusher-js';
// window.Pusher = Pusher;
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: import.meta.env.VITE_PUSHER_APP_KEY,
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
// enabledTransports: ['ws', 'wss'],
// });

View File

@ -0,0 +1,16 @@
{{-- This file is used for menu items by any Backpack v6 theme --}}
<li class="nav-item"><a class="nav-link" href="{{ backpack_url('dashboard') }}"><i class="la la-home nav-icon"></i> {{ trans('backpack::base.dashboard') }}</a></li>
<!--
<x-backpack::menu-item title="{{ trans('backpack::base.accounts.users') }}" icon="la la-users" :link="backpack_url('user')" />
-->
<x-backpack::menu-dropdown title="{{ trans('backpack::base.accounts.title') }}" icon="la la-users">
<x-backpack::menu-dropdown-header title="Authentication" />
<x-backpack::menu-dropdown-item title="{{ trans('backpack::base.accounts.users') }}" icon="la la-user" :link="backpack_url('user')" />
<x-backpack::menu-dropdown-item title="{{ trans('backpack::base.accounts.roles') }}" icon="la la-group" :link="backpack_url('role')" />
<x-backpack::menu-dropdown-item title="{{ trans('backpack::base.accounts.permissions') }}" icon="la la-key" :link="backpack_url('permission')" />
</x-backpack::menu-dropdown>
<x-backpack::menu-item title="Demo catalogs" icon="la la-question" :link="backpack_url('demo-catalogs')" />
<x-backpack::menu-item :title="trans('backpack::crud.file_manager')" icon="la la-files-o" :link="backpack_url('elfinder')" />
<x-backpack::menu-item title="News catalogs" icon="la la-question" :link="backpack_url('news-catalog')" />
<x-backpack::menu-item title="News" icon="la la-question" :link="backpack_url('news')" />

View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Helper function to get parameters from the query string.
function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
var match = window.location.search.match(reParam) ;
return (match && match.length > 1) ? match[1] : '' ;
}
$().ready(function() {
var funcNum = getUrlParam('CKEditorFuncNum');
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback : function(file) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
window.close();
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Helper function to get parameters from the query string.
function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
var match = window.location.search.match(reParam) ;
return (match && match.length > 1) ? match[1] : '' ;
}
$().ready(function() {
var funcNum = getUrlParam('CKEditorFuncNum');
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback : function(file) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
window.close();
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,21 @@
{{-- jQuery (REQUIRED) --}}
@if (!isset ($jquery) || (isset($jquery) && $jquery == true))
@basset('https://unpkg.com/jquery@3.6.4/dist/jquery.min.js')
@endif
{{-- jQuery UI and Smoothness theme --}}
@bassetArchive('https://github.com/jquery/jquery-ui/archive/refs/tags/1.13.2.tar.gz', 'jquery-ui-1.13.2')
@basset('jquery-ui-1.13.2/jquery-ui-1.13.2/dist/themes/smoothness/jquery-ui.min.css')
@basset('jquery-ui-1.13.2/jquery-ui-1.13.2/dist/jquery-ui.min.js')
{{-- elFinder JS (REQUIRED) --}}
@bassetArchive('https://github.com/Studio-42/elFinder/archive/refs/tags/2.1.62.tar.gz', 'elfinder-2.1.62')
@basset('elfinder-2.1.62/elFinder-2.1.62/js/elfinder.min.js')
{{-- elFinder translation (OPTIONAL) --}}
@if($locale)
@basset('https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.62/js/i18n/elfinder.'.$locale.'.min.js')
@endif
{{-- elFinder sounds --}}
@basset(base_path('vendor/studio-42/elfinder/sounds/rm.wav'))

View File

@ -0,0 +1,89 @@
<meta charset="utf-8">
<title>File Manager</title>
{{-- elFinder CSS (REQUIRED) --}}
@php
$themeStylesheetVersion = '3.0.0';
@endphp
@bassetArchive('https://github.com/Studio-42/elFinder/archive/refs/tags/2.1.62.tar.gz', 'elfinder-2.1.62')
@basset('elfinder-2.1.62/elFinder-2.1.62/css/elfinder.min.css')
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/css/theme.min.css')
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/images/loading.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.eot', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/images/icons-big.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/images/icons-small.svg', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.woff', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.ttf', false)
@basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/font/material.woff2', false)
@bassetBlock('elfinderThemeSwitcherScript.js')
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
function getElfinderStyleSheet(main = true) {
let themeStylesheetVersion = '{{$themeStylesheetVersion}}';
const regex = new RegExp(main ? `RobiNN1\/elFinder-Material-Theme@${themeStylesheetVersion}\/Material\/css\/theme\.min\.css` : `RobiNN1\/elFinder-Material-Theme@${themeStylesheetVersion}\/Material\/css\/theme-gray\.min\.css`);
const linkElements = document.querySelectorAll('link[rel="stylesheet"]');
// Find the main elfinder stylesheet
let selectedLinkElement;
for (const linkElement of linkElements) {
if (regex.test(linkElement.href)) {
selectedLinkElement = linkElement;
break;
}
}
return selectedLinkElement;
}
function addElfinderLightStylesheet() {
let themeLightAsset = `{{ Basset::basset('https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme@'.$themeStylesheetVersion.'/Material/css/theme-gray.min.css') }}`;
const match = themeLightAsset.match(/<link\s+href="([^"]+)"/i);
if (match && match.length > 1) {
let mainStyleSheet = getElfinderStyleSheet();
let lightStyleSheet = getElfinderStyleSheet(false);
// if found append the light mode css to the main theme stylesheet
if (mainStyleSheet && ! lightStyleSheet) {
let themeLight = document.createElement('link');
themeLight.href = match[1];
themeLight.rel = 'stylesheet';
themeLight.type = 'text/css';
mainStyleSheet.insertAdjacentElement('afterend', themeLight);
}
}
}
let colorMode = window.parent.colorMode?.result ?? window.colorMode?.result ?? false;
if(colorMode !== 'dark') {
addElfinderLightStylesheet();
}
// register a color mode change event so that we remove
// the light stylesheet when the color mode change
if(colorMode) {
let colorModeClass = window.parent.colorMode ?? window.colorMode;
colorModeClass.onChange(function(scheme) {
let styleSheetType = scheme === 'dark' ? false : true;
let selectedLinkElement = getElfinderStyleSheet(styleSheetType);
if (! selectedLinkElement) {
return true;
}
// in case we switched to dark mode, remove the ligth theme css
if(scheme === 'dark') {
selectedLinkElement.parentNode.removeChild(selectedLinkElement);
return true;
}
addElfinderLightStylesheet()
});
}
// we dont want to style the body when elfinder is loaded as a component in a backpack view
// we pass true when loading elfinder inside an iframe to style the iframe body.
@if($styleBodyElement ?? false)
// use the topbar and footbar darker color as the background to ease transitions
document.getElementsByTagName('body')[0].style.background = '#061325';
document.getElementsByTagName('body')[0].style.opacity = 1;
@endif
});
</script>
@endBassetBlock

View File

@ -0,0 +1,47 @@
@extends(backpack_view('blank'))
@section('after_scripts')
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Documentation for client options:
// https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
$(document).ready(function() {
$('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url : '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
cssAutoLoad : false,
});
});
</script>
@endsection
@php
$breadcrumbs = [
trans('backpack::crud.admin') => url(config('backpack.base.route_prefix'), 'dashboard'),
trans('backpack::crud.file_manager') => false,
];
@endphp
@section('header')
<section class="container-fluid" bp-section="page-header">
<h1 bp-section="page-heading">{{ trans('backpack::crud.file_manager') }}</h1>
</section>
@endsection
@section('content')
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
@endsection

View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Documentation for client options:
// https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
$().ready(function() {
var theme = 'default';
$('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url : '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
});
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<script type="text/javascript">
$().ready(function () {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
resizable: false,
ui: ['toolbar', 'path','stat'],
onlyMimes: [{{ $mimeTypes }}],
rememberLastDir : false,
height: 300,
defaultView: 'list',
getFileCallback: function (file) {
window.parent.processSelectedFile(file, '{{ $input_id }}');
console.log(file);
},
uiOptions : {
// toolbar configuration
toolbar : [
['home', 'up'],
['upload'],
['quicklook'],
],
// directories tree options
tree : {
// expand current root on init
openRootOnLoad : true,
// auto load current dir parents
syncTree : true
},
// navbar options
navbar : {
minWidth : 150,
maxWidth : 500
},
// current working directory options
cwd : {
// display parent directory in listing as ".."
oldSchool : false
}
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body style="margin: 0;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
<script type="text/javascript">
$().ready(function () {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
resizable: false,
ui: ['toolbar', 'path','stat'],
onlyMimes: [<?= $mimeTypes ?>],
rememberLastDir : false,
height: 300,
defaultView: 'list',
getFileCallback: function (file) {
window.parent.processSelectedFile(file, '<?= $input_id?>');
console.log(file);
},
uiOptions : {
// toolbar configuration
toolbar : [
['home', 'up'],
['upload'],
['quicklook'],
],
// directories tree options
tree : {
// expand current root on init
openRootOnLoad : true,
// auto load current dir parents
syncTree : true
},
// navbar options
navbar : {
minWidth : 150,
maxWidth : 500
},
// current working directory options
cwd : {
// display parent directory in listing as ".."
oldSchool : false
}
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body style="margin: 0;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles', ['styleBodyElement' => true])
<style type="text/css">
.elfinder-workzone {
min-height: max-content !important;
}
#elfinder {
height: 100% !important;
width: 100% !important;
top:0;
left: 0;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
let elfinderConfig = {
cssAutoLoad : false,
speed: 100,
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
dialog: {width: 900, modal: true, title: 'Select a file'},
resizable: false,
onlyMimes: @json(unserialize(urldecode(request('mimes'))), JSON_UNESCAPED_SLASHES),
commandsOptions: {
getfile: {
multiple: {{ request('multiple') ? 'true' : 'false' }},
oncomplete: 'destroy'
}
},
getFileCallback: function (file) {
@if (request()->has('multiple') && request()->input('multiple') == 1)
window.parent.processSelectedMultipleFiles(file, '{{ $input_id }}');
@else
window.parent.processSelectedFile(file.path, '{{ $input_id }}');
@endif
window.parent.jQuery.colorbox.close();
},
};
var elf = $('#elfinder').elfinder(elfinderConfig);
document.getElementById('elfinder').style.opacity = 1;
});
</script>
</head>
<body style="margin:0;position:absolute;top:0;left:0;width:100%;height:100%;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder" style="position:absolute;top:0;left:0;width:100%;height:100%;"></div>
</body>
</html>

View File

@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
<script type="text/javascript">
$().ready(function () {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
dialog: {width: 900, modal: true, title: 'Select a file'},
resizable: false,
commandsOptions: {
getfile: {
oncomplete: 'destroy'
}
},
getFileCallback: function (file) {
window.parent.processSelectedFile(file.path, '<?= $input_id?>');
parent.jQuery.colorbox.close();
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- TinyMCE Popup class (REQUIRED) -->
<script type="text/javascript" src="{{ asset($dir.'/js/tiny_mce_popup.js') }}"></script>
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
var win = tinyMCEPopup.getWindowArg('window');
// pass selected file path to TinyMCE
win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = URL;
// are we an image browser?
if (typeof(win.ImageDialog) != 'undefined') {
// update image dimensions
if (win.ImageDialog.getImageData) {
win.ImageDialog.getImageData();
}
// update preview if necessary
if (win.ImageDialog.showPreviewImage) {
win.ImageDialog.showPreviewImage(URL);
}
}
// close popup window
tinyMCEPopup.close();
}
}
tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url : '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<!-- TinyMCE Popup class (REQUIRED) -->
<script type="text/javascript" src="<?= asset($dir.'/js/tiny_mce_popup.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
var win = tinyMCEPopup.getWindowArg('window');
// pass selected file path to TinyMCE
win.document.getElementById(tinyMCEPopup.getWindowArg('input')).value = URL;
// are we an image browser?
if (typeof(win.ImageDialog) != 'undefined') {
// update image dimensions
if (win.ImageDialog.getImageData) {
win.ImageDialog.getImageData();
}
// update preview if necessary
if (win.ImageDialog.showPreviewImage) {
win.ImageDialog.showPreviewImage(URL);
}
}
// close popup window
tinyMCEPopup.close();
}
}
tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url : '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles')
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
// pass selected file path to TinyMCE
parent.tinymce.activeEditor.windowManager.getParams().setUrl(URL);
// close popup window
parent.tinymce.activeEditor.windowManager.close();
}
}
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (URL) {
// pass selected file path to TinyMCE
parent.tinymce.activeEditor.windowManager.getParams().setUrl(URL);
// close popup window
parent.tinymce.activeEditor.windowManager.close();
}
}
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
@include('vendor.elfinder.common_scripts')
@include('vendor.elfinder.common_styles', ['styleBodyElement' => true])
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
$(document).ready(function () {
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (file) {
window.parent.postMessage({
mceAction: 'fileSelected',
data: {
file: file
}
}, '*');
}
};
let elfinderConfig = {
cssAutoLoad : false,
speed: 100,
// set your elFinder options here
@if($locale)
lang: '{{ $locale }}', // locale
@endif
customData: {
_token: '{{ csrf_token() }}'
},
url: '{{ route("elfinder.connector") }}', // connector URL
soundPath: '{{ Basset::getUrl(base_path("vendor/studio-42/elfinder/sounds")) }}',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file); // pass selected file path to TinyMCE
},
height: $(window).height()
};
var elf = $('#elfinder').elfinder(elfinderConfig);
document.getElementById('elfinder').style.opacity = 1;
});
</script>
</head>
<body style="margin:0;top:0;left:0;bottom:0;width:100%;height:100%;">
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

View File

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html lang="<?= app()->getLocale() ?>">
<head>
<meta charset="utf-8">
<title>elFinder 2.0</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>">
<!-- elFinder JS (REQUIRED) -->
<script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
<?php if ($locale) { ?>
<!-- elFinder translation (OPTIONAL) -->
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
<?php } ?>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript">
var FileBrowserDialogue = {
init: function() {
// Here goes your code for setting your custom things onLoad.
},
mySubmit: function (file) {
window.parent.postMessage({
mceAction: 'fileSelected',
data: {
file: file
}
}, '*');
}
};
$().ready(function() {
var theme = 'default';
var elf = $('#elfinder').elfinder({
// set your elFinder options here
<?php if ($locale) { ?>
lang: '<?= $locale ?>', // locale
<?php } ?>
customData: {
_token: '<?= csrf_token() ?>'
},
url: '<?= route('elfinder.connector') ?>', // connector URL
soundPath: '<?= asset($dir.'/sounds') ?>',
getFileCallback: function(file) { // editor callback
FileBrowserDialogue.mySubmit(file); // pass selected file path to TinyMCE
},
themes: {
default : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-gray.json',
dark : 'https://cdn.jsdelivr.net/gh/RobiNN1/elFinder-Material-Theme/manifests/material-default.json',
},
theme: theme
},
function(fm, extraObj) {
fm.bind('open', function() {
setElFinderColorMode();
});
}).elfinder('instance');
function isElfinderInDarkMode() {
return typeof window.parent?.colorMode !== 'undefined' && window.parent.colorMode.result === 'dark';
}
function setElFinderColorMode() {
theme = isElfinderInDarkMode() ? 'dark' : 'default';
let instance = $('#elfinder').elfinder('instance');
instance.changeTheme(theme).storage('theme', theme);
}
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>

File diff suppressed because one or more lines are too long