laravel - Linking elFinder stylesheet and JavaScript -
i have problem importing laravel elfinder.
when use normal links:
<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/smoothness/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" ></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="/laravel4_test2/public/filemanager1/css/elfinder.min.css"> <script type="text/javascript" src="/laravel4_test2/public/filemanager1/js/elfinder.min.js"></script> <!-- mac os x finder style jquery ui smoothness theme (optional) --> <link rel="stylesheet" type="text/css" media="screen" href="/laravel4_test2/public/filemanager1/css/theme.css"> <script type="text/javascript" src="/laravel4_test2/public/filemanager1/js/i18n/elfinder.nl.js"></script>
everything works on localhost.
but when move app online sever. stops working :(
as first attempt fix error tried converting import laravel code. filmanager not work locally anymore :( code:
<!-- elfinder imports --> {{html::style('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/smoothness/jquery-ui.css', array('type' => 'text/css'))}} {{html::script('http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', array('type' => 'text/javascript'))}} {{html::script('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js', array('type' => 'text/javascript'))}} {{html::style('laravel4_test2/public/filemanager1/css/elfinder.min.css', array('type' => 'text/css'))}} {{html::script('laravel4_test2/public/js/elfinder.min.js', array('type' => 'text/javascript'))}} <!-- mac os x finder style jquery ui smoothness theme (optional) --> {{html::style('laravel4_test2/public/filemanager1/css/theme.css', array('type' => 'text/css'))}} {{html::script('laravel4_test2/public/filemanager1/js/i18n/elfinder.nl.js', array('media' => 'screen'))}}
can see serror in code?
it depends on application in server.
you pointing files in
laravel4_test2/public/
is way access application in server? point browser
http://domain.com/laravel4_test2/public/
to home page? if point browser
http://domain.com/
then have drop in links too:
{{html::style('filemanager1/css/theme.css', array('type' => 'text/css'))}}
having correct laravel installation, virtualhost , .htaccess correctly configured drop /public/index.php links, way should using elfinder:
<html> {{html::style('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/smoothness/jquery-ui.css', array('media' => 'screen'))}} {{html::script('http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', array('type' => 'text/javascript'))}} {{html::script('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js', array('type' => 'text/javascript'))}} {{html::style('filemanager1/css/elfinder.min.css', array('media' => 'screen'))}} {{html::script('filemanager1/js/elfinder.min.js', array('type' => 'text/javascript'))}} {{html::style('filemanager1/css/theme.css', array('media' => 'screen'))}} <body> elfinder <!-- element elfinder created (required) --> <div id="elfinder"></div> <script type="text/javascript" charset="utf-8"> $().ready(function() { var elf = $('#elfinder').elfinder({ // lang: 'ru', // language (optional) url : 'filemanager1/php/connector.php' // connector url (required) }).elfinder('instance'); }); </script> </body> </html>
Comments
Post a Comment