In order to solve a project need, I've been digging into the guts of WebFM. While doing this, I started taking some notes on the how WebFM's Ajax and Javascript work. I thought I'd donate them back to the community.
Here's what these attachments are. No guarantee as to accuracy, etc..:
WebFM AJAX API.txt
A list of all the Ajax actions handled by webfm_ajax() in the module. Tries to document each action with the parameters it uses, what it returns, and a sample transaction.
WebFM Javascript Notes.txt
A list of the Classes in the webfm.js file with a one line description (more in some cases) and notes on which Ajax functions it calls.
A description of the "boot process" that webfm.js uses to create the display.
| Comment | File | Size | Author |
|---|---|---|---|
| WebFM Javascript Notes.txt | 5.28 KB | cgmonroe | |
| WebFM Ajax API.txt | 11.97 KB | cgmonroe |
Comments
Comment #1
robmilne commentedThanks for your reverse engineering efforts. The js file is overly long and rather unstructured since it was created with a bottom-up methodology. A refactoring would be appropriate.
Comment #2
davecoventry commentedVery Interesting.
I'm a little out of my depth. As you say, the Javascript is quite difficult to follow.
What I need to do is add another item to the bottom of the right-click context menu which will then fire a custom php function in the webfm.module.
The object is to have some kind of document management, so that if someone downloads a file for editing, other users know that the file is being updated.
If and when I manage to get this to work I'll submit a patch, just in case anyone else needs this sort of functionality.
In the mean time I'm struggling to find a way of "checking out" the document. I thought that the right-click menu might be the way to go, but I need assistance on it.
~Dave
Comment #3
cgmonroe commentedCan't remember the exact code off the top of my head, but the section of the JS that generates various panels will use the Translation variable defined at the top. Searching for the text that is part of the panel you want to change should get you in the general area.
Comment #4
nhck commented