Elfinder: How to edit/add custom command in el_finder and el_finder really works ?

Created on 8 Aug 2017  路  2Comments  路  Source: Studio-42/elFinder

I've been reading el_finder's source code since last 4 days and confused about it's working. I would be grateful, if someone can give answers for below questions :

1) On which js-pattern el_finder is built ? (eg. factory, constructor, prototype, dynamicprototype, functional etc).

2) From which point/module/function of source-code should I start to learn el_finder to understand it completely and quickly for customizations ?

3) This library will be great learning point for me (I have started to build back-end/connector in ruby mimicking ideas from php and el_finder ruby gem). But, I have been stuck/taking-long-time in understanding working of el_finder client-side code, So, proper answers will be a great help. Thankyou all !!! Happy Coding !!!

question

All 2 comments

@coderubyonrails The client side command is elFinder.command.js as the base object, and each commands are extended object. If you find a command similar to the command you are trying to make, the code of that command will be helpful.

Each command is executed by exec function of elfinder.js. An array of hashes (ID) of the target item is passed as the first argument, and an object (associative array) according to the case is passed as the second argument.

Command execution is often done by click event of a button on the toolbar or click event of the context menu.

The toolbar button is js/ui/button.js, and the context menu is js/ui/contextmenu.js is the source code.

For your happy coding!

Thankyou @nao-pon, I'm on right path now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jacceko picture jacceko  路  17Comments

Offerel picture Offerel  路  10Comments

ShinJii89 picture ShinJii89  路  10Comments

hayes-seyah09354085977 picture hayes-seyah09354085977  路  17Comments

ghigio2000 picture ghigio2000  路  15Comments