Closed (fixed)
Project:
FileField
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2007 at 09:28 UTC
Updated:
17 Sep 2007 at 10:21 UTC
Jump to comment: Most recent file
As split out from the kitchensink patch, here's AJAX uploading support; a straight, simple port from imagefield. Renames a few bits to look more like imagefield's code, but apart from that there are no big surprises. Also fixes a potential, but currently ineffective bug in filefield_menu() where $may_cache and $maycache should be named the same.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | filefield-ajax-try6-pure.patch | 6.8 KB | jpetso |
| #9 | filefield-ajax-try4-part1-module.patch | 10.76 KB | jpetso |
| #8 | filefield.js-try3.txt | 3.73 KB | jpetso |
| #7 | filefield.js-try2.txt | 3.72 KB | jpetso |
| #6 | filefield.js_.txt | 3.71 KB | jpetso |
Comments
Comment #1
jpetso commentedHere's a new version. Seems that I didn't include progress.js and upload.js, which is why the patch only worked when the upload module itself is enabled.
This one should be perfect :D
Comment #2
gordon commentedI have given this a bit of a bashing and it is working great.
I did find that the output of the upload form was not being themed so I have added that so that the output looks much better.
Comment #3
jpetso commentedWhoa, upload.module-like tabular displaying of the files. Themable.
I love this one, it's awesome.
Although, if I were the maintainer, I'm not sure if it would make sense to split such an intrusive change of the looks into a seperate patch, for easier includability. (Which is underlined by the fact that your updated version of the patch did not apply to my quite heavily patched version of filefield, and I had to merge it by hand. This would be easier if the patch is small and self-contained.)
But again, +1 on this improvement, imho it should get in as soon as possible.
Comment #4
jpetso commentedI split the user interface changes into #146294, so it can be reviewed and applied seperately from the larger AJAX patch. That would deprecate your filefield_ajax.diff file in favor of the new patch in the new issue, so filefield-ajax-try2.patch is the current applicant for inclusion again.
Comment #5
jpetso commentedCheers for JavaScript delete buttons! This new version of the patch includes a port of my patch for Drupal core 6.x, and works in the same way, without conceptual changes to the JavaScript logic.
As it's quite impossible to separate this from the theme function, I based this new version of the patch on gordon's themed output improvements, even if those are also available as separate patch from the issue mentioned in the previous comment. As 'cvs diff' can't diff new files, the patch now consists of two parts: the module diff (as before) plus the complete .js file.
Comment #6
jpetso commentedSecond part, the new filefield.js file which extends upload.js's functionality with delete button features. Also, did I mention that imagefield would also be able to use this without having their own .js file? Right. You _really_ want this stuff.
Comment #7
jpetso commentedNew version of the JavaScript file, adding the form-item class to the button. It then gets the same positioning as the checkbox, which looks better in most cases.
Comment #8
jpetso commentedNew version of the JavaScript file: adding semicolons to function/method declarations, like the JavaScript aggregator patch did with all those files. Given, we might not need this file anymore in Drual 6, but if it's a new file that needs no diff then let's do it right anyways.
Comment #9
jpetso commented...and an update for the module file as well: fix the beginner's mistake of not using t() for the "abc.txt is scheduled for deletion." text.
Comment #10
jpetso commenteddopry said that I may commit AJAX uploading for the (yet unreleased) 5.x-2.0 release, so it's now in CVS HEAD. Delete buttons have been left out for now (I believe they should go into Drupal core first) but uploading is there. For completeness, here's the final patch that I committed.
Enjoy! (and test!)
Comment #11
(not verified) commented