grails elfinder插件:预览不起作用 [英] grails elfinder plugin: preview does not work

查看:99
本文介绍了grails elfinder插件:预览不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在grails项目中使用了elfinder插件,但是预览时遇到了问题.实际上,如果我选择一个图像(gif,png,jpeg)并尝试预览,则只会看到一个黑色的窗口. 关于如何解决这个问题有什么建议吗?

I'm using elfinder plugin in my grails project, but I have problems with preview. Infact, if I select one image (gif, png, jpeg) and I try to preview it, I only see a black window. Any suggestion about how to solve this problem?

推荐答案

经过数小时的挖掘,最终获得了预期的结果.

After several hours of digging finally got the desired result.

问题的出现顺序为js包含.以下是我的工作 gsp页面

Problem is with the order of js inclusion. Following is my working gsp page

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/smoothness/jquery-ui.css"/>
    <link rel="stylesheet" type="text/css" href="http://elfinder.org/demo/css/elfinder.min.css"/>
</head>

<body>
    <div id="elfinder"></div>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"></script>
    <script src="http://elfinder.org/demo/js/elfinder.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var elf = $('#elfinder').elfinder({
                url: '${g.createLink(controller: 'elfinderConnector')}'
            }).elfinder('instance');
        });
    </script>
</body>
</html>

Ref:-问题包括elFinder和JQuery UI

您可以从我的git存储库中获取可用的grails应用程序: elFinder演示@GIT

这篇关于grails elfinder插件:预览不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆