There are some event attributes in opac-addbybiblionumber.pl. These should be removed in favour of defining events in JavaScript. ./opac/opac-addbybiblionumber.pl: print "<html><meta http-equiv=\"refresh\" content=\"0\" /><body onload=\"window.opener.location.reload(true);self.close();\"></body></html>"; ./opac/opac-addbybiblionumber.pl: print "<html><meta http-equiv=\"refresh\" content=\"0\" /><body onload=\"self.close();\"></body></html>";
These instances I'm honestly not concerned about. I don't think there would be a benefit to trying to change the way these work. Anyone is free to re-open it if I'm not seeing an issue with this.
(In reply to Owen Leonard from comment #1) > These instances I'm honestly not concerned about. I don't think there would > be a benefit to trying to change the way these work. > > Anyone is free to re-open it if I'm not seeing an issue with this. There's not an immediate issue, but one day if/when we have a Content-Security-Policy, these will stop working. I haven't looked at the script specifically to see what the impact of that will be.
Should this be done before Bug 20397? Or should the challenges specific to 20397 be tackled first before coming back to this ticket?
(In reply to Victor Grousset/tuxayo from comment #3) > Should this be done before Bug 20397? Or should the challenges specific to > 20397 be tackled first before coming back to this ticket? Yeah, it should be done before bug 20397.
I'll reopen and take it as assignee. Probably won't do it right away but have it on my TODO list...
Created attachment 172332 [details] [review] Bug 35126: Remove onload from opac-addbybiblionumber.pl To test: Case a) Adding to a new list 1. Enable virtualshelves system preference 2. Search for any record and click it 3. On the right hand side of record view, click "Save to your lists" 4. A new pop up opens. 5. Under "Add to a new list", give any name to the list 6. Under "Add to a new list", click "Save" 7. Observe popup closing 8. Observe record view page reloading Case b) Adding to an existing list 1. Enable virtualshelves system preference 2. Search for any record and click it 3. On the right hand side of record view, click "Save to your lists" 4. A new pop up opens. 5. Under "Add to a list", select an existing list (it can be the same as the one you created in case a, it does not matter here) 6. Under "Add to a list", click "Save" 7. Observe popup closing 8. Unlike case a, observe record view page NOT reloading
Just on a call at the moment, but I'm hoping to look at this today
Yep, good enough. Works as described.
Created attachment 173247 [details] [review] Bug 35126: Remove onload from opac-addbybiblionumber.pl To test: Case a) Adding to a new list 1. Enable virtualshelves system preference 2. Search for any record and click it 3. On the right hand side of record view, click "Save to your lists" 4. A new pop up opens. 5. Under "Add to a new list", give any name to the list 6. Under "Add to a new list", click "Save" 7. Observe popup closing 8. Observe record view page reloading Case b) Adding to an existing list 1. Enable virtualshelves system preference 2. Search for any record and click it 3. On the right hand side of record view, click "Save to your lists" 4. A new pop up opens. 5. Under "Add to a list", select an existing list (it can be the same as the one you created in case a, it does not matter here) 6. Under "Add to a list", click "Save" 7. Observe popup closing 8. Unlike case a, observe record view page NOT reloading Signed-off-by: David Cook <dcook@prosentient.com.au>