Skip to content

Commit 6e33482

Browse files
committed
added style for elfinder iframe and made sure popup windows don't have scrollbar
1 parent 4b0e7ff commit 6e33482

File tree

7 files changed

+87
-16
lines changed

7 files changed

+87
-16
lines changed

src/resources/views-elfinder/ckeditor4.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>elFinder 2.0</title>
5+
<title>elFinder 2.0 - CKEditor</title>
66

77
<!-- jQuery and jQuery UI (REQUIRED) -->
88
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
@@ -21,7 +21,7 @@
2121
?>
2222
<!-- elFinder translation (OPTIONAL) -->
2323
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
24-
<?php
24+
<?php
2525
} ?>
2626

2727
<!-- elFinder initialization (REQUIRED) -->
@@ -39,11 +39,11 @@ function getUrlParam(paramName) {
3939

4040
var elf = $('#elfinder').elfinder({
4141
// set your elFinder options here
42-
resizable: false,
42+
resizable: false,
4343
<?php if ($locale) {
4444
?>
4545
lang: '<?= $locale ?>', // locale
46-
<?php
46+
<?php
4747
} ?>
4848
customData: {
4949
_token: '<?= csrf_token() ?>'

src/resources/views-elfinder/elfinder.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
File manager
4545
</h1>
4646
<ol class="breadcrumb">
47-
<li><a href="{{ url('admin') }}">Admin</a></li>
47+
<li><a href="{{ url(config('backpack.base.route_prefix')) }}">Admin</a></li>
4848
<li class="active">File Manager</li>
4949
</ol>
5050
</section>

src/resources/views-elfinder/filepicker.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>elFinder 2.0</title>
5+
<title>elFinder 2.0 - File Picker</title>
66

77
<!-- jQuery and jQuery UI (REQUIRED) -->
88
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css">
@@ -21,7 +21,7 @@
2121
?>
2222
<!-- elFinder translation (OPTIONAL) -->
2323
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
24-
<?php
24+
<?php
2525
} ?>
2626
<!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
2727

@@ -39,7 +39,7 @@
3939
<?php if ($locale) {
4040
?>
4141
lang: '<?= $locale ?>', // locale
42-
<?php
42+
<?php
4343
} ?>
4444
customData: {
4545
_token: '<?= csrf_token() ?>'
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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>

src/resources/views-elfinder/tinymce.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html>
44
<head>
55
<meta charset="utf-8">
6-
<title>elFinder 2.0</title>
6+
<title>elFinder 2.0 - TinyMCE</title>
77

88
<!-- jQuery and jQuery UI (REQUIRED) -->
99
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
@@ -25,7 +25,7 @@
2525
?>
2626
<!-- elFinder translation (OPTIONAL) -->
2727
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
28-
<?php
28+
<?php
2929
} ?>
3030

3131

@@ -66,7 +66,7 @@
6666
<?php if ($locale) {
6767
?>
6868
lang: '<?= $locale ?>', // locale
69-
<?php
69+
<?php
7070
} ?>
7171
customData: {
7272
_token: '<?= csrf_token() ?>'

src/resources/views-elfinder/tinymce4.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>elFinder 2.0</title>
5+
<title>elFinder 2.0 - TinyMCE4</title>
66

77
<!-- jQuery and jQuery UI (REQUIRED) -->
88
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
@@ -21,7 +21,7 @@
2121
?>
2222
<!-- elFinder translation (OPTIONAL) -->
2323
<script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
24-
<?php
24+
<?php
2525
} ?>
2626

2727
<!-- elFinder initialization (REQUIRED) -->
@@ -46,7 +46,7 @@
4646
<?php if ($locale) {
4747
?>
4848
lang: '<?= $locale ?>', // locale
49-
<?php
49+
<?php
5050
} ?>
5151
customData: {
5252
_token: '<?= csrf_token() ?>'

src/resources/views/fields/browse.blade.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
@push('crud_fields_styles')
3737
<!-- include browse server css -->
3838
<link href="{{ asset('vendor/backpack/colorbox/example2/colorbox.css') }}" rel="stylesheet" type="text/css" />
39+
<style>
40+
#cboxContent, #cboxLoadedContent, .cboxIframe {
41+
background: transparent;
42+
}
43+
</style>
3944
@endpush
4045

4146
@push('crud_fields_scripts')
@@ -57,8 +62,8 @@
5762
href: triggerUrl,
5863
fastIframe: true,
5964
iframe: true,
60-
width: '70%',
61-
height: '50%'
65+
width: '80%',
66+
height: '80%'
6267
});
6368
});
6469

0 commit comments

Comments
 (0)