Vandelay: refresh upload and inspect queue pages collab/berick/vandelay-refresh-pages
authorBill Erickson <berick@esilibrary.com>
Mon, 19 Dec 2011 22:08:12 +0000 (17:08 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 18 Jan 2012 16:25:07 +0000 (11:25 -0500)
commita67ff8ba93fffe9f20d7e379baf03de438034c0d
treec4f92a75a27ca3c67220b68adb9653923a85a200
parent187562184c28f1d8ba25b3a6dae3ce3e8180e997
Vandelay: refresh upload and inspect queue pages

Vandley sub-pages are currently managed as hidden divs that come into
view when the requested tab is selected.  This creates two types of
problems in the interface.  The first is that newly created data (e.g. a
new queue) is not available in the UI, because it's not getting
re-fetched from the server when the tab is opened (or added to local
data stores).  Second, certain form elements misbehave when the form is
re-rendered without a refresh.  Elements, typically checkboxes, will
appear to be selected when they are not.  (Or, perhaps they are, and the
method to detect their selection is not sufficient).  The simplest
solution to both problems is to simply reload the page....

This patch changes the tabs for Import Records and Inspect Queue so that
they reload the page (focused on the selected tab) instead of just
showing the hidden div.  These pages were chosen because they are the
only interfaces that don't automatically refresh their own data and (for
Import Record) have forms that need refreshing.

Additionally, since the user may spend more time loading Vandelay
pages, this also fixes the long-standing annoyance of seeing the
Vandelay UI partially render while waiting for the page to load.  Now,
it all remains hidden, except for a brief "Loading..." message.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/vandelay/inc/toolbar.tt2
Open-ILS/src/templates/vandelay/vandelay.tt2
Open-ILS/web/js/ui/default/vandelay/vandelay.js