WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => jQuery => Topic started by: heriberthusten on January 18, 2011, 11:09:11 PM

Title: jquery file tree plugin
Post by: heriberthusten on January 18, 2011, 11:09:11 PM
is there any way to integrate the jqery file tree plugin (http://abeautifulsite.net/blog/2008/03/jquery-file-tree/#download)? it needs a php connctor, so im not quite sure how to implement it....
Title: Re: jquery file tree plugin
Post by: jrast on January 19, 2011, 12:18:16 AM
It should be possible. I think the easiest way is to include it in the jqueryadmin-module.

Of course needs this script also a connection to the serverside to get all the Informations about the Folder and Files! Have a look at the example php file wich is included in the download.

How this file looks like depends on what you want to do exactly.
Title: Re: jquery file tree plugin
Post by: heriberthusten on January 19, 2011, 12:56:14 PM
Thank you! I will try that.



Title: Re: jquery file tree plugin
Post by: heriberthusten on January 19, 2011, 01:53:24 PM
jqueryadmin module is not really an option as it is just applied to the frontend output and i need the functions within a backend module for usercomfort. i edited the header.htt manualy now, which seems to work to this point.
Title: Re: jquery file tree plugin
Post by: heriberthusten on January 19, 2011, 02:54:50 PM
still not working... my header.htt now looks like this and in the output html everything seems to be allright...
a div with the id also exists as well as every loaded js file...

Code: [Select]
<!-- BEGIN header_block -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{WEBSITE_TITLE}&raquo;{TEXT_ADMINISTRATION}-{SECTION_NAME}</title>
<meta http-equiv="content-type" content="text/html; charset={CHARSET}" />
<meta http-equiv="content-language" content="{LANGUAGE}" />
<meta name="description" content="{TEXT_ADMINISTRATION}" />
<meta name="keywords" content="{TEXT_ADMINISTRATION}" />
<link href="{THEME_URL}/theme.css" rel="stylesheet" type="text/css" />
<!--
<link href="{WB_URL}/include/jquery/jquery-ui.css" rel="stylesheet" type="text/css" />
-->
<link href="{WB_URL}/include/filetree/filetree.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="[url]/jquery.easing.js"></script>
<script src="{WB_URL}/include/filetree/filetree.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready( function() {
    $('#picture_browser').fileTree({
        root: 'url/',
        script: 'url/connectors/jqueryFileTree.php',
        expandSpeed: 1000,
        collapseSpeed: 1000,
        multiFolder: false
    }, function(file) {
        alert(file);
    });

});

...
...
</script>

Title: Re: jquery file tree plugin
Post by: BlackBird on January 19, 2011, 04:58:21 PM
jqueryadmin module is not really an option as it is just applied to the frontend output and i need the functions within a backend module for usercomfort.

jQueryAdmin can add jQuery to Backend modules, too. I use it for my Backend modules very often. For German instructions, see http://www.webing.de/webbird/WebsiteBaker/JQueryAdminBackend