Я пытаюсь внедрить файловый менеджер elFinder.
Это то, что я сделал. Включенные файлы:
$arr_css = array(
"main.css",
"jquery-ui.css",
"elfinder.min.css",
"theme.css"
);
$arr_js = array(
"jquery.js",
"main.js",
"jquery-ui.js",
"elfinder.min.js",
"elfinder.ru.js"
);
(main.js и main.css — это массивы, используемые для создания <link rel='stylesheet'>
и <script type='text/javascript'>
)
На моей главной странице есть
<div id='fileStructure'>
<div id="elfinder"> </div>
</div>
который я использую для инициализации elfinder:
$(document).ready(function() {
var elf = $('#elfinder').elfinder({
lang: 'ru', // language (OPTIONAL)
url : '/radio/elfinder-2.0-rc1/php/connector.php' // connector URL (REQUIRED)
}).elfinder('instance');
});
Это то, что у меня есть сейчас. Выглядит нормально, я могу создавать каталоги, файлы, могу их загружать. Но при попытке скопировать пишет:
Uncaught TypeError: undefined is not a functionelfinder.min.js:2841 elFinder.commands.copy.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
Та же ошибка и в других действиях, таких как вырезание, удаление и другие. Когда я смотрю в скрипт, я вижу, что ошибка в строке с
return a.each(this.files(b), function (a, b) {
if (!b.read || !b.phash) return !d.reject(["errCopy", b.name, "errPerm"])
}), d.isRejected() ? d : d.resolve(c.clipboard(this.hashes(b))
Я действительно не понимаю, почему это происходит, потому что структура для меня не ясна:
d = this
b = a(b)
а - параметр основной функции elfinder
(function (a) {
Кто-нибудь может помочь мне решить проблему? Может кто встречался с похожей проблемой? ОБНОВЛЕНИЕ
Uncaught TypeError: undefined is not a functionelfinder.min.js:2860 elFinder.commands.cut.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle
Uncaught TypeError: undefined is not a functionelfinder.min.js:4249 elFinder.commands.rm.execelfinder.min.js:1746 (anonymous function)elfinder.min.js:1706 (anonymous function)jquery.js:3058 jQuery.event.dispatchjquery.js:2676 jQuery.event.add.elemData.handle.eventHandle