Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elFinder is not a function #4

Open
ghost opened this issue Jun 11, 2018 · 0 comments
Open

elFinder is not a function #4

ghost opened this issue Jun 11, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 11, 2018

Installed this plugin in my Grails 2.3.11 app. When I view the page with elFinder, I get a JS error saying "TypeError: $(...).elfinder is not a function"

Here are other errors I get:
"Uncaught SyntaxError: Unexpected token <" index.gsp: 1
"Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://studio-42.github.io/elFinder/". index:21

Here is my index.gsp from my code editor:

<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <title>File manager</title>
    <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 type="text/javascript" src="http://elfinder.org/demo/js/elfinder.min.js"></script>
<script type="text/javascript">
    $().ready(function() {
        var elf = $('#elfinder').elfinder({
            url: '${g.createLink(controller: 'elfinderConnector')}'
        }).elfinder('instance');
    });
</script>
</body>

</html>

And here it is in when viewed with Chrome Developer Tools:

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>File manager</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="/testapp/static/images/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon" href="/testapp/static/images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/testapp/static/images/apple-touch-icon-retina.png">
    <link rel="stylesheet" href="/testapp/static/css/main.css" type="text/css">
    <link rel="stylesheet" href="/testapp/static/css/mobile.css" type="text/css">
    
    <meta name="layout" content="main"/>
    
    <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="grailsLogo" role="banner"><a href="http://grails.org"><img
        src="/testapp/static/images/grails_logo.png" alt="Grails"/></a></div>

<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 type="text/javascript" src="http://elfinder.org/demo/js/elfinder.min.js"></script>
<script type="text/javascript">
    $().ready(function() {
        var elf = $('#elfinder').elfinder({
            url: '/testapp/elfinderConnector/index'
        }).elfinder('instance');
    });
</script>

<div class="footer" role="contentinfo"></div>

<div id="spinner" class="spinner" style="display:none;">Loading&hellip;</div>

</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants