Hi,
I had the need for swfupload to remember the way the files were sorted (and needed the possibility to re-sort the images after they've been updated) which it didn't appear to do out of the box. I solved it by adding support for weight (saved in the 'data' column alongside of description etc.). It's a rather crude patch, but it works for me. Could probably be improved quite a lot.
Anyway, if anyone else is after the same functionality feel free to use this.
Known limitations:
- It stores weight under the serialized data, which makes SQL sorting impossible. If you need it, save it as a column. I didn't, and didn't want to mess with column etc in SQL.
Regards,
NIklas
PS: Not sure what to file this under, feel free to improve the status/issue information.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | swfupload-weigh-v2.patch | 9.62 KB | Martin. |
| swfupload-weight.patch | 4.44 KB | niklasb |
Comments
Comment #1
moondev commentedIs this related to drag/drop not working in chrome?
Comment #2
niklasb commentedNo, drag and drop works fine for me regardless (both before and after the patch) in OS X Chrome. Are you on windows?
I have noted however that you need to disable Theme developer if you have that enabled. Otherwise all sorts of weird things happen.
Comment #3
roderik"drag/drop not working" here means "the sort order not being remembered after drag/drop". Because the sort order is properly remembered in other browsers.
Something to do with Chrome's V6 JavaScript engine not working as FF/IE's, and not remembering the ordering of certain objects. See the links in #875706: Rearrange images does not work in Opera & Chrome for documentation, if you care.
So this is likely a duplicate of #875706: Rearrange images does not work in Opera & Chrome. Sorry for the title not being clear.
Comment #4
panthar commentedI wonder if this is the fix/cause?: http://drupal.org/node/1542834 , let me know if that helps.
Comment #5
Martin. commentedPatch is working, but when I already have data on the field, It wont allow me to see all the images.
I modified the patch so that when there are already images uploaded, it would display them out in backend, instead of just displaying one image, because array keys match and override one another.
Comment #6
kenorb commented