[Phpmyadmin-devel] About the AJAXification of the index editor

Thilanka Kaushalya lgtkaushalya at gmail.com
Fri Jul 8 12:12:14 CEST 2011


Hi Marc and Rouslan,


Another thing is that the AJAX dialog should really be modal (you can
> make the dialog modal by adding "modal: true," to the dialog options in
> jQuery).
> Try this:
> * go to `sakila` db
> * go to `actor` table
> * go to structure tab
> * click on "Edit" link for the primary key
> * without closing the AJAX dialog, move it out of the way
> * click on "Edit" link for the `idx_actor_last_name` index
> * inside this new dialog click "Save"
> Expected result:
> * the dialog for `idx_actor_last_name` is submitted
> Actual result:
> * the dialog for the primary key is submitted
>
>
>
Fixed this issue.


> Another bug:
> * go to `sakila` db
> * go to `actor` table
> * go to structure tab
> * click on "Edit" link for the primary key
> * set all rows in the table to "--ignore--"
> * click "Save"
> Expected result:
> * An error message
> Actual result:
> * An empty AJAX message
>
>
Fixed this issue.


>
> Another thing is that the new function that you wrote to handle the
> SPATIAL indices doesn't actually work. The problem is that its event is
> attached using jQuery's 'bind' method, which is unsuitable for your
> purposes. I think that you should use the 'live' method that allows for
> late binding. After you do that, you will notice that the function still
> doesn't work as expected. This is because in this function you assume
> that you will always have one instance of each element that you
> reference by ID. However once the DOM has registered an element with a
> particular ID (open a dialog), even if you destroy that element and
> recreate it (close dialog/ open new dialog), the DOM will still
> reference the original, and now non-existent, element. The best way to
> deal with this is to use classes, then search for objects inside some
> common parent element.
>
>
It seems now the SPATIAL indices working correctly. Should I go for classes
in this.


> I guess that this is quite a mouthful of an email, hope it helps.
>
>
I pushed the code to the repo, so please check that. Thanks for your help
for improving the feature.

Regards,
Thilanka.


-- 
L G Thilanka Kaushalya
Computer Science & Engineering,
University of Moratuwa,
Sri Lanka

Connect with me at,
      Gmail        : lgtkaushalya at gmail.com
      Twitter       : @thilanka_k
      Facebook  : Thilanka Kaushalya
      Yahoo       : lgtkaushalya at yahoo.com
      Blog          : http://coders-view.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110708/19981e6a/attachment.html>


More information about the Developers mailing list