Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Property:

xmlui.theme.mirage.item-list.emphasis

Example Value:

xmlui.theme.mirage.item-list.emphasis = metadata

Informational Note:

Determines which style should be used to display item lists. Allowed values: 

  • metadata: includes item abstracts in the listing and is suited for scientific articles.
  • file: immediately shows you whether files are attached to the items, by displaying a large thumbnail icon for each of the items.
    metatdate is the default value.

Property:

xmlui.theme.enableConcatenation

Example Value:

xmlui.theme.enableConcatenation = false

Informational Note:

Allows to enable concatenation for .js and .css files. Enhances performance when enabled by lowering the number of files that needs to be sent to the client per page request (as mutiple files will be concatenated together and sent as one file).  Value can be true or false.  False by default.

Property:

xmlui.theme.enableMinification

Example Value:

xmlui.theme.enableMinification = false

Informational Note:

Allows to enable minification for .js and .css files. Enhances performance when enabled by removing unnecessary whitespaces and other characters, thus reducing the size of files to be sent.  Value can be true or false.  False by default.

...

  • Concatenation and Minification techniques for css and js files.
    • The IncludePageMeta has been extended to generate URL's to the concatenated version of all css files using the same media tag.
    • The ConcatenationReader has been created to return concatenated and minified versions of the css and js files.
    • Once js and css files have been minified and concatenated, they are being properly cached. As a result, the minification and concatenation operations only need to happen once, and do not include performance overhead.
    • Caution: when minification is enabled, all code-comments will be removed. This could be a problem for comments containing copyright notices, so for files with those comments you should disable minification by adding '?nominify' after the url e.g.
      <map:parameter name="javascript" value="lib/js/jquery-ui-1.8.5.custom.min.js?nominify"/>
    • Disabled by default, these features need to be enabled in the configuration using the properties 'xmlui.theme.enableConcatenation' and 'xmlui.theme.enableMinification'
    • These features can be enabled for other themes as well, but will require an alteration of the theme's sitemap.
  • Javascript references are included at the bottom of the page instead of the top. This optimizes page load times in general.

Troubleshooting

Errors using HTTPS

DSpace 1.7.0 ships with a hardcoded http:// link for JQuery. While awaiting the implementation of this fix in an upcoming release, you can solve by in the following file: lib/core/page-structure.xsl, in the add javascript template.

Code Block


<!-- Grab Google CDN jQuery. fall back to local if necessary. Also use same http / https as site --> 
   <script type="text/javascript"> 
     var JsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
     document.write(unescape("%3Cscript src='" + JsHost + "ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
   </script> 
    <script>!window.jQuery && document.write('<script src="/dspace/static/js/jquery-1.4.2.min.js"><\/script>')</script>

Thanks Peter Dietz for providing this fix.