]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1773417 Improve empty volume handling
authorDan Wells <dbw2@calvin.edu>
Wed, 30 May 2018 16:43:08 +0000 (12:43 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 30 May 2018 16:43:08 +0000 (12:43 -0400)
commit8f00ebb0be7b5e6245f037c84303712d11bc7baa
treecbbd19ae57a0e55b7c72144839ec64f1f974cd05
parente03a8cec1193d1a8e604dd23478aad2a5679d497
LP#1773417 Improve empty volume handling

The crux of this patch is to rethink how we handle the volume-only
editing interface.  Previously, we were attempting to distinguish
between when the volume was the only thing *showing* and when it
was actually the only thing *existing*.

We have now removed that distinction, so the volume-only interface
only cares about the volume regardless of the possible presence of
a copy.  This simplifies the interface logic, and reduces or
eliminates the chance of the hidden copy editor interfering with
the volume adding/editing functions.

Other smaller changes here include:
- Teach the edit function to pick up copy-less "empty" call numbers
- Reduce and clarify the arguments to spawnHoldingsAdd
  We had three arguments, but two were simply inversions of one another
  in every case.  Reduce to two arguments and give them more meaningful
  labels
- Fix typo ("emtpy") preventing proper button disabling for blank call
  numbers
- Move call number emptiness check from updateLabel() function to value
  watch instead.  This ensure that any updates to that value (even those
  not using the update function) will flip the flag appropriately.  This
  fixes a timing bug which prevented call numbers from being saved
  without further edits in some cases.

Ultimately, as J. Boyer suggests, we would be better off not generating
the copy editor at all (rather than just hiding it), but we're a few
steps off from that yet.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/web/js/ui/default/staff/cat/catalog/app.js
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js