[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] Re: Fix behavior when adding/removing 1st/last item in a flexigrid.

+++ Jason Guiditta [25/08/08 13:37 -0400]:
For instance, adding a host when there were none before should make
the flexigrid appear, and removing the last host from a list of one
should make the default 'no hosts exist' content show again.

The bulk of the work is in ovirt.js, checking for existance of a grid
and adding it if not there.  Individual delete methods reload the the
tab as well, since the flexReload does not seem to provide a callback
interface.  The problem here is if you don't check after reload is done,
your information will not be correct (since javascript is single-threaded,
and continues to run after reload is called), so you could have the wrong
number of items being used to determine whether the grid needs to be removed.
The potential weak part of tab reload right now is that we do not save state
of what page of the grid you are on.  However, this may not be known
anyway, as you are removing an indeterminant number of entries from the grid.

Also included are a few added semicolons.  These are required by javascript,
though not by browser interpreters.  However, this sometimes causes erratic
behavior when the browser has to guess (I hit this working on this patch), so
I fixed any I came across in the course of my work.  This will also help when
we are ready to minimize/pack our js, as most compressors work more reliably
when correct syntax is followed.  One missed sizing of a popup is included as
well (too trivial to go in its own patch).

Signed-off-by: Jason Guiditta <jguiditt redhat com>

Darryl L. Pierce, Sr. Software Engineer
Red Hat, Inc. - http://www.redhat.com/
oVirt - Virtual Machine Management - http://www.ovirt.org/
"What do you care what other people think, Mr. Feynman?"

Attachment: pgpWaO2mF4Zpa.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]