[OPEN-ILS-DEV] Staff Client - Custom HTML pagefunctionality(howto)
Whalen, Liam
Liam.Whalen at NRCan-RNCan.gc.ca
Fri Aug 5 11:27:35 EDT 2011
> Behalf Of Jason Etheridge
>
> On Thu, Aug 4, 2011 at 4:22 PM, Whalen, Liam
> <Liam.Whalen at nrcan-rncan.gc.ca> wrote:
> > I know I need to include some javascript files to get this running,
> > and I have been trying to figure out which ones for a bit now. Is
> > there a website somewhere that explains what I need to do to get a
> > valid xulG object? Currently, I have an a link that uses
> onclick to
> > execute the code provided above, but it gives me the
> following error: 'TypeError:
> > xulG.url_prefix is not a function'.
>
> Most tabs the staff client opens will get a xulG (though
> maybe not before the onload event), however, any page change
> (say following an <a href>) will wipe away xulG.
>
> Note, there is a XUL_BROWSER interface that lets you put an
> arbitrary page in a xul <browser/> element (which is like an
> iframe), and will re-inject xulG into the content window on
> every page load. It may be worth loading the portal page in
> such, but some libraries have links out to the wild internet,
> and you don't want those getting access to xulG. In general,
> the staff client isn't safe for web browsing, and will be
> getting less safe as time goes on.
Thank you for the pointers. I have managed to get my code working with the information you gave me. What I am doing is displayed a list of record ids inside the Staff Client. These record ids belong to records with bad URLs in the 856 tag. Staff can then click on the record id and go right to the record with a bad URL (hopefully to edit it). I used this code which you provided earlier:
> var content_params = {
> 'session' : ses(),
> 'authtime' : ses('authtime'),
> 'opac_url' : xulG.url_prefix(
> urls.opac_rdetail
> ) + '?r=' + record_id
> };
However I had to remove these lines
> 'session' : ses(),
> 'authtime' : ses('authtime'),
When I included those lines, the XUL_OPAC_WRAPPER took me to the advanced search functionality. Without them I go to the correct record. Are those two lines necessary for tracking who is working on the record? What I am concerned about is the user clicking on one of the listed record ids, making a change and no last edited information getting recorded because the 'session' for the tab wasn't initialized. It sounds silly when I write it, and I doubt there is a per tab session, but I figured I would check just to make sure I don't do things in the wrong manner.
Liam
More information about the Open-ils-dev
mailing list