|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <title>elFinder 2.0 - Standalone Popup</title> |
| 6 | + |
| 7 | + <!-- jQuery and jQuery UI (REQUIRED) --> |
| 8 | + <link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css"> |
| 9 | + <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> |
| 10 | + <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> |
| 11 | + |
| 12 | + <!-- elFinder CSS (REQUIRED) --> |
| 13 | + <link rel="stylesheet" type="text/css" href="<?= asset($dir . '/css/elfinder.min.css') ?>"> |
| 14 | + <!-- <link rel="stylesheet" type="text/css" href="<?= asset($dir . '/css/theme.css') ?>"> --> |
| 15 | + <link rel="stylesheet" type="text/css" href="<?= asset('vendor/backpack/elfinder/elfinder.backpack.theme.css') ?>"> |
| 16 | + |
| 17 | + <!-- elFinder JS (REQUIRED) --> |
| 18 | + <script src="<?= asset($dir . '/js/elfinder.min.js') ?>"></script> |
| 19 | + |
| 20 | + <?php if ($locale) |
| 21 | + { ?> |
| 22 | + <!-- elFinder translation (OPTIONAL) --> |
| 23 | + <script src="<?= asset($dir . "/js/i18n/elfinder.$locale.js") ?>"></script> |
| 24 | + <?php } ?> |
| 25 | + <!-- Include jQuery, jQuery UI, elFinder (REQUIRED) --> |
| 26 | + |
| 27 | + <script type="text/javascript"> |
| 28 | + $().ready(function () { |
| 29 | + var elf = $('#elfinder').elfinder({ |
| 30 | + // set your elFinder options here |
| 31 | + <?php if($locale){ ?> |
| 32 | + lang: '<?= $locale ?>', // locale |
| 33 | + <?php } ?> |
| 34 | + customData: { |
| 35 | + _token: '<?= csrf_token() ?>' |
| 36 | + }, |
| 37 | + url: '<?= route("elfinder.connector") ?>', // connector URL |
| 38 | + dialog: {width: 900, modal: true, title: 'Select a file'}, |
| 39 | + resizable: false, |
| 40 | + commandsOptions: { |
| 41 | + getfile: { |
| 42 | + oncomplete: 'destroy' |
| 43 | + } |
| 44 | + }, |
| 45 | + getFileCallback: function (file) { |
| 46 | + window.parent.processSelectedFile(file.path, '<?= $input_id?>'); |
| 47 | + parent.jQuery.colorbox.close(); |
| 48 | + } |
| 49 | + }).elfinder('instance'); |
| 50 | + }); |
| 51 | + $(window).resize(function(){ |
| 52 | + var h = ($(window).height())-2; |
| 53 | + if($('#elfinder').height() != h){ |
| 54 | + $('#elfinder').height(h).resize(); |
| 55 | + } |
| 56 | + }); |
| 57 | + </script> |
| 58 | + |
| 59 | + |
| 60 | +</head> |
| 61 | +<body class="elfinder"> |
| 62 | +<!-- Element where elFinder will be created (REQUIRED) --> |
| 63 | +<div id="elfinder"></div> |
| 64 | + |
| 65 | +</body> |
| 66 | +</html> |
0 commit comments