LP#1815968 - Self Check Audio Alerts The method of playing audio alerts seems to not be working in modern browsers. It seemed to work in firefox V40, but no longer in V68. Adding the autoplay element and then immediately removing it prevents the audio from playing. I've also noticed in the past that the audio had been cut off before the file was fully played. Using the .play() method does seem to work in newer versions of Firefox and Chrome. Tested with Chrome V90 and Firefox V78.10.1esr. Testing Plan: 1. Enable Self Check Audio Alerts Library Setting. 2. See the docs for setting up the default audio alerts. https://docs.evergreen-ils.org/reorg/3.1/command_line_admin/_self_check_interface.html 3. Launch self check interface, create a workstation and try to trigger an alert. https://eg-server.you.com/eg/circ/selfcheck/main 4. entering a fake barcode will trigger an alert which should not be audible. Apply the fix: 1. Launch self check interface, and reload/clear cache. 2. Enter a fake barcode to trigger an audio alert. 3. The audio alert should now be audible. Signed-off-by: Josh Stompro <stompro@stompro.org> Signed-off-by: Erica Rohlfs <erica.rohlfs@equinoxOLI.org> Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
webstaff: add routine for Dojo JS to detect if running in iframe Sometimes legacy Dojo interfaces may need to adjust their behavior if they're embedded in the web staff client. This patch adds a new utility function, openils.Util.inIFrame(), to detect if such code is running in an iframe. If so, the presumption is that iframe belongs to the web staff client. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Window.open fixes Add a window.open compatible "browser" file for unsecured calls. Add "chrome" to most window.open calls to bypass the wrapper. Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Dan Scott <dscott@laurentian.ca>
AutoSuggest Get an autocompleting dialog underneath basic search boxes. If activated, the dialog appears in both the JavaScript OPAC and the Template Toolkit OPAC. Mike Rylander and Bill Erickson largely designed and spec'ed out this feature, especially at the database level. Lebbeous Fogle-Weekley and Mike Rylander did the programming. How it works, for site administrators ------------------------------------- Once the code is installed, including database stored procedures, (re)ingesting your bibliographic records will populate two new tables needed by AutoSuggest: metabib.browse_entry and metabib.browse_entry_def_map. Yes, for now this means that the size of your database in per-record terms will be greater. The browse_entry data we generate is extremely similar to facet data, so it's possible that in the future we can blend them into the same thing at the database level, and save some space. To control what gets indexed in the metabib.browse_* tables, set the boolean 'browse_field' column for each row in config.metabib_field as desired Numbers 15 (keyword|keyword) and 16 (subject|complete) should generally be set to false. The config.metabib_class table has a new 'bouyant' column. Setting this to true means that when a user is typing in the OPAC search box with a search class selector set to, say, 'Subject', and the cmc row for 'Subject' has 'bouyant' set to true, the top suggestions will definitely come from the Subject fields of MARC records (if any). 'restrict' is like 'bouyant', only stronger. In that case suggestions /only/ come from the selected class. This is the idea behind the 'restrict' column (in both the config.metabib_class table and the config.metabib_field table): For any given class or field, if restrict is true AND the user at the OPAC has selected that same class or field from the search class dropdown, then autosuggestions will only come from that class or field in the record. You never want this column to be true for keyword, because we don't index keywords for browse/autosuggest purposes (we would get giant blobs of information as autosuggestions, and you don't want that (really)). You don't really want it to be true for most classes and fields. If the user sets the dropdown to "subject" and start typing "harry potter", the user really wants matches from the "title" class too (although other things being equal, matches from the "subject" class will rise to the top). If you have a speciality index, you *may* want to set restrict to true for that particular field. For a song title index, for example. To take advantage of this, you would also have to customize your OPAC to have an entry in the search class dropdown for 'title|songtitle' (or whatever's appropriate for your specialty index). This is easy to do and should be covered somewhere in documentation for both the JSPAC and the TPAC. The order of suggestions otherwise has mostly to do with how well what users have typed matches what's in your bib records, and the value of the weight column of the relevant config.metabib_field row. Examine the code if you're curious to know more or want to make adjustments. The master on/off switch for AutoSuggest is a new row in in config.global_flag named 'opac.use_autosuggest'. Set its 'enabled' column to false to turn off AutoSuggest. If you don't want your suggestions to be limited to whatever's OPAC visible at the search org, set the 'value' column to anything that does not contain the string 'opac_visible'. This could be a good idea if AutoSuggest seems slow on a large site. Turning this on means introducing Dojo in your TPAC. I tried to keep it minimal, for load time's sake. There's no fieldmapper or IDL stuff play. For now, turning this feature off will avoid loading Dojo in your TPAC. Managing the little stuff ------------------------- CSS classes that affect the look of suggestions are in this file for the TPAC: Open-ILS/web/css/skin/default/opac/style.css and in this file for the JSPAC: Open-ILS/web/opac/skin/default/css/layout.css At bottom, autosuggest is shaped by PostgreSQL's Full Text Search features. Some of the arguments that are passed to TS_RANK_CD() and TS_HEADLINE() are expoposed via options to the openils.widget.AutoSuggest and openils.AutoSuggestStore modules, which have comments. You can customize your OPAC files to invoke these with your desired options without touching much actual code. Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>
Mark email addresses and phone numbers invalid This comes from an idea from Jeff Godin. For staff to indicate an email address or phone number "invalid," for whatever definition of "invalid" has meaning at the institution (as in invalid addresses today), there is now a UI control in the patron editor. This UI control invokes a middle layer method that will clear the email (or phone) field from actor.usr, and create a corresponding standing penalty against the user, for staff to notice next time they bring up said patron in the staff client. Such penalties will be archived whenever that patron's email address or phone number is updated again. The middle layer method is a wrapper around a method that may take different parameters (like an email address instead of a patron ID) to potentially support future uses such as invalidating email addresses automatically in batch. Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com> Signed-off-by: Bill Erickson <berick@esilibrary.com>
Serials: A batch of improvements to the caption/pattern wizard - Using a numeric frequency ($w) now pre-selects the regularity page - Switch the regularity page from a box layout to a grid layout for legibility - Simplify and unify month/date control pairs, enforcing correct limits on days in each month - Scrollbars! - If the user creates $y data in the regularity page, but then unchecks the "use specific regularity information" box, the $y stuff will be correctly excluded from the compiled pattern code. - "Display in Holding Field" replaced with text that better explains what it means - The wizard's dialog window has a title now - In alternate serials control -> subscription details -> captions/patterns tab, if the user has already typed something in the Pattern Code field, they now get a warning that using the wizard will erase their existing work if they click the Wizard button - The captions/pattern tab now treats pattern codes as immutable once created, which is what was apparently intended from the beginning. See http://list.georgialibraries.org/pipermail/open-ils-dev/2010-May/006079.html git-svn-id: svn://svn.open-ils.org/ILS/trunk@19272 dcc99617-32d9-48b4-a31d-7c20da2025e4
Serials: provide a way for users to create and modify serial items Generally, these are created by caption and pattern-based prediction, and modified by receiving. However, some circumstances will warrant manually creating items, and there need to be significant bumper rails around that process, as it's otherwise easy to make items that don't respect certain assumptions of the serials logic (you can still accomplish this if you're trying, but it's harder to do than it would be if you had the anarchy of a more straightforward AutoGrid interface). Access the new interface by clicking any link in the Label column of the Issuances tab of the Alternate Serials Control Subscription Details inteface. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19125 dcc99617-32d9-48b4-a31d-7c20da2025e4
Provide a mechanism to load any random JS file via dojo.require()-ish syntax. Why would we want to do such a thing, you might ask? Well, the short answer is that Firefox hates pages that have more than one script block (inline is worse than tag) that contains pre-onLoad XHR. So, this allows us to pull the actual loading of JS from the same domain as the page into an inline block. This allows us to eliminate the WSOD on FF by pulling all (dangerous) JS into a single, final inline block, after which we don't care if the DOMContentLoaded event fires -- that's when it should fire, structurally -- but in FF it may fire for a different reason (bug) than it should (fell of the end of the page in the rendering engine). git-svn-id: svn://svn.open-ils.org/ILS/trunk@18964 dcc99617-32d9-48b4-a31d-7c20da2025e4
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. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18763 dcc99617-32d9-48b4-a31d-7c20da2025e4
Serials batch receive: usability improvements s/fundamental periodicity/frequency/ Smart copy location batch applicator Dedup call numbers with same label in batch applicator Tooltips on the holding lib column to show dist label and stream routing label git-svn-id: svn://svn.open-ils.org/ILS/trunk@17796 dcc99617-32d9-48b4-a31d-7c20da2025e4
AutoFieldWidget now shows timestamps correctly. Timestamps used to be a little bit off because of Dojo's limited parsing of ISO6801 stamps. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17491 dcc99617-32d9-48b4-a31d-7c20da2025e4
added util function for printing an html string; use new func for PO printing; TODO, use new func in selfcheck code to reduce duplication git-svn-id: svn://svn.open-ils.org/ILS/trunk@17270 dcc99617-32d9-48b4-a31d-7c20da2025e4
repaired class name typo (thanks dbs). made args more generally useable git-svn-id: svn://svn.open-ils.org/ILS/trunk@17210 dcc99617-32d9-48b4-a31d-7c20da2025e4
DOM text/pattern highlighter openils.Util.hilightNode( node, [pattern1, pattern2, ...], {classname:foo} ); git-svn-id: svn://svn.open-ils.org/ILS/trunk@17205 dcc99617-32d9-48b4-a31d-7c20da2025e4
Provide a handy method for dojo-based interfaces to correctly show timestamps from fieldmapper object fields. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17082 dcc99617-32d9-48b4-a31d-7c20da2025e4
repaired bug where parsing intervals with months failed becuase dojo.date.add() wants the full word 'months' whereas postgres stores them abbreviated as 'mons' git-svn-id: svn://svn.open-ils.org/ILS/trunk@16846 dcc99617-32d9-48b4-a31d-7c20da2025e4
Acq: bugfixes for "Import Catalog Records by ID" Previously, this interface did not correctly interpret realistic CSV data as produced by the Reporter module, as it was intended to do. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16729 dcc99617-32d9-48b4-a31d-7c20da2025e4
Acq: Towards slick integration of granular un-receive in the PO interface. This adds good UI support for lineitem unreceive. The bulk of this commit, however, is in middle-layer rearrangements to make it easier to keep track of changing lineitems and the POs that they belong to in a long-lived client side interface. In other words, when you receive an LI in a PO, the LI table doesn't only hide the receive button, but keeps track of the LI's state (received or something else) and shows you the proper controls in any case. Same for unreceive. Similar thing coming very soon for lineitem details (copies). git-svn-id: svn://svn.open-ils.org/ILS/trunk@15593 dcc99617-32d9-48b4-a31d-7c20da2025e4
plugged in audio alerts for selfcheck. local config is managed by TT path overriding. at least until there's a need to make it fancier. TODO: add the org setting that turns on audio alerts for selfcheck git-svn-id: svn://svn.open-ils.org/ILS/trunk@15021 dcc99617-32d9-48b4-a31d-7c20da2025e4
added a util function to play an audio file via url using the HTML5 <audio> element. no attempt was made to support browsers that don't yet support <audio> git-svn-id: svn://svn.open-ils.org/ILS/trunk@14998 dcc99617-32d9-48b4-a31d-7c20da2025e4