[Phpmyadmin-devel] Zoom Search

Ammar Yasir ammaryasir.88 at gmail.com
Sun May 29 09:11:28 CEST 2011


On Thu, May 26, 2011 at 5:54 PM, Marc Delisle <marc at infomarc.info> wrote:

> Ammar Yasir a écrit :
> >
> >
> > On Mon, May 23, 2011 at 8:11 PM, Marc Delisle <marc at infomarc.info
> > <mailto:marc at infomarc.info>> wrote:
> >
> >     Ammar Yasir a écrit :
> >      > Hi,
> >      > I pushed my work. I just tried to add a sub-tab on the table
> search
> >      > page, one for the normal search and the other for zoom search. I
> just
> >      > wanted to get back feedback on whether the design will be okay to
> >     proceed?
> >      > Please don't mind how I have coded for now, just coded very
> >     quickly to
> >      > get a basic design of the interface. I'll code it properly after
> >      > suggestions.
> >      >
> >      > Since user needs to select only two columns in the zoom search
> page,
> >      > instead of listing out all columns I provided two select boxes
> where
> >      > user will select the two columns first and I'll display the field
> >     type,
> >      > collation, operator and value based on that later. Also since we
> >     don't
> >      > need to display the results, the options link on that page was
> >     removed.
> >      >
> >      > One more thing: For tabs, if I am not providing any link then the
> >     mouse
> >      > cursor changes to X and they appear as disabled. How to change
> that?
> >      >
> >      > Regards,
> >      > Ammar Yasir
> >      > http://repo.or.cz/w/phpmyadmin/ammaryasirr.git
> >
> >     Ammar,
> >     I think that the two-tabbed interface will do the job.
> >
> >     A few remarks:
> >
> >     - you have a few undefined variables; in case you are not seeing
> them,
> >     please use "$cfg['Error_Handler']['display'] = true" in your
> >     config.inc.php
> >
> >     - please merge the original master to your repository, today and
> >     regularly; from
> >     http://wiki.phpmyadmin.net/pma/Git#Publishing_changes_for_merge
> >
> >     You should also regularly merge back the changes done in official
> >     repository:
> >
> >     git checkout yourbranch
> >     git remote update origin # assuming official repository is called
> origin
> >     git merge origin/master
> >
> >     - in your jQuery you are comparing with "Table Search" and this won't
> >     work with localization
> >
> >     - in pmahomme theme, labels "Table Search", "Zoom search" are
> difficult
> >     to read
> >
> >     - the red X comes from the "error" class so try to find out why your
> >     element has this class
> >
> >     --
> >     Marc Delisle
> >     http://infomarc.info
> >
> > Hi,
> > I pushed my work. I have added a new file tbl_zoom_select.php which
> > contains the interface. I tried to code everything in tbl_search page
> > but the code becomes very complicated and I had to use a lot of If/else
> > conditions, so i think it will become even more complicated when I'll
> > experiment with plotting libraries.
> > With a new form its better to switch between the normal table search and
> > zoom search forms without using jQuery.
> > Also, in this form a user can select two same columns but with different
> > search criteria (for example, a film with rating G and a film with
> > rating PG-13) so the query generation for this case cannot be handled in
> > tbl_select.php. It generates a wrong query, so the query generation part
> > of this interface also works a bit differently. It generates two
> > queries, one for each column criteria. I know some code has to be
> > duplicated, but I think its better to develop it as a different
> > component. Otherwise if there are some modifications in the zoom-search
> > part, a lot of changes have to be done in the tbl_select.php page. Its
> > just what I thought, I'll do the interface again if code duplication is
> > an issue.
>
> Ammar,
> it's OK to have two components but please refactor common code into
> functions and put them in a new libraries/tbl_select.lib.php that will
> be called from both components; otherwise it will be difficult to maintain.
>
> An example of needed refactoring: the "Gets the list and number of
> fields" section.
>
> I did refactoring in two areas:
1) As you proposed, Getting the list and number of fields.
2) The where clause generation in the query-building part.

Should we also do for the HTML part? Some part of that (for example the
foreign keys display part) is common but also has HTML content embedded.
Apart from that since the zoom-search form takes the field as input so rest
of the form is based on that constraint. So I was thinking that the HTML
part can stay as it is.

Don't forget to follow my advice about merging the changes from the
> official repository.
>
> --
> Marc Delisle
> http://infomarc.info
>
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110529/aaaa4e8d/attachment.html>


More information about the Developers mailing list