Friday, July 13, 2018

IE and Conditional Styles, eXist indexing...

So two challenges this week:


  1. I had created an angular javascript addition to the catalog to display the gift book information of a title, so you can click on it, and then get a listing of all gift books from that donor. Well I have this in place for most of the year, and just happened to notice in IE, that it was not working, and it was placing the words "Gift of" on each title since the stylesheet declaration to not display was not working.

    For the longest time, I thought it was strictly a CSS issue and IE, but the more I looked into it I saw that my conditional CSS was not getting populated with anything, and just was style="$ctrl.show".

    So I started looking for information on CSS, angular ctrl elements, and IE. And sure enough, found that you must use ng-style instead of style, otherwise, some browsers like IE will remove invalid style attribute values (presence of {} etc makes it invalid) before even angular has a chance to render it. When you use ng-style angular will calculate the expression and add the inline style attributes to it.

    However, even just flipping to just ng-style, was not enough, I needed to make it ng-attr-style <span ng-attr-style="$ctrl.show"> and now it works properly in both browsers. I also rewrote what I had as a module which is better than just a component.
  2. The other challenge has been eXist, and I could not figure out how I was not able to get any results in my eXist queries to just search for full text, and I know that there must have been something different that I was doing as it had worked before.

    Below is an example:

    http://exist.willamette.edu:8080/exist/apps/METSALTO/api/SearchQuery.xquery?q=all^Editorial^phrase&collection=studentpubs&type=search

    and this returns a json string of matches, but for some reason, it would work any other collection but the one I had been working on in studentpubs. I think it came down to who I was logged in when I ran the full-text indexing query. Ran as administrator I would never get results, re-ran as myself and I get results just fine now.
I'm just glad I did not have to ponder these issues over the weekend.

Friday, July 6, 2018

ArchivesSpace Proxy...

This task should have been easier than it was. So I needed to proxy archivesspace similar to how proxy Kaltura and Omeka from libmedia.

Usual apache proxy, but on archivesspace, there are some config settings in the ruby application that need to be set.

AppConfig[:frontend_url] = "http://libtest-1.willamette.edu:8080/archives/asadmintest"

AppConfig[:public_url] = "http://libtest-1.willamette.edu:8081/archives/astest"

So for them, the staff side is the frontend URL. Once I had these set up I then set the proxy pass on libmedia:

ProxyPass /archives/asadmin http://archivesspace.willamette.edu:8080/archives/asadmin
ProxyPassReverse /archives/asadmin http://archivesspace.willamette.edu:8080/archives/asadmin

ProxyPass /archives/as http://archivesspace.willamette.edu:8081/archives/as
ProxyPassReverse /archives/as http://archivesspace.willamette.edu:8081/archives/as

Thought that would be it, but there was still a link on the main page of the interface displaying archivesspace.willamette.edu

So I added this to the config.rb file:

AppConfig[:frontend_proxy_url] = 'https://libmedia.willamette.edu/archives/asadmin'
AppConfig[:public_proxy_url] = 'https://libmedia.willamette.edu/archives/as'

Now my front page link is properly pointing at the proxied address.

Chrysalis, Chat Widget

I worked on a couple of systems projects over the last two weeks.


  1. The Chrysalis
  2. New Primo Chat widget

    This one I had been wanting to get in place for a long time. This last year since we moved to the new Primo Interface we were just using a link in the interface to our chat page, and it was not really a widget. On last Friday someone was nice enough to alert the ExLibris community that NYU libraries had posted code to GitHub that used the libraryh3lp service.

    I was able to install with npm, then I grabbed the code and integrated is as custom addition to our Primo Explore environment. The chat widget came out well, I imagine we will tweak colors and location as the summer goes on.