[nycphp-talk] db design/ app logic: making certain rows immutable
David Mintz
david at davidmintz.org
Mon Jul 25 09:39:55 EDT 2011
On Sat, Jul 23, 2011 at 9:30 PM, Rukbat <rukbat at webdingers.com> wrote:
> On 7/15/2011 11:30 AM, David Mintz wrote:
>
>> I hesitate to bore you with my details, but -- you can stop reading if it
>> gets too boring.
>>
> <snippety>
>
> So, should my JS code examine the currently selected event_type option to
>> see if it matches the string "probation interview?"
>>
>
> Have you thought about giving event_type a few different edit levels (in a
> single field - edit_level). That way you can edit anything (your level
> would be 1 higher than the highest level in the table). Each event has a
> level the user has to be in order to be able to edit it. Default level is
> the level of the user creating it. Some users would have higher levels,
> since they understand the data (or can make your life miserable).[...]
>
Thanks for the suggestion. I was considering solutions tending in that
direction, then realized (thanks to a nudge from D. Cech) what I really
needed was slightly more fine-grained metadata about each of my OPTION
elements. I ended up tweaking my database design and using css class
attributes to mark my OPTIONs as belonging to this or that category. Kind of
like, <option class="fish" label="salmon" value="123">salmon</option>.
Maybe what I really need is HTML5 custom attributes, but I think this will
do for now.
--
David Mintz
http://davidmintz.org/
It ain't over:
http://www.healthcare-now.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110725/5e4e090d/attachment.html>
More information about the talk
mailing list