LP#1681095 Browser cache-busting key for longer expires Extend the support for cache-busting that we added with autogen's generation of ctx.eg_cache_hash for core JavaScript assets to other assets such as images, stylesheets, and additional JavaScript. This will enable us to set very long cache times for our assets, which can then be controlled explicitly by setting eg.cache_key in config.tt2, or by default any time you run autogen. Addresses TPAC and KPAC Signed-off-by: Dan Scott <dan@coffeecode.net> Signed-off-by: Josh Stompro <stomproj@larl.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP 1548993: Remember the Show More/Fewer Details button selection. The state of the Show More/Fewer Details button selection was previously not remembered across searches or across changes to advanced search. This commit attempts to remedy that. Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org> Signed-off-by: Jeanette Lundgren <jlundgren@cwmars.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
LP#1190508: Rename certain image files to avoid Ad Block Plus's blacklist Ad Block Plus was blocking images with /images/adv_ in their pathname. It is presumed that "adv" was short for "advertisement". I have renamed the files and the references to avoid the ABP blacklist. Signed-off-by: Dan Pearl <dpearl@cwmars.org> Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Ben Shum <bshum@biblio.org>
LP#1268636 avoid empty <ul>'s in browse Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dscott@laurentian.ca>
TPAC expert search: wrap labelled fields consistently Use a new class "nonbreaking-wrapper" with display:inline-block to keep label + input fields together, rather than the inline "whitespace: no-wrap" which did not work on Chrome (and oddly enough forced the value field to the next line). Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Clean-up of expert and numeric forms. Again, toward the mobilization of advanced searches. Allow the forms to resize happily. Signed-off-by: Bill Ott <bott@grpl.org> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Use the phrase "Add Search Row" in both advanced and expert search. Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi> Signed-off-by: Ben Shum <bshum@biblio.org>
TPAC: Address severe accessibility issues Using the Chrome Accessibility Dev Tools extension to run accessibility audits against the TPAC turned up some "severe" issues, such as input widgets lacking labels. In most cases the text for the labels was present, but it needed to be associated with a <label> element. In some other cases, it was easier to use the aria-label attribute to give the widget an accessible label. Finally, we can use the placeholder attribute where warranted as an accessible label. These changes address the first set of accessibility issues I came across via the audits and could address quickly. Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Let's inch towards valid XHTML by making POST and GET lowercase in our forms Signed-off-by: James Fournie <jfournie@sitka.bclibraries.ca> Signed-off-by: Dan Scott <dan@coffeecode.net>
TPAC advanced search org unit selector Make the advanced search org selector a bit more i18n and accessibility friendly by giving the fields an explicit label. We shouldn't really build strings out of individual parts like "in" out of context, because the translators won't know what "in" refers to; and the label elements help guide screen readers. Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Add the library selector to numeric and expert search pages. Signed-off-by: Kathy Lussier <klussier@masslnc.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
TPAC: Set autofocus appropriately for different contexts At login, the basic search bar was fighting (and winning) for the default focus rather than the username field. Additionally, in the advanced search pages, no field was getting focus. Therefore, check to see if we expect to be in a context where it makes sense to set the default focus to the basic search input field; otherwise, set the focus to the login username field or the appropriate advanced search field. Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Copy Location Search Groups : TPac org unit selector Adds support for viewing and searching on copy location groups in the tpac. Groups appear within the org unit selector, when the selector is used in a search context. Groups display below the owning org unit similar to a child org unit. Groups are displayed for all org units that meet the following criteria: search org unit, physical location, patron home org unit, plus ancestors and descendents of each. To support this, TPac gets a new "locg" CGI parameter, which contains the org unit and copy location group. It takes the form org_id:group_id. The TPac mod_perl code will extract this value and popuplate the search_ou accordingly. For consistency, we also use ctx.search_ou instead of directly checking CGI.param('loc') within the template environment. This also includes a rewrite of the org_selector.tt2 template. It changes it from a recursive routine to a depth-first while loop. I did this mainly because the recursive approach was suffering from global variable clobbering in the template environment. In theory, this new approach should be faster as well. Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Dan Scott <dan@coffeecode.net>
Propagate search scope through advanced search interfaces If a user had a chosen search scope (via the CGI "loc" parameter), it would be lost when switching to the advanced search interfaces. Now we progagate the search scope through the advanced search interfaces. Signed-off-by: Dan Scott <dscott@laurentian.ca> Signed-off-by: Bill Erickson <berick@esilibrary.com>
opac-button is more general than submit-button Didn't make sense to use a class of submit-button for reset buttons. So... Signed-off-by: Dan Scott <dscott@laurentian.ca>
Use SUBMIT buttons instead of IMAGE buttons With a bit of CSS, we can replace <input type="image"> buttons with <input type="submit"> buttons. The payoff is directly translatable values and better semantics for screen readers, etc, rather than having to set up a process of generating buttons in your colour & languages of choice - as well as fewer HTTP requests for images over the network. Note that we also replace some of the JavaScript-dependent reset / cancel links with <input type="reset"> buttons. Signed-off-by: Dan Scott <dscott@laurentian.ca>
Remove /default/ from template paths The original goal of having a /default/ component to the template path was to support alternate skins. However, Template Toolkit supports alternate skins through a more elegant mechanism of providing template overlays via template path configuration. In other words, skin files will be differentiated by the location of their root path and not because they live in a different skin directory inside the main template root. Because of this, the /default/ component in the template path serves no purpose and generally just gets in the way. As a part of this, EGWeb.pm no longer inserts the skin name into the template file path. Signed-off-by: Bill Erickson <berick@esilibrary.com>