Skip to content

Commit 5249868

Browse files
committed
deal with the lack of a yui_css|js filter
1 parent 232ab91 commit 5249868

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
{% stylesheets output='assetic/css/compiled/fmelfinder/main.css'
6+
'bundles/fmelfinder/css/*' filter='cssrewrite' %}
7+
<link rel="stylesheet" href="{{ asset_url }}" />
8+
{% endstylesheets %}
9+
</head>
10+
<body>
11+
{% javascripts output='assetic/js/compiled/fmelfinder/main.js'
12+
'@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js'
13+
'@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js'
14+
'@FMElfinderBundle/Resources/public/js/elfinder.min.js'
15+
'@FMElfinderBundle/Resources/public/js/i18n/*'
16+
%}
17+
<script src="{{ asset_url }}"></script>
18+
{% endjavascripts %}
19+
20+
<script type="text/javascript" charset="utf-8">
21+
function getUrlParam(paramName) {
22+
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ;
23+
var match = window.location.search.match(reParam) ;
24+
25+
return (match && match.length > 1) ? match[1] : '' ;
26+
}
27+
$().ready(function() {
28+
var funcNum = getUrlParam('CKEditorFuncNum');
29+
var mode = getUrlParam('mode');
30+
31+
var f = $('#elfinder').elfinder({
32+
url : '{{path('ef_connect')}}'+'?mode='+mode,
33+
lang : '{{locale}}',
34+
getFileCallback : function(file) {
35+
if (funcNum) {
36+
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
37+
window.close();
38+
}
39+
}
40+
});
41+
42+
{% if fullscreen %}
43+
$(window).resize(function(){
44+
var h = $(window).height();
45+
46+
if($('#elfinder').height() != h - 20){
47+
$('#elfinder').height(h -20).resize();
48+
}
49+
});
50+
{% endif %}
51+
});
52+
</script>
53+
<div id="elfinder"></div>
54+
</body>
55+
</html>
56+
57+
58+

0 commit comments

Comments
 (0)