Sep 27th, 2011, 3:39 PM
Hey Mark,
So... bad news with the Mass Edit module: it's going to be further off than I thought.
Today I got things working locally to the point where the fields were being displayed on the Mass Edit page, but the generated markup wasn't valid. The problem is that each of the field type's markup was written for the (single) Edit Submission pages only. So things like labels and IDs were being output multiple times for each row, causing errors in the JS and browser. In the old version, I had more control over the generated markup - but now it's handled by each field type, which means a core change.
This is definitely something I want to solve, but I need to get it all worked out in my head first.
A little more explanation. So, the design for the field types is GREAT. I really like it: it gives total power over customization. I worked in the option to define "contexts" for each field type, so it can be told where it's being called from (e.g. "edit submission", "xml export", "submission listing page" etc. etc.), and then change what's outputted accordingly. So it can easily handle a new "mass edit" context to get around the problem I encountered today.
What was short-sighted of me was not to go all in and make each and every field type a separate module, like the Google Maps, file upload & WYSIWYG modules. -or even just write a single module to group all the common field types. So now anytime I need to update one of the Core's field types, it needs a Core update. That was dumb. I'd still stand behind the original design, it's just that the implementation has problems.
I'll have to continue to give this some thought.
- Ben
So... bad news with the Mass Edit module: it's going to be further off than I thought.
Today I got things working locally to the point where the fields were being displayed on the Mass Edit page, but the generated markup wasn't valid. The problem is that each of the field type's markup was written for the (single) Edit Submission pages only. So things like labels and IDs were being output multiple times for each row, causing errors in the JS and browser. In the old version, I had more control over the generated markup - but now it's handled by each field type, which means a core change.
This is definitely something I want to solve, but I need to get it all worked out in my head first.
A little more explanation. So, the design for the field types is GREAT. I really like it: it gives total power over customization. I worked in the option to define "contexts" for each field type, so it can be told where it's being called from (e.g. "edit submission", "xml export", "submission listing page" etc. etc.), and then change what's outputted accordingly. So it can easily handle a new "mass edit" context to get around the problem I encountered today.
What was short-sighted of me was not to go all in and make each and every field type a separate module, like the Google Maps, file upload & WYSIWYG modules. -or even just write a single module to group all the common field types. So now anytime I need to update one of the Core's field types, it needs a Core update. That was dumb. I'd still stand behind the original design, it's just that the implementation has problems.
I'll have to continue to give this some thought.
- Ben