私はelfinderを使用しており、コンテキストメニューにコマンドを追加することで新しい機能を追加したいと考えています。私はプロジェクトのgithub問題追跡ツールの解決策を見つけましたが、それを働かせることはできません。私がしていることは次のとおりです。elFinderにカスタムコンテキストメニュー項目を追加する
var elf;
jQuery().ready(function() {
elFinder.prototype._options.commands.push('editimage');
elFinder.prototype._options.contextmenu.files.push('editimage');
elFinder.prototype.i18.en.messages['cmdeditimage'] = 'Edit Image';
elFinder.prototype.i18.de.messages['cmdeditimage'] = 'Bild bearbeiten';
elFinder.prototype.commands.editimage = function() {
this.exec = function(hashes) {
console.log('hallo');
}
}
elf = jQuery('#elfinder').elfinder({
...
//elfinder initialization
コンテキストメニュー項目が表示されず、コンソールにエラーメッセージが表示されません。私は初期化によって上書きされた場合には、initimageのcontextmenu - > "files"の下にeditimageを入れてみました。
はそんなにありがとう! – KryDos
これは最終的に何時間もの実験を保存します。 elFinderチームがなぜこのようなdoccuを書くことができないのでしょうか?もう一度ありがとう。 – jm666
そのトリックはありません。感謝万円! – Gogol