senator [Fri, 4 Feb 2011 01:24:28 +0000 (20:24 -0500)]
started moving some inline styles into css classes
Here's the deal so far: all the inline styles are covered by one class
in semiauto.css, but those were created programatically and reflect no
understanding of the relationship between the purpose of any given
element that's styled and what its style is. These auto-generated
styles also are kind of redundant, since with many of them, instead of
using the style with a long definition, you could use a combination of
smaller styles.
The existing markup uses many slightly different style attributes, so
there's plenty of stuff like "width: 12", "width: 13", "width: 14", etc,
so there's no way to map a lot of this to semantically meaningful names.
some of these classes are just going to end up with names like
"wide-fourteen" that are no better than inline styles.
But others, as we find them manually, can be grouped and renamed into
something meaningful, and sometimes style can be put into prexisting id
and class definitions. Should be a couple more hours work.
semiauto.css reflects progress with the generated classes.
changes to style.css reflect early places where style could be moved
into pre-existing classes.
Bill Erickson [Thu, 3 Feb 2011 21:47:59 +0000 (16:47 -0500)]
Integrate Locale::Maketext for string translations
Added support for configuring supported locales and specifying message
catalogs as gettext .po or .mo files. All locales default to native
template strings when no translation is provided.
Updated oils_web config and added some inline template examples
senator [Thu, 3 Feb 2011 20:34:19 +0000 (15:34 -0500)]
JS stubbed out, mostly. See longer commit msg.
Here's the deal with JS so far.
A few instances of onfocus, onblur, onmouseout, and onmouseover have been
left alone, as they're doing simple cosmetic things.
A lot of instances of onclick remain, and a couple onchange, but these
now either a) just do cosmetic things (hide/unhide) or b) call stubbed
out functions prepared in misc.js
That doesn't mean we won't still totally rip out lots of this JS, but
it leaves us a hint as to what is supposed to happen where. I can
easily see us losing track of that later. So anyway, many of the
stubbed functions will probably be replaced with purely server side
functionality later, but until then, they can serve as a kind of
documentation.
senator [Thu, 3 Feb 2011 16:54:23 +0000 (11:54 -0500)]
all five main parts of their myopac page
now it's on to the serious js scrubbing (dojo parts are already gone). this is
going to take more than simply removing js in many cases, though, since
so much layout is accomplished by means of JS in the kcls skin,
especially in regards to subinterfaces and nested tabbiness
dbwells [Thu, 3 Feb 2011 16:47:49 +0000 (16:47 +0000)]
Two binding fixes for manage items
The first fix is more or less cosmetic. When selecting a target unit, both areas need to refresh in order to not show the selected unit's items in the main list.
The second fix involves handling cases where moving items from one unit to another does not empty the 'donor' unit. In those cases, we need to update the contents of both the new and the old unit.
dbs [Thu, 3 Feb 2011 14:15:47 +0000 (14:15 +0000)]
Authorities: control 610/611, do not control 4xx by default
The 4xx fields in bibliographic records have not been controlled
fields for some time (1988 for CAN/MARC, 1999 for USMARC per)
http://www.loc.gov/marc/bibliographic/bd4xx.html; and
http://www.oclc.org/bibformats/en/4xx/default.shtm also lists
these as obsolete. So, remove them from the default controlled
fields in Evergreen.
Also, add 610/611 to the controlled fields list (per LP #712467).
phasefx [Wed, 2 Feb 2011 19:34:36 +0000 (19:34 +0000)]
circ.claim_return.mark_missing was superceded with circ.claim_return.copy_status. It's still lingering in 1.6.1-2.0-upgrade-db.sql, and in other branches. Thanks to bshum for noticing
dbs [Wed, 2 Feb 2011 03:28:33 +0000 (03:28 +0000)]
Apply autogenerate barcode trigger to serial.unit to enable serial checkin
Serial checkin tried to use the '@@AUTO' macro to autogenerate barcodes,
but unfortunately the required trigger had only been defined on the parent
table asset.copy and not on the child table serial.unit. Here we define the
trigger on serial.unit to resolve that problem.
erickson [Tue, 1 Feb 2011 23:39:00 +0000 (23:39 +0000)]
make sure that inline overdue fines generation completes before we attempt to void overdues fines in checkin, otherwise it's possible to create multiple services (storage and cstore) competing for the same DB row mid-transaction, resulting in cstore timeouts and rollback of checkin. This could happen with backdated or amnesty checkins
senator [Tue, 1 Feb 2011 21:39:06 +0000 (21:39 +0000)]
Acq: Improving on r19351, don't let showCreatePane() be issued repeatedly to
fill the window with redundant dialogs, since a) it looks silly, and b) the
dialogs don't work when there are more than one of them. Thanks again Dan.
senator [Tue, 1 Feb 2011 21:15:22 +0000 (21:15 +0000)]
Acq: make the "new provider" button under Admin -> Server Admin ->
Acquisitions -> Providers not produce a dialog with a ton of mysterious
whitespace. Spotted by Dan Scott.
phasefx [Mon, 31 Jan 2011 18:53:20 +0000 (18:53 +0000)]
In actor.usr_purge_data, default destination user to admin (id=1).
Destination user is where we move things like reports and acq picklists when
purging staff members. However, if we tried to purge a patron that used to be
a staff member, then destination user was being set to null, which won't work
when updating things like requestor on holds. The purge UI checks for the
STAFF_LOGIN permission on the user to be purged for determining whether to
prompt for a destination user or not.
Some alternatives to this change might include:
1) always asking for a destination user (and defaulting to admin or the
logged in staff member), or
2) robustifying the stored procedure and surrounding code to raise an
expected exception whenever this edge case hits, prompting the UI to try
again after asking for a destination user.
dbs [Mon, 31 Jan 2011 03:30:42 +0000 (03:30 +0000)]
Add basic unit tests for Evergreen Perl modules
By "basic", I mean, "Can we use them without provoking a
syntax error?" and the answer is... all but one appear to
be clean, or have a legit reason for not being able to be
used normally. Stay tuned for the culprit...
dbs [Mon, 31 Jan 2011 02:14:37 +0000 (02:14 +0000)]
Make Evergreen Perl modules installable via Module::Build to match OpenSRF
Build.PL gives us an install-time check on dependencies; right now
the required versions are not set, but we can update these easily
to start catching some of the problematic modules that have tripped
sites up in the past.
Build.PL really seems to want a top-level "OpenILS.pm" so add a placeholder
accordingly.
Adjust references to /src/perlmods/ to /src/perlmods/lib/ even though
a number of the affected scripts are probably cruft.
Use autoconf to provide the default paths in O:WWW:Web and O:WWW:Method;
next step is probably to teach autoconf to ask Build.PL to do that for
us to make the OpenILS Perl modules more independent.
dbs [Sun, 30 Jan 2011 04:31:56 +0000 (04:31 +0000)]
Use the browse method instead of startwith for Manage Authorities, too
Now that the browse method is working properly, adopt it for the
Manage Authorities interface as well so that context around the
search term can be provided.
dbs [Sun, 30 Jan 2011 04:22:08 +0000 (04:22 +0000)]
Correct authority browsing for reals
First, restore the >= enable before and after ranges in
authority_tag_sf_browse(), after I mistakenly removed it in
r19131; the second storage request for $after does not
stomp on the prior $before results, it simply gets pushed
onto the carefully constructed list of $before results,
ensuring that our target is in the middle of page 0.
Second, we're treating all of the "tag" members in the
method registration as list references now (for the purpose
of searching against 4xx/5xx in the .refs. variants), but
that was blowing up when we registered just a single tag as
a string and tried to treat the scalar as a list reference.
I could have checked to see if what we had incoming was a
reference and dance accordingly, but opted to just define
all single-tag entries as single-element arrays instead.
Applied the same to startwith.
Finally, in r19331 I had used chop() to ensure that an
exact match for startwith would be returned as element 1 on
page 0, instead of appearing as the last element of page -1.
I had said that the right way to do this would be to naco_normalize()
the value to match the normalized afr.value, and so this is what
I have done. Rather than torturously using O:A:Storage:FTS to get
at the naco_normalize() definition, I moved the function into its
own Utils package and adjusted its usage accordingly through the
affected code. One step closer to single-sourcing the function
in the database, as well?
dbs [Sat, 29 Jan 2011 18:03:26 +0000 (18:03 +0000)]
For more predictable authority browse results, use startwith until browse is sorted out
authority_tag_sf_browse() was returning unexpected results when only a small
set of authority records was loaded. This may be an indication of a corner
case, but until we sort that out the more straightforward startwith should
be used.
Also, chop the final character of the incoming search value to ensure
that an exact match is returned on page 0 instead of page -1. For example,
'Bacon, Jono.' becomes 'Bacon, Jono' for the search. (The right thing to
do, come to think of it, is probably to naco_normalize the incoming value;
perhaps next patch).
senator [Fri, 28 Jan 2011 20:51:58 +0000 (20:51 +0000)]
Serials: Add some missing permacrud permissions to IDL
7 classes (sdistn, siss, sunit, sin, sbsum, sssum, sisum) were missing IDL
perms. Appropriate permissions were added to all but sin (serial_item_note).
For the sin class, since it's several leaps away from anything that points at
an org unit, and since no existing code deals with it via PermaCrud, its
PermaCrud section was simply removed.
Some classes retain open <retrieve /> permissions, and others do not.
No new permissions were created for this. All permissions are reused from
"higher" serials objects.
Credit to Mike Rylander for spotting the omissions.
phasefx [Fri, 28 Jan 2011 19:38:57 +0000 (19:38 +0000)]
Replace the native dump() function with a wrapper function that takes an optional 2nd parameter for log level (defaults to debug)
Log level: 0 None, 1 Error, 2 Warning, 3 Info, 4 debug
A global _dump_level variable gets consulted when the function is used. The default is 2, Warning.
So by default, until we start changing things, this will suppress most of the existing dump statements. Some are slipping through the cracks based on when the function replacement happens, but I'm happy with it. We also prepend the dump msg with a label for the log level.
_dump_level could be locally customized with server/skin/custom.js
miker [Fri, 28 Jan 2011 14:58:37 +0000 (14:58 +0000)]
Patch from Thomas Berezansky addressing logical importance of various circulation and hold matrix matchpoint components.
Previous to this commit, INDB circ and holds use a pre-defined weighting set for rule ordering. This can be changed via replacing the relevant "find" functions in the database, but this is not easily done for most people.
The weight set for circ matchpoints is obtained based on the context ou of the circ (aka, where the circ is happening).
The weight set for hold matchpoints is obtained based on the item's circ library (aka, where the item lives).
Optionally, add an enabled circ.holds.weight_owner_not_circ internal flag to have the weight set for hold matchpoints be obtained based on the item's owning library (owner of the call number).
TODO: discuss promotion of circ.holds.weight_owner_not_circ to a Global Flag; wikified or docbook'd documentation and use-case examples.
Bill Erickson [Thu, 27 Jan 2011 21:00:19 +0000 (16:00 -0500)]
more holds placement work; use http referer as default redirect_to option for login page and post-holds-placement page; when a secure resource is requested, redirect to login page
phasefx [Thu, 27 Jan 2011 20:58:41 +0000 (20:58 +0000)]
Make window.print() configurable. The "Mozilla Print" strategy is internally identified as 'webBrowserPrint', and it uses XPCOM for printing the contents of an HTML document. However, in some cases we override this with a 'window.print' strategy to workaround bugs. A problem with this has been that an actual bare javascript window.print() does not honor any of configured "gPrintSettings". However, it is informed by (and in turn informs) a Mozilla preference called print.print_printer. Right now window.print (if used from within the JSAN util.print library) only gets called in when in the Default printer context/role. So we force print.print_printer to equal the configured printer for the Default role. Have I mentioned that I hate printing in Mozilla?