1

elFinder file managerを実装しようとしています。

これは私がやったことです。含まれるファイル:

    $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
4

1 に答える 1

1

URL (/radio/elfinder-2.0-rc1/php/connector.php) から、Elfinder 2.0 RC1 を使用しているようです。

Studio 42 (elFinder を開発した会社) は 2012 年以降、elFinder のコードを更新または開発していないことを知っておく必要があります。ユーザーnao-ponは、最近の開発とバグ修正を担当しています。

そのため、最新の更新されたコードを使用するには、 Nightly ビルドをダウンロードする必要があります。それはおそらくあなたの問題を解決するはずです。

于 2015-03-07T19:27:56.967 に答える