[ 
https://jira.duraspace.org/browse/DS-843?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Bosman resolved DS-843.
---------------------------

    Resolution: Fixed

If a script block is specified in a theme xsl file and that script makes use of 
a function in a JavaScript file, it won't work because in Mirage javascript 
files are imported at the very bottom of the page to improve (perceived) load 
speeds. So the browser encounters the function call (in the script block) 
before the function's definition (in the js file) and fails.

If at all possible, JavaScript blocks should be avoided and .js files should be 
used instead. But there are cases where the theme xsl is the most logical place 
to put the script, if it needs to be dynamically generated based on parts of 
the DRI or METS that can be easily retrieved using xpath for example. So there 
still needs to be a way for those scripts to work in Mirage.
 
The solution here is to define an array of JavaScript functions 
(runAfterJSImports) in the page head. Then, wrap the contents of each in-page 
script block in a function and add that function to the array. At the bottom of 
the page, after all javascript files have been imported, the functions in the 
array will be executed in order.

> Autocomplete in authority control contains small errors in Mirage
> -----------------------------------------------------------------
>
>                 Key: DS-843
>                 URL: https://jira.duraspace.org/browse/DS-843
>             Project: DSpace
>          Issue Type: Bug
>          Components: XMLUI
>    Affects Versions: 1.7.0
>            Reporter: Ben Bosman
>            Assignee: Ben Bosman
>             Fix For: 1.7.1, 1.8.0
>
>
> Only the last autocomplete on a submission page works in Mirage

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.duraspace.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to