[Phpmyadmin-devel] relation view behavior

Garvin Hicking phpmyadmin at supergarv.de
Wed Jun 29 05:19:55 CEST 2005


Hi Marc!

> should we submit the left form (links) whenever a link is added, instead of
> hoping that the user will click Go?

I think it would be better if we add a warning message when a user changes the
display field with unsaved changes.

As the automatted submission requires javascript already, we can add a
javascript for the checks. We init a variable "isAltered = false", and add a
onChange handler to the "links". As soon as one dropdown is changed, isAltered
gets set to true.

The onchange handler of the display field then checks for isAltered. if it is
set to true, it will emit a warning: "You are about to change the display field,
but have pending changes to the relational links. Do you want to continue and
ignore changes to the relations? (Yes|No)".

My reasoning for this is that it adds odd new functionality for long-time users
of the relations. I for one often add many relations at once. If the page got
reloaded every click, it would annoy me. And sometimes I select changes in the
dropdown before I make up my mind, and want to lay it out first before
committing. If phpMyAdmin always committed my "visual" changes, it would annoy
me.

Regards,
Garvin

-- 
++ Garvin Hicking | Web-Entwickler [PHP]    | www.garv.in | ICQ 21392242
++ Developer of   | www.phpMyAdmin.net      | www.s9y.org

++ Make me happy  | http://wishes.garv.in





More information about the Developers mailing list