Jeff Davis [Mon, 10 Jun 2019 16:53:44 +0000 (09:53 -0700)]
LP#1822630: fix sanitizing CGI params on place_hold_result
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jason@sigio.com>
(cherry picked from commit 019118895c94f5cc810b3f1fb95b2634a1c993b6)
Jeff Davis [Mon, 1 Apr 2019 22:13:09 +0000 (15:13 -0700)]
LP#1822630: further sanitizing of CGI params when embedded in HTML
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
(cherry picked from commit e2d401a9da3c70c1e56e518f40d0de928919990f)
Jeff Davis [Mon, 1 Apr 2019 17:00:59 +0000 (10:00 -0700)]
LP#1822630: sanitize user input before display on browse results
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
(cherry picked from commit 4402695e80dbcee5187a35de46e5e314bab1231a)
Jeff Davis [Thu, 13 Sep 2018 18:58:48 +0000 (11:58 -0700)]
LP#1559239: use rel="noopener" when opening external URLs in a new tab
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jason Stephenson <jason@sigio.com>
(cherry picked from commit 1eccaeec88a99e9792b388e95732faa7576e7164)
blake [Fri, 1 Dec 2017 22:32:22 +0000 (16:32 -0600)]
LP1735847: Remove patron info from default Hold Transit Slip
Removes most patron information from the Hold Transit Slip
in both the web and XUL client default definitions.
Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Dan Pearl <dpearl@cwmars.org> Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
Bill Erickson [Fri, 28 Jun 2019 16:29:07 +0000 (12:29 -0400)]
LP1834665 Angular catalog MARC flat text editor
Adds a set of components for editing MARC records. The main component
acts as a container with various actions (source selector, delete,
undelete, and save options). The body of this component is a tabbed
interface, one tab for the Enriched editor and one for the Flat Text
editor.
The Enriched editor tab directs the user to the AngJS version of the page.
the Flat Text editor tab implements the standard MARC flat text editor
interface.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Bill Erickson [Fri, 28 Jun 2019 16:27:35 +0000 (12:27 -0400)]
LP1834665 Import marcrecord.js to Angular
Port the marcrecord.js file into the Angular build configuration so it
may be used by the MARC editor code.
Additionally, port jquery-dependent code to vanilla JS to avoid the
jquery dependency. As a part of this, some code from the source file
was removed since it was not needed (yet, anyway). Code added back will
need to be similarly ported (mostly changing XML parsing).
Note as-is, the JS is loaded on every Angular page. We could optimize
this and have it loaded only when needed if we port it to Typescript and
integrate it into the application instead of loading it as a 3rd-party
dependancy.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
The old reporter used '::' as a path separator in some labels, while the
new version uses '->' in its place. This would normally be just a
curiosity, except that the hashes used as join aliases are generated
from these path labels. The end result is that while a report can be
cloned, if you add a field anywhere other than the top level, it
references a join alias which does not exist, and the report breaks.
Now, the method by which report templates are upgraded from v4 to v5
does not happen all in one pass, but rather a first pass is made
populate the interface, then the rest is done when the user saves the
clone. Because of this, it actually seems adequate to only fix the
label, then allow the other steps to fill in the other bits upon saving
of the report.
Thank you to J. Boyer for helping track down the culprit.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jason Boyer <jboyer@library.in.gov>
This commit addresses a variety of issues with the webstaff reporter
interface, particularly cases of cloning reports created in the XUL
client.
1. The conversion process did not account for manually selected JOIN
operations (aka nullability). These JOINs are now honored by the
conversion code.
2. The conversion process did not account for aggregate filters. These
filters are now converted where present.
3. The previous reporter interface attempted to intelligently apply LEFT
and INNER JOINs by default. The new interface applied INNER joins
exclusively by default, leading in many cases to different results.
This commit reinstates the previous logic. One side effect of this
change is that the IDL tree itself is no longer opinionated about JOIN
type, and the default JOIN is undefined.
4. The nullability selector has been expanded to allow for manual
selection of INNER joins, as they will longer be the default in some
cases.
5. Cloned-converted reports did not retain column order. The order is
now preserved.
6. Some templates created in the older interface could, in some cases,
have aggregate values set as the string "undefined" rather than
actually being undefined. This led to converted templates failing with
"column [xxx] must appear in the GROUP BY clause...", as they were
incorrectly converted as aggregates. The conversion code now accounts
for this latent bug.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Mike Risher [Wed, 10 Jul 2019 19:52:58 +0000 (19:52 +0000)]
lp1739292 merge UI displays record summary
Add the record summary to the record merge UI. Note that when one clicks
on "use as lead record" or "remove from consieration" the order of the
records changes. The record summary also will change order to match.
Signed-off-by: Mike Risher <mrisher@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/templates/staff/cat/bucket/record/t_merge_records.tt2
new file: Open-ILS/src/templates/staff/cat/share/t_record_summary_slim.tt2
modified: Open-ILS/web/js/ui/default/staff/cat/services/record.js
James Fournie [Thu, 2 May 2019 16:53:35 +0000 (09:53 -0700)]
LP1751800 - fix fields fields reversing
The pop() here will remove the last item in the array, only to add it
later with a push() a few lines later. Instead use a shift() to
preserve the order.
Signed-off-by: James Fournie <james.fournie@gmail.com> Signed-off-by: Remington Steed <rjs7@calvin.edu> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Galen Charlton [Wed, 22 May 2019 15:12:37 +0000 (11:12 -0400)]
LP#1785061: move the filter value munging to the template service
This allows the reporter app to stay a bit more focused on
display concerns.
Here's a test plan for the patch series
---------------------------------------
[1] Create a reporter template that has a filter field
and a filter operator of "In list", "Not in list", "Between",
or "Not between" and hard-code a value for that filter
in the template, separating values with a comma.
[2] Try to create a report from that template; note that it
fails with an error.
[3] Apply the patch and repeat steps 1 and 2. This time, the
report should succeed.
Note that this fix applies only to hardcoding filter values in the
template; it doesn't change any behavior when attempting to set
a filter value for any of the four operators above at the point of
creating a report.
Remington Steed [Thu, 2 May 2019 13:15:30 +0000 (09:15 -0400)]
LP#1785061: Split filter value on comma for "in list" and the like
This commit borrows directly from the XUL reporter code (see
function __default_value_event_handler () in
Open-ILS/web/reports/xul/template-config.js). Basically, when the filter
value is saved, certain cases need special treatment, such as splitting
an "in list" value on commas. This commit includes a helper function
which does the special treatment and saves the filter value. This helper
is called both when the value itself is changed, and when the operator
is changed.
LP#1722827: trim spaces from 856$9 when parsing locating URIs
This patch ensures that any leading and trailing spaces
and non-breaking-spaces in the 856$9 are ignored when
extracting the org unit shortname. As a consequence,
extraneous leading/trailing whitespace in the $9 will not
prevent the located URI from being displayed in the appropriate
places.
Michele Morgan [Wed, 23 May 2018 17:54:28 +0000 (13:54 -0400)]
LP#1511765 Fix error when checking in with zero-balance lost OU setting enabled
Fixes an error generated when checking in Lost/Long Overdue/Lost and Paid
items with no associated circ when the org unit setting
circ.checkin.lost_zero_balance.do_not_change is set to TRUE
Items can attain this state from migration, or when the associated circ
has been aged.
Jane Sandberg [Mon, 29 Jul 2019 18:56:31 +0000 (11:56 -0700)]
LP1802593: Correct formatting of language code in Angularjs, KPAC
EgWeb offers two different formats of the current locale: ctx.locale and
ctx.eg_locale. This commit configures the lang attribute in AngularJS
staff client, OPAC, and KPAC to use eg_locale, since it has the
appropriate format (e.g. en-US, fr-CA).
Also adds some tests for EgWeb's handling of language codes.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Kyle Huckins [Thu, 23 May 2019 20:53:11 +0000 (20:53 +0000)]
lp1034058 Disable Renewal Due Dates in the Past
Apply minimum date and an out of range flag to prevent
selecting or inputting a past date when renewing items from
Circulation->Renew Items or Patron->Items Out->Actions->
Renew With Specific Due Date.
To test
-------
[1] Create a loan.
[2] From the patron's Item Out page, use the Renew With
Specific Due Date action. Note that the date widget
will allow you to specify a due date in the past.
[3] From the Circulation -> Renew interface, note that
the date widget will also let you specify a due
date in the past.
[4] Apply the patch and repeat steps #2 and #3. This time,
a due date in the past cannot be entered, both via
the calendar button and by direct entry in the text
box.
Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jason Boyer [Thu, 15 Nov 2018 18:45:44 +0000 (13:45 -0500)]
LP1803584: Fix Clear button in template editor
There are multiple controllers in staff/cat/volcopy/ and
2 of them have a clearWorking() function. The template
editor controller is referencing $scope.MultiMap[] which
will never exist in the template editor, while the actual
item editor controller clearWorking() does not reference
$scope.MultiMap[], meaning that clearing multiple items
at once would not work as expected. This branch clears
up this confusion.
Signed-off-by: Jason Boyer <jboyer@library.in.gov> Signed-off-by: Beth Willis <willis@noblenet.org> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jane Sandberg [Sat, 27 Jul 2019 13:27:50 +0000 (06:27 -0700)]
LP1838136: .editorconfig matches current practices
This commit allows .editorconfig-enabled IDEs to easily adhere to
these best practices:
https://wiki.evergreen-ils.org/doku.php?id=dev:angular_dev_best_practices
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Thu, 1 Aug 2019 16:08:12 +0000 (12:08 -0400)]
LP1829567 Angular navbar access key additions
Adds keyboard shorts to the Angular navigation bar for the following
actions using the same key assignemnts as AngJS.
Patron Search
Item Status
OPAC
Check Out
Check In
Capture Holds
Renew items
Register Patron
Retrieve Last Patron
Retrieve Recent Patrons
Record In-House Use
Reprint Last Receipt
Retrieve Bib Record by TCN
Retrieve Last Bib Record
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Thu, 1 Aug 2019 16:07:56 +0000 (12:07 -0400)]
LP1829567 Angular access key improvements
1. Adds support for shift+ shortcuts.
2. Remove duplicate key assignments made within the same context. This
is especially useful in the navigation bar since some commands repeat
from different menus.
3. Indicate in the key assignemnts help page when an assignemnt has be
superseded by another assignment.
4. Open the help page in large-dialog mode for more room.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
AutoFieldWidget's searchFormat (among other things) controls
the formatting of the selected value for a drop-down, so
this patch sets it for funds as well. This patch also tidys
up whitespace.
Rogan Hamby [Fri, 9 Mar 2018 13:38:06 +0000 (08:38 -0500)]
LP#1650409: improve authority_control_fields.pl's --all and --days_back processing
When --all is used, the list of bibliographic records to process is now
retrieved via a direct database query instead of using open-ils.storage,
avoiding a potential timeout.
The query used to fetch records when --days_back is used now fetches
all records that were edited up to the specified number of days
ago. Prior to this patch, --days_back ended up fetching records
created on the current day and records edited on the --days_back
day, skipping any that were updated in between.
Garry Collum [Mon, 20 May 2019 18:41:32 +0000 (14:41 -0400)]
LP1813078 Menus are sometimes grayed out based on browser size
This patch changes a media definition in css from 800px to 768px, the md column
size for bootstrap.css. Items in the menus font color changed when the browser
was sized between 768px and 800px.
To test.
1. Expand the Circulation menu, and change the browser to a width between
768px and 800px. Notice that the menu items change to a gray color.
2. Apply the patch, and then change the width of the browser. Notice that
the menu items do not change color before the menu is collapsed.
Changed all appropriate references from copy to item. Included references to a
couple updated screenshots. Changed the name of the file from
copy_tags_cataloging.adoc to item_tags_cataloging.adoc.
Signed-off-by: Andrea Buntz Neiman <abneiman@equinoxinitiative.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Dan Briem [Fri, 5 Jul 2019 23:34:13 +0000 (19:34 -0400)]
LP#1805895 Bucket grid configuration updates do not save
Some saved columns stick, but others are ignored. Issue affects eg-grid[s]
that use the auto-fields attr to load all columns on idl-class attr. This
is because saved columns are whitelisted against the initial column config
before the auto fields are loaded.
Patch adds $scope.handleAutoFields() to egCore.hatch.getItem. This happens
after the eg-grid-fields transclude (no collisions) but before the saved
columns are whitelisted. The original call remains to handle cases where
there is no persist-key or saved config.
Test:
1. Go to Circulation->User Buckets
2. Add the Is Deleted column to the grid
3. Save columns and refresh (note Is Deleted is not visible)
4. Apply patch and repeat steps 1-3 (note Is Deleted is now visible)
Signed-off-by: Dan Briem <dbriem@wlsmail.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Jane Sandberg [Fri, 12 Apr 2019 20:03:46 +0000 (13:03 -0700)]
LP1796936: Add aria-labels to the checkboxes in web client grids
To test:
1) Go to an AngularJs grid interface. Make sure that the "Select all"
checkbox has an aria-label attribute of "All rows"
2) In the same interface, make sure that each checkbox in the
non-header rows has an aria-label like "Row 15", "Row 23", etc.
3) Repeat steps 1-2 for an Angular grid interface.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jane Sandberg [Thu, 25 Apr 2019 19:49:19 +0000 (15:49 -0400)]
LP1775920: Improve consistency in item status menus
To test:
1) Go into item status and scan in a few barcodes.
2) Select one of the items from the grid.
3) Click on the Actions menu. Note the list of actions.
4) Click the Detail View button.
5) Click the Actions menu. Note that several actions from
step 3 are missing.
6) Apply this commit.
7) Repeat step 5. Make sure that all the actions are now
available on the Detail View actions menu (although some have
slightly different names, to match the clarifying wording
introduced in lp1717551)
8) Make sure that all the actions work correctly.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Dawn Dale <ddale@georgialibraries.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Jane Sandberg [Mon, 10 Jun 2019 03:57:49 +0000 (20:57 -0700)]
LP1832146: Make sure that comboboxes don't get cut off
To test:
1) Go to the sandbox and open the accordion.
2) Open the combobox. Note that it isn't cut off.
3) Go to Administration > Acquisitions Administration
> Exchange Rates.
4) Click New Exchange Rate.
5) Go to the "From Currency" and "To Currency" fields.
6) Note that the dropdowns are visible and not cut off.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Garry Collum [Fri, 18 May 2018 23:57:42 +0000 (19:57 -0400)]
LP1766982 - CSV downloads contain the string 'null' for null values.
Adds a check for null and undefined in the getItemTextContent function
in grid.js which is called by both the code to download grid data as
CSV and for printing grids.
To test
1. Place holds on a couple of titles, one of which has no author. In the
test data TCN 226, The Crow, has no author data.
2. Pull up the Holds Pull List.
3. Download Full CSV - to download the CSV file and view it in a
spreadsheet or text editor looking specifically at the Author column.
4. Print Full Grid - to view the data in a printout, since this function
also affects printing.
5. Go back to the Holds Pull List and click on one of the barcodes under
the Current Copy column.
6. Click on the List View.
7. Download Full CSV - open the resulting file to inspect the
Alert Message data.
8. Apply patch and repeat steps 2-7.
Josh Stompro [Wed, 27 Feb 2019 21:07:43 +0000 (15:07 -0600)]
LP#1798187 - Support CRLF and LF format for item status import files
Testing Plan:
Before patch, try to import a file in CRLF end of line format that includes
leading and trailing spaces, empty lines, lines of just spaces or
barcodes with spaces. The import will fail to load those items and will
stop processing when it hits certain situations.
After patch, try to import a file in CRLF EOL format that includes barcodes
with trailing spaces, leading spaces, barcodes with spaces, and/or
empty lines. The import will load all barcodes.
Bill Erickson [Wed, 17 Apr 2019 14:51:45 +0000 (10:51 -0400)]
LP1683385 AngJS grid avoid dupe auto-fields
When generating grid fields from an IDL class in the AngJS grid, avoid
adding any fields that match fields already defined in the markup.
An example of such a grid is the Pending Item Buckets page.
To test
-------
[1] Go to Item Buckets and add an item to the Pending Items page.
[2] Note that in the column picker there are two barcode fields,
one that hyperlinks the item and one that does not.
[3] Apply the patch and repeat steps 1-2.
[4] This time, there is only one barcode column (the one that
hyperlinks the results).
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Bill Erickson [Wed, 29 May 2019 18:03:38 +0000 (14:03 -0400)]
LP1830424 Implement Angular "retrieve last bib record"
Repair the Angular navbar menu entry for "Retrieve Last Bib Record" by
replacing the copy/paste'd ng-click handler with an Angular (click)
handler and local implementation.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Galen Charlton [Fri, 24 May 2019 18:04:33 +0000 (14:04 -0400)]
LP#1796903: (follow-up) disabled the calendar button when the text input is disabled
Disabling the calendar button when the datepicker is disabled allows
ChromeVox (at least) to skip past a button that cannot be invoked
until (like is possible in the checkout page) the picker is enabled.
Jane Sandberg [Tue, 9 Oct 2018 14:37:56 +0000 (07:37 -0700)]
LP1796903: Make date picker calendar button more accessible
To test:
1) After applying this commit, navigate to a place in the Web client
that includes a date picker (such as the checkin screen).
2) Hover over the calendar button with your mouse and confirm that a
tooltip appears.
3) Verify that the button element has an aria-label attribute.
4) Verify that the button element has an aria-pressed attribute that
is false when the date picker is closed; true when it is open.
5) Use a screen reader (like NVDA or ChromeVox). Verify that when you
tab over to the date picker, the user is informed of the aria-label
and aria-pressed values
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
lp1836229 Disable Edit buttons in Merge Records when Editing
- Apply disabled attribute to Edit buttons rather than just the class,
preventing users from clicking buttons that appear disabled in the Merge UI.
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/templates/staff/cat/bucket/record/t_merge_records.tt2
Jane Sandberg [Thu, 18 Jul 2019 15:22:35 +0000 (08:22 -0700)]
LP1837067: Fixing unsubscribed Observable in Replace Barcodes dialog
To test:
1) In the experimental Angular staff catalog, open up a bib record.
2) Open the Holdings View tab.
3) Select several items.
4) Use the Actions for Selected Rows menu to Replace Barcodes
5) Change the first barcode to something recognizable. Click the
Replace Barcode button.
6) Note that the dialog opens again to ask you to replace the
barcode you just added.
7) Apply this patch.
8) Repeat steps 1-5.
9) Note that the dialog opens again to ask you to replace the next
barcode.
Also removes some unused imports, and consolidates two RxJS pipes that
were next to one another.
Bill's Additions:
Removes an unnecessary throwError which was called every time the dialog
completed.
NOTE: the source of the bug was that the Observable returned by
pcrud.search(...) was never subscribed-to, so it never fired. Calling
.toPromise() forces the observable to execute.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Though the color had started to grow on me, let's go back to neutral for
the top seach area, for now.
It both makes sense and would be useful to have a secondary decorative
color, but if we go that route, we probably want just one for the whole
application, so we will want to tread carefully there.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Let's start a place to collect some of the reasoning behind EG2 style
choices. This will help us be more consistent, and to recall why things
are as they are.
This commit does nothing groundbreaking, but rather tries mainly to
capture what is already being done.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Dan Wells [Wed, 29 May 2019 17:06:50 +0000 (13:06 -0400)]
LP#1823367 De-encapsulate holdings grid styles to fix row highlighting
By default, Angular will encapsulate CSS styles at the component level,
applying them only to the component who loads them. The encapsulation
is helpful in some circumstances, a burden in others, and can be worked
around in at least two ways.
One way is the use of ':host /deep/' in the style declaration. This
will in effect apply the style to all child components of the current
component's host, and is what we were doing here to style the grid rows
internal to the holdings component. This worked, but the encapsulated
style is created in such a way that it overrides any global styles. In
addition, /deep/ is deprecated (although with no clear replacement).
A second way to work around CSS encapsulation is to simply disable it.
Right now, our grid styles are all at the global level, as encapsulation
is disabled in the grid. Combined with the facts above, the end result
is that our new row styles always trump the grid highlight style, and
the rows no longer highlight.
There are a number of ways to work around this, but none seemed
obviously better than the others at this stage of development. This
commit does both the simplest option and the one which matches the
existing grid practice. That is, it disables CSS encapsulation for the
holdings component so that the holdings styles can coexist with, and be
overridden by, the grid styles (as needed in this case).
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Some of the text was a little hard to see, and the overall effect of
the many colors, while attractive, was also a little distracting. In
addition, the lighter blue colors were not obviously different from
our standard selected-row-highlight blue.
This commit tries a different direction, using some mild green shades
based on the standard Evergreen green color base. They are easy to
read and still accomplish the overall goal of bringing out the org
units (a little) and the call numbers (a little more).
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
LP#1777207: teach egGrid how to prepend rows more efficiently
The checkin and checkout grids in the AngularJS client have
been doing full grid refreshes when adding a checkin or
checkout to their respective grids. While this does not
result in re-fetching data for the loans that were already
processed, as more entries get added to the grid the time
it takes to do a full digest of the grid contents during a
egGrid.collect() (which empties the list of displayed rows,
then refills it), gets progressively longer. Grids that have
only ~40 entries have been observed to take several seconds
purely on the AngularJS rendering phase.
This patch teaches egGrid a new prepend() method that
takes the first element from the underlying data source and
unshifts it onto the list of displayed grid rows, saving much
rendering time. The prepend() method will also force the
grid offset back to 0 if it isn't already. Note that if
an item that would be added via prepend() might duplicate an
existing row entry, prepend() will do a full collect() instead.
If the data source has sort options set, the prepend() will
remove them. For arrayNotifier-based data sources, as are used
in the checkin and checkout grids, this means that if the user
sorts the contents of the grid, then does a circ transaction,
the new transaction will still appear at the top of the list.
Due to the way arrayNotifier currently works, the remaining
entries will retain their previous ordering.
As an implementation note, prepend() is likely going to work
/only/ for arrayNotifier grid data sources.
To test
-------
[1] In the checkin grid, check in a large number of items.
Note that the time it takes to each each item gets
progressively longer.
[2] Apply the patch and repeat step 1. This time, the time
for each checkin should not significantly vary.
[3] Verify that column sorting works as expected.
[4] Upon sorting the grid, do more checkins and note that
the new transactions show up at the top.
[5] Verify that the checkout grid continues to behave as expected.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
LP#1777207: have eg-grid generate DOM nodes only for visible columns
This patch changes an ng-show to an ng-if to generate DOM nodes
for grid cells only for visible columns. Prior to this patch, all
grid cells were generated, but the ones that corresponded to hidden
columns would simply be set as hidden.
By not generating the cells unless they're meant to be visible, grid
refreshes for wide grids (like the checkin table) render much more
quickly for a couple reasons:
- simply that there are fewer DOM nodes to process
- probably more importantly, fewer AngularJS watches get
created
To test
-------
[1] In the checkin grid, check in a large number of items, then
observe/profile timing as you change the number of visible rows.
[2] Apply the patch and repeat step 1. This time, the grid
refreshe should be measurably (and visibly) faster.
[3] Test other AngularJS grids and verify that grid display and
grid actions are normal.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Dan Wells <dbw2@calvin.edu>
Jane Sandberg [Sun, 26 May 2019 01:46:03 +0000 (18:46 -0700)]
LP1828840: Option to hide grid save settings button in angular grid
To test:
1) Apply this commit.
2) Create an eg-grid in the Angular staff client without a persistKey
attribute (or use the one in the sandbox).
3) Compile the client and open the grid in your browser. Open the
column picker menu. Note that the Save button does not display.
4) Add an arbitrary value to the persistKey attribute.
5) Repeat step 3. Note that the Save button does display.
6) Change the value of the persistKey attribute to "disabled".
7) Repeat step 3. Note that the Save button does not display.
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
Galen Charlton [Fri, 24 May 2019 15:06:04 +0000 (11:06 -0400)]
LP#1830394: remove console noise from the holdings editor
This patch removes browser console noise that occurs (among other
places) when moving a working item to the completed list in
the holdings editor
TypeError: "$scope.working.MultiMap[keys[i]] is undefined"
hasMulti https://evergreen.example.org/js/ui/default/staff/cat/volcopy/app.js:1203
...
To test
-------
[1] Open the holdings editor to add or edit an item, then open the
browser debug console.
[2] Make a change and move the item from working to complete. Note
that the error message above shows up repeated in the
console log.
[3] Apply the patch and repeat steps 1 and 2. This time, the errors
should not appear.
This setting was added to the database with the 'eg.' prefix, but in
the code it was not used. The end effect was that the setting likely
worked, but was not saved in the way expected.
This makes the setting name in the code match the DB.
Signed-off-by: Dan Wells <dbw2@calvin.edu> Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Galen Charlton [Mon, 17 Jun 2019 14:46:14 +0000 (10:46 -0400)]
LP#1833080: have eg-bool recognize IDL bool string values
This patch updates eg-bool so that it can format both
true Boolean and IDL bool string values (i.e., 't' or 'f'). Prior
to this patch, IDL bool values would always be rendered as 'Yes'.
This patch relaxes the type restriction on the value setter
and getter; unfortunately, there's no way to overload the
setter or making it accept (say) boolean|string.A
This patch also supplies some unit sets.
To test
-------
[1] View an Angular grid that has Boolean fields. The Copy
Status server admin page is a good one.
[2] Note that the boolean values are all rendered as "Yes".
[3] Apply the patch and repeat step 1. This time, false
values should be displayed as "No".
[4] Verify that 'npm run test' for the Angular app passes.
Sponsored-by: PaILS Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org> Signed-off-by: Bill Erickson <berickxx@gmail.com>
The new Observable-driven confirm dialogs return true or false depending
on the user response (or nothing if dismissed), so the calling code needs
to verify the user confirmed the request before continuing.
Removed an unused confirm dialog import for clarity.
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Bill Erickson [Wed, 3 Apr 2019 16:14:52 +0000 (12:14 -0400)]
LP1823041 Angular dialogs return observables
Dialog.open() now returns an observable to the caller. This allows
dialogs to pass 0 or more success events, error events, and close events
each as descrete actions to the caller.
Existing dialogs are updated to expect an Observable response to
.open().
Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>