Coder Social home page Coder Social logo

grails-elfinder-connector's People

Contributors

burtbeckwith avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

grails-elfinder-connector's Issues

rootDir definition in external config file

I want to define the grails.plugin.elfinder.rootDir path in an external config file.
I have developed my Grails application, and I've installed the elfinder plugin and the connector.
I've used the following in Config.groovy:

def ENV_NAME = "PROPERTIES_PATH"
if(!grails.config.location || !(grails.config.location instanceof List)) {
    grails.config.location = []
}
if(System.getenv(ENV_NAME)) {
    println "Including configuration file specified in environment: " + System.getenv(ENV_NAME);
    grails.config.location << "file:" + System.getenv(ENV_NAME)
    println(grails.config.location)

} else if(System.getProperty(ENV_NAME)) {
    println "Including configuration file specified on command line: " + System.getProperty(ENV_NAME);
    grails.config.location << "file:" + System.getProperty(ENV_NAME)
    println(grails.config.location)

} else {
    println "No external configuration file defined."
}

And I've created the file appName-config.groovy, in which I have the following:
grails.plugin.elfinder.rootDir = "/home/francesco/docm_patients_doc/{patientcf}/"

At application startup, Ive the following exception:
grails.plugin.elfinder.rootDir is not configured

folder path cache problem

the # numbers generated by the plugin i.e. on main folder it's allway "index#elf_v1_cm9vdA" as you drill down the tree # number changes i.e. "index#elf_v1_U3VibWlzc2lvbg". when I exit the page and come back to it the # number remain the same where I left it "index#elf_v1_U3VibWlzc2lvbg" which is cool until the folder is deleted or rename by someone else. example when folder is deleted the error:

ERROR| ERROR elfinderdemo.ExtDocSubmissionController - Error encountered while executing command elfinderParentsCommand
Message: \src\Main\CUEL-3\CUEL-JKCZ-1346\Submission
(Submission folder was deleted)

Also I am generating dynamic path string
def createPath = 'src/Main/'+ getRecord.name+'/'+ getRecord.filetype
elfinderFileManager.root = createPath

this works well but if I don't click the main folder every time before exit it throws the same error.
so before I exit any elfinder page I should make the # number to #elf_v1_cm9vdA to avoid error.

any chance I could make the plugin to stop remembering # number at exit? meaning make the # number #elf_v1_cm9vdA every time I revisit the page?

elFinder is not a function

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.