first commit

This commit is contained in:
ericli1018
2024-03-13 10:43:39 +08:00
commit 1caae33c43
677 changed files with 105611 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{{-- This file is used for menu items by any Backpack v6 theme --}}
{{--
@include('backpack.language-switcher::language-switcher', [
'flags' => true,
'main_label' => true,
])
<x-backpack::menu-separator />
--}}
<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('backend.account.user.title')" icon="la la-users" :link="backpack_url('user')" />
<x-backpack::menu-item :title="trans('backpack::crud.file_manager')" icon="la la-files-o" :link="backpack_url('elfinder')" />
<x-backpack::menu-item :title="trans('backend.home_carousel.title')" icon="la la-question" :link="backpack_url('home-carousel')" />
<x-backpack::menu-dropdown :title="trans('backend.news.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.news.catalog.title')" icon="la la-question" :link="backpack_url('news-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.news.content.title')" icon="la la-question" :link="backpack_url('news')" />
</x-backpack::menu-dropdown>
<x-backpack::menu-dropdown :title="trans('backend.event.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.event.catalog.title')" icon="la la-question" :link="backpack_url('event-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.event.content.title')" icon="la la-question" :link="backpack_url('event')" />
</x-backpack::menu-dropdown>
<x-backpack::menu-dropdown :title="trans('backend.product.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.product.catalog.title')" icon="la la-question" :link="backpack_url('product-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.product.application.title')" icon="la la-question" :link="backpack_url('product-application')" />
<x-backpack::menu-dropdown-item :title="trans('backend.product.content.title')" icon="la la-question" :link="backpack_url('product')" />
</x-backpack::menu-dropdown>
<x-backpack::menu-dropdown :title="trans('backend.support.title')" icon="la la-question">
<x-backpack::menu-dropdown-item :title="trans('backend.support.technical.title')" icon="la la-question" :link="backpack_url('support-technical')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.sales_inquiry.title')" icon="la la-question" :link="backpack_url('support-sale')" />
<x-backpack::menu-dropdown-header :title="trans('backend.support.distribution_partner.title')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.distribution_partner.catalog.title')" icon="la la-question" :link="backpack_url('support-distribution-partner-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.distribution_partner.content.title')" icon="la la-question" :link="backpack_url('support-distribution-partner')" />
<x-backpack::menu-dropdown-header :title="trans('backend.support.ecosystem_partner.title')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.ecosystem_partner.catalog.title')" icon="la la-question" :link="backpack_url('support-ecosystem-partner-catalog')" />
<x-backpack::menu-dropdown-item :title="trans('backend.support.ecosystem_partner.content.title')" icon="la la-question" :link="backpack_url('support-ecosystem-partner')" />
</x-backpack::menu-dropdown>

View File

@ -0,0 +1,12 @@
<div id="cookies-box" class="js-cookie-consent cookie-consent">
<div class="container">
<h4>Privacy and Cookies Policy</h4>
<div class="d-lg-flex">
<p>
This website uses cookies to improve your user experience and collect data related to network traffic. By continuing to use this site you agree to our use of cookies. <br />Our <a href="/member-privacy-policy" target="_blank">Privacy and Cookie Policy</a> provides more information on the use and deactivation of cookies.
</p>
<div class="cookies-btn"><a class="js-cookie-consent-agree cookie-consent__agree">Accept</a></div>
</div>
</div>
</div>

View File

@ -0,0 +1,56 @@
@if($cookieConsentConfig['enabled'] && ! $alreadyConsentedWithCookies)
@include('cookie-consent::dialogContents')
<script>
window.laravelCookieConsent = (function () {
const COOKIE_VALUE = 1;
const COOKIE_DOMAIN = '{{ config('session.domain') ?? request()->getHost() }}';
function consentWithCookies() {
setCookie('{{ $cookieConsentConfig['cookie_name'] }}', COOKIE_VALUE, {{ $cookieConsentConfig['cookie_lifetime'] }});
hideCookieDialog();
}
function cookieExists(name) {
return (document.cookie.split('; ').indexOf(name + '=' + COOKIE_VALUE) !== -1);
}
function hideCookieDialog() {
const dialogs = document.getElementsByClassName('js-cookie-consent');
for (let i = 0; i < dialogs.length; ++i) {
dialogs[i].style.display = 'none';
}
}
function setCookie(name, value, expirationInDays) {
const date = new Date();
date.setTime(date.getTime() + (expirationInDays * 24 * 60 * 60 * 1000));
document.cookie = name + '=' + value
+ ';expires=' + date.toUTCString()
+ ';domain=' + COOKIE_DOMAIN
+ ';path=/{{ config('session.secure') ? ';secure' : null }}'
+ '{{ config('session.same_site') ? ';samesite='.config('session.same_site') : null }}';
}
if (cookieExists('{{ $cookieConsentConfig['cookie_name'] }}')) {
hideCookieDialog();
}
const buttons = document.getElementsByClassName('js-cookie-consent-agree');
for (let i = 0; i < buttons.length; ++i) {
buttons[i].addEventListener('click', consentWithCookies);
}
return {
consentWithCookies: consentWithCookies,
hideCookieDialog: hideCookieDialog
};
})();
</script>
@endif

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>