我正在尝试实现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)
a是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