저는 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
컨텍스트 메뉴 항목이 나타나지 않고 콘솔에 오류 메시지가 표시되지 않습니다. 나는 또한 초기화에 의해 덮어 쓴 경우 초기화 부분에 contextmenu -> "files"아래에 editimage를 두어 보았습니다.
당신에게 너무 감사합니다 :
그래서,
을 표시하기 위해 아이콘을 얻으려면이 페이지를 발견 다른 사람 .... 들어, CSS 파일에 다음을 추가 ! – KryDos
이것은 많은 시간을 실험적으로 저장합니다. elFinder 팀이 왜 이런 답을 쓰지 못하는지 궁금합니다. 고맙습니다. – jm666
Yp 그 트릭을 않습니다. 대단히 감사합니다! – Gogol