phasefx [Thu, 9 Dec 2010 11:09:06 +0000 (11:09 +0000)]
fix copy/paste-o with decrement of unsaved_data semaphore and move functions from menu.js to global_util.js. tie unsaved_data into offline mode to speedbump closure via the login window
senator [Tue, 7 Dec 2010 22:42:03 +0000 (22:42 +0000)]
Serials: When the fully compressed serial holdings are active in the OPAC,
you get this "issues held" display with an expand/compress toggle that will
either show you individual holdings (and allow you to place holds on them)
or compressed holdings statements.
The functionality existed in trunk before this commit, but this cleans it up
and makes it better. It's more consistent with the the result detail table,
it doesn't offer you the change to place holds on issues that don't have
units (copy-equivalent objects), etc etc.
phasefx [Tue, 7 Dec 2010 20:01:09 +0000 (20:01 +0000)]
add unsaved data warning to offline interface. tweak oils_lock_page/oils_unlock_page to support multiple locks. Hide Cancel buttons in offline interfaces, which weren't consistently implemented and had no warnings. TODO: fix it so that closing the login window won't kill offline UI with unsaved data
phasefx [Tue, 7 Dec 2010 16:58:06 +0000 (16:58 +0000)]
tab lock infrastructure. call xulG.lock_tab() and then any attempt to close or replace the tab will give staff a confirmation dialog. multiple locks may be placed on a given tab, and an identical number of xulG.unlock_tab() invocations will unlock it
erickson [Mon, 6 Dec 2010 20:56:14 +0000 (20:56 +0000)]
refresh cached user during auth session reset
Add a boolean (1/0) param to open-ils.auth.session.reset_timeout
that forces open-ils.auth to refresh the cached user object. Useful if
a column on actor.usr was updated and the client may be pulling the
object from the cache w/ a page reload, etc.
senator [Fri, 3 Dec 2010 00:18:30 +0000 (00:18 +0000)]
Serials: In Alternate Serial Control interface, under Subscription Details
within the Caption and Patterns tab, provide a new feature to import caption
and pattern data from existing bib records and/or legacy serials data
(serial.record_entry objects)
erickson [Thu, 2 Dec 2010 22:16:24 +0000 (22:16 +0000)]
OPAC JS combation and compression enhancements
Added ability to combine locale-independent common JS files
(opac/common/js/) into a single JS file to reduce http back/forth from
the browser. In the default skin, this combines 10 scripts into 1. The
scripts to combine are parsed from js_common.xml (enclosed by START/END
COMPRESSION comments). The combined file is created by autogen. Use of
the combined file is enabled via new Apache configuration (off by
default). When a JS compressor is configured in autogen, the JS file
will be subsequently compressed.
Also includes better IDL2js loader for My Account, which loads
additional fieldmapper classes.
TODO:
Add ./configure param for setting a JS compressor at build time
Options for providing compressed versions of other JS files
dbs [Wed, 1 Dec 2010 19:11:41 +0000 (19:11 +0000)]
Return the copy status name when a copy is not available
It looks like the checkout operation used to return a fleshed
config.copy_status object, but that changed and we now get a
raw ccs ID back.
Retrieve the status name using the ccs ID and present that
to the users. Also, in case problems like this happen in
the future, provide a more specific error message and var
name so that it will be (hopefully!) a little clearer what
payload was expected in the first place :)
dbs [Tue, 30 Nov 2010 20:12:06 +0000 (20:12 +0000)]
Enable GET params to be added properly in buildOPACLink()
Symptom was that the "?l=#" parameter wasn't being added to the
home screen "Advanced Search" link. Cause was that the
dojo.addOnLoad(init) call was being made after the
dojo.addOnLoad(home_init) call, which depended on globals being
set by init(). This started happening when the JavaScript was
shifted around in an attempt to kill the white screen of death.
There may be other similar issues in other interfaces; keep
your eyes open!
phasefx [Tue, 30 Nov 2010 18:17:47 +0000 (18:17 +0000)]
add click event to red-text label in check-in UI for retrieving a patron when the associated transaction has a balance owed. Code tweak to reduce the number of getElementById lookups
dbs [Tue, 30 Nov 2010 05:12:13 +0000 (05:12 +0000)]
Clean up some of the Apache config mod_rewrite rules
Thomas Berezansky suggested some improvements to the mod_rewrite
rules in eg_vhost.conf on the -devel mailing list; this is a stab
at correcting the most egregious problems.
Tested with Zotero and unAPI still works; tested with the staff
client and language-switching still works, as do the Conify and
Vandelay interfaces. Seems reasonably good.
gmc [Mon, 29 Nov 2010 22:54:30 +0000 (22:54 +0000)]
test cases for the naco_normalize stored function
Note that running the tests would require sticking in
the connection parameters for an Evergreen database; check
comments for some musings on how to do this better.
This version of the algorithm is more general -- for example,
all combining characters are removed -- so there should be
fewer fiddly edge cases to worry about for most European
languages.
Rebuilding the metabib.*_field_entry tables (e.g., by using
reingest-1.6-2.0.pl) is recommended if there are any bibs that contain
any non-ASCII characters.
Normalized text is now left in the NFKD form, so while this should
be transparent to the search system after reindexing, it does mean
that (for example) Korean text in metabib.*_field_entry may not
be in the same Unicode normalization form as that found in
biblio.record_entry.
erickson [Mon, 29 Nov 2010 20:24:47 +0000 (20:24 +0000)]
honor forceLoginSSL for place holds login in OPAC
When forceLoginSSL is enabled and the user clicks on place-hold in
results page or record details page, reload the page as SSL (if it's not
already using SSL) and show the login dialog (if the user is not already
logged in).
dbs [Sun, 28 Nov 2010 15:11:55 +0000 (15:11 +0000)]
Address 1.6.1-2.0 upgrade problems reported by Ben Shum
1. We were attempting to update the asset.uri ID sequence value
with the wrong syntax; also, adding just 1 would return an error
in the event that only the seed value for asset.uri had been
inserted.
2. Somehow the body of the maintain_control_numbers() function
was pasted twice, resulting in a syntax error.
senator [Tue, 23 Nov 2010 21:38:28 +0000 (21:38 +0000)]
Serials: Fix error in batch receiving when trying to change the shelving
location of the previous item in the stream when there /is/ no previous
item in the stream
dbs [Tue, 23 Nov 2010 20:58:28 +0000 (20:58 +0000)]
Further fixes for hold-driven recalls
Force a scalar context on the array reference of circs returned
from the search clause to short-circuit the recall processing
if we have no applicable circs to work through.
Also, open-ils.trigger.event.autocreate needs a Fieldmapper object,
not a raw CDBI object, so invoke the to_fieldmapper() method to
convert it accordingly (thanks to miker for the assist!)
phasefx [Mon, 22 Nov 2010 20:38:28 +0000 (20:38 +0000)]
append to bottom of list for xul-based hold list interfaces. The result of this is that rows appended off-screen (with just the hold id) will not make a network request for fleshing until they either become visible, or a column sort action is initiated
gmc [Mon, 22 Nov 2010 17:17:59 +0000 (17:17 +0000)]
bug #680096 - upgrade script to partially reingest bibs after upgrade to 2.0
This solves the problem of the new facets sidebar showing up empty in
OPAC search results. Since the process of populating metabib.facet_entry
and updating metabib.*_field_entry can take a long time on large databases,
the update SQL is generated by a separate script, reingest-1.6-2.0.pl. Usage
from an example run is:
./reingest-1.6-2.0.pl: generate SQL script to reingest bibs during an upgrade to Evergreen 2.0
By default, the script writes to the file reingest-1.6-2.0.sql. To modify
this script's behavior, you can supply the following options:
--config /path/to/opensrf_core.xml used to get connection information to
the Evergreen database
--chunk_size n number of bibs to reingest in a chunk;
specify if you don't want all of the
bibs in the database to be reindexes
in a single transaction
--output /path/to/output_file.sql path of output SQL file
Writing output to file reingest-1.6-2.0.sql
SQL script complete. To perform the reingest, please run the script using
the psql program, e.g.,
If you are running a large Evergreen installation, it is recommend that you
examine the script first; note that a reingest of a large Evergreen database
can take several hours.
gmc [Mon, 22 Nov 2010 13:17:57 +0000 (13:17 +0000)]
parallel fine generator
The fine generator cronjob can now use multiple
parallel processes by setting fine_generator/parallel
in opensrf.xml to a value greater than 1. This
can speed up periodic fine generation in a database
containing a large number of overdue loans.
Also added a service to return just the list of
IDs of overdue loans and reservations - fleshing
the entire set of overdue loans when generating fines
has been observed to cause significant swap-thrashing in
at least one large database.
dbs [Mon, 22 Nov 2010 04:46:49 +0000 (04:46 +0000)]
The absence of holds-triggered recall rules should not break hold targeting
Thanks to Galen Charlton for pointing out that if rules were not set for
holds-triggered recalls, then all hold targeting would break because of
an assumption the code made that one could invoke the ->{value} member
of the OU settings. But of course the return value for an unset OU setting
is undef, not an object with an undef ->{value} member.
gmc [Mon, 22 Nov 2010 04:26:44 +0000 (04:26 +0000)]
hold targeter: add option to run parallel targeter processes
Permit the hold targeter to divvy up the work and run more than one process
at a time by setting the opensrf.xml setting hold_targeter/parallel to a
value greater than one. Doing so can significantly reduce the
time it takes to (re)target a large number of hold requests, although
only up to a point (in other words, if increasing the number of parallel
targeters beyond one, it is recommended to do so slowly.)
phasefx [Sun, 21 Nov 2010 10:36:10 +0000 (10:36 +0000)]
add xhtml namespace to global.css, though I can't figure out how to style the xhtml.textarea in the marc editor with font_helper. Tried .ALL_FONTS_LARGER xhtml.textarea and .ALL_FONTS_LARGER *.textarea to no avail
dbs [Sat, 20 Nov 2010 19:47:54 +0000 (19:47 +0000)]
Address maintain_control_numbers() database function bug #677160
Jason Stephenson reported a bug handling records with multiple
001 or 003 fields, and supplied a set of test records to
reproduce the condition. The bug caused the ingest process
to throw a database error, rolling back the transaction and
preventing the actual ingest of those records.
The solution was to simplify the logic in maintain_control_numbers().
Now, in the case that there are either multiple 001s or 003s in the
incoming record, we simply delete all of the 003s and 001s and
create the desired 001 and 003. Also, if there are not exactly one
001 and one 003 in the incoming record, we do not try to preserve
one of those values in the 035 as it would be close to meaningless.
Many thanks to Jason for the clear bug report and test cases!
gmc [Thu, 18 Nov 2010 16:28:21 +0000 (16:28 +0000)]
use pcrud auto-complete widget when selecting providers
Fixes general slowness working with invoice and PO forms if
more than a couple hundred providers are defined.
This could be generalized with a bit of work with Fieldmapper
to define "has-one-chosen-by-user-from-cast-of-thousands"
relationships that should trigger use the auto-complete widget.
gmc [Thu, 18 Nov 2010 16:28:19 +0000 (16:28 +0000)]
fetchItemByIdentity now returns null immediately upon null identity
Besides being trivially more efficient, this avoids a situation
where pcrud can sometimes time out when attempting to retrieve
a row by a null PK value.
erickson [Thu, 18 Nov 2010 15:36:18 +0000 (15:36 +0000)]
fetch more than the default 10 (per page) distrib formulas; 500 is arbitrary, but still notably less than the infinity that was in effect before paging. todo: research optiosn for using the new autofieldwidget/dojo/pcrud-store instead
erickson [Tue, 16 Nov 2010 23:33:27 +0000 (23:33 +0000)]
in the staff client, use the user object in the XUL stash instead of grabbing the user object on each page load for embedded staff web UIs (/eg/). This is one less pre-onload XHR and another step in the avoidance of the cursed WSOD. Added support for launching the xul login dialog after a timed out session event is returned.
senator [Tue, 16 Nov 2010 23:02:25 +0000 (23:02 +0000)]
Wonder of wonders, a Dojo data store supporting lazy loading objects via pcrud!
So openils.PermaCrud.Store was dreamt up and directed by Mike Rylander, and
implemented by me. Right now it gives us a new way to provide widgets for
selecting objects in Dojo-based interfaces.
Where previously we had some dropdowns here and there that really shouldn't
be dropdowns (such as one for selection lists in Acq, and several for resources
and resource types in Booking -- these examples I've replaced, but there are
surely more) because loading a dropdown with potentially zillions of items
to choose from can take forever and break the interface, now we can have
autocompleting textboxes that only load items matching what you type (and
even then with a low-ish default limit so that if you're vague in your input
you still don't get huge unwieldy result sets).
Easiest way to see an example is if you already have any acq selection lists.
Just go to any catalog record, choose Actions for this Record, choose View/Place
orders, then click "Add to Selection List." In the resulting dialog, that
second field used to be a dropdown, but now it's an autocompleting textbox.
Alternatively, you can see these in the affected booking interfaces (see files
modified in this commit) under Admin -> Server Administration -> Booking.
The future promises even better things for this store. When it implements the
Dojo Write API, interfaces using grids can potentially be vastly simplified
by relying on the store to save its own dirty objects. The Notification API
would facilitate easy use of single stores with multiple widgets. All good
things for faster-to-write interfaces.
phasefx [Tue, 16 Nov 2010 20:10:13 +0000 (20:10 +0000)]
extend the opac org hiding feature to the place hold pickup lib menu. Note that this feature depends on Apache being configured to maintain the ol= URL param
erickson [Mon, 15 Nov 2010 20:26:22 +0000 (20:26 +0000)]
return AutoIDL to its original state of loading the while IDL if no classes are selected. This will ease the process of moving to /IDL2js; other minor cleanup
senator [Mon, 15 Nov 2010 18:28:25 +0000 (18:28 +0000)]
Serials: two little things to make alt serials control interfaces less painful
to use.
The copy template editor now gives dropdowns for fine level and loan duration.
This is particularly useful since at receive time, if you're trying to create
units, you can't do it with null values in those fields.
The caption and pattern pane of the subscription details interface now sets the
active checkbox to checked by default when creating new caption and patterns.
This helps prevent user confusion if you create a caption/pattern and move on
to the issuances tab and find that you can't apply the caption/pattern that
you just created because you didn't make it "active."
dbs [Mon, 15 Nov 2010 05:23:56 +0000 (05:23 +0000)]
Prevent creation of authority records that are truncated by one letter
The summarizeField() function grabbed the values of the XUL elements,
which were set by the keypress event listeners on the XUL elements.
However, the keypress event listener seems to capture the value of
the XUL element before the value of the new key is appended to the
existing value in a textbox - so, when you typed a new subfield, then
right-clicked to create an authority, the value that was captured was
missing the final character.
Adding the "input" event to the registered listeners captures the
actual value for creating an authority and solves the problem. It
might be possible to remove the keypress event listeners, but for
now we'll take the cautious route.