Open dbr0 opened 8 years ago
I change a little source code standalonepopup
in my view when using standalonepopup
<script type="text/javascript">
var elfinderUrl = "{{ route('elfinder.popup', ['thumbnail']) }}";
</script>
<script type='text/javascript' src='{{ asset('packages/barryvdh/elfinder/js/standalonepopup.js') }}'></script>
in standalonepopup.js if view set to publish
$(document).on('click','.popup_selector',function (event) {
event.preventDefault();
// var triggerUrl = elfinderUrl + updateID;
var triggerUrl = ( typeof elfinderUrl !== 'undefined' ) ? elfinderUrl : '';
$.colorbox({
open: true,
href: triggerUrl,
fastIframe: true,
iframe: true,
width: '70%',
height: '50%',
});
$(window).resize(function () {
$(".colorbox").colorbox.resize({
width: "70%",
height: "50%"
});
});
});
Hi, first of all thanks for this great piece of code.
I'm using the elfinder in my Larvel app with ckeditor and all is working fine. I need to fine tune it some more but for the amount of energy I put into it I think its ok.
I'm having "problem" using elfinder in standalone popup with colorbox. It's all working good but I have changed my default route prefix in
myapp\config\elfinder.php
fromelfinder
tosome-other-prefix
. The problem arises because in thestandalonepopup.js
the elfinder url is defined asvar elfinderUrl = '/elfinder/popup/';
so I need to manually change this tovar elfinderUrl = '/some-other-prefix/popup/';
. And now I have to manually change it every time that file updates (and if I'm getting this thing right this will happen whenever I update composer).