Permalink
Browse files

[DS-710] New Base Theme For DSpace 1.7.0

git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5549 9c30dcfa-912a-0410-8fc2-9e0234be79fd
  • Loading branch information...
1 parent 4a28f56 commit 2c4546bec2d5b5711234e8666c0b1e9920b4c822 @benbosman benbosman committed Oct 22, 2010
View
23 dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/utils/XSLUtils.java
@@ -40,16 +40,16 @@
package org.dspace.app.xmlui.utils;
/**
- * Cuts off the string at the space nearest to the targetLength if there is one within the
- * maxDeviation, or at the targetLength if none is found
+ * Utilities that are needed in XSL transformations.
*
* @author Art Lowel (art dot lowel at atmire dot com)
*/
public class XSLUtils {
/*
- * Cuts off the string at the space nearest to the targetLength if there is one within the
- * maxDeviation, or at the targetLength if none is found
+ * Cuts off the string at the space nearest to the targetLength if there is one within
+ * maxDeviation chars from the targetLength, or at the targetLength if no such space is
+ * found
*/
public static String shortenString(String string, int targetLength, int maxDeviation) {
targetLength = Math.abs(targetLength);
@@ -58,24 +58,23 @@ public static String shortenString(String string, int targetLength, int maxDevia
return string;
- int currentLength = targetLength;
int currentDeviation = 0;
while (currentDeviation <= maxDeviation) {
try {
- if (string.charAt(currentLength) == ' ')
- return string.substring(0, currentLength) + " ...";
- if (string.charAt(currentLength + currentDeviation) == ' ')
- return string.substring(0, currentLength + currentDeviation) + " ...";
- if (string.charAt(currentLength - currentDeviation) == ' ')
- return string.substring(0, currentLength - currentDeviation) + " ...";
+ if (string.charAt(targetLength) == ' ')
+ return string.substring(0, targetLength) + " ...";
+ if (string.charAt(targetLength + currentDeviation) == ' ')
+ return string.substring(0, targetLength + currentDeviation) + " ...";
+ if (string.charAt(targetLength - currentDeviation) == ' ')
+ return string.substring(0, targetLength - currentDeviation) + " ...";
} catch (Exception e) {
//just in case
}
currentDeviation++;
}
- return string.substring(0, targetLength) + "...";
+ return string.substring(0, targetLength) + " ...";
}
}
View
29 dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/Mirage.xsl
@@ -4,28 +4,28 @@
Mirage.xsl
Version: $Revision: 3705 $
-
+
Date: $Date: 2009-04-11 17:02:24 +0000 (Sat, 11 Apr 2009) $
-
+
Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
Institute of Technology. All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Hewlett-Packard Company nor the name of the
Massachusetts Institute of Technology nor the names of their
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -41,10 +41,10 @@
-->
<!--
- TODO: Describe this XSL file
+ TODO: Describe this XSL file
Author: Alexey Maslov
-
--->
+
+-->
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
@@ -57,17 +57,18 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
-
+
<xsl:import href="../dri2xhtml-alt/dri2xhtml.xsl"/>
+ <xsl:import href="lib/xsl/core/global-variables.xsl"/>
<xsl:import href="lib/xsl/core/page-structure.xsl"/>
<xsl:import href="lib/xsl/core/navigation.xsl"/>
<xsl:import href="lib/xsl/core/elements.xsl"/>
<xsl:import href="lib/xsl/core/forms.xsl"/>
<xsl:import href="lib/xsl/core/attribute-handlers.xsl"/>
<xsl:import href="lib/xsl/core/utils.xsl"/>
- <xsl:import href="lib/xsl/aspects/administrative/administrative.xsl"/>
- <xsl:import href="lib/xsl/aspects/artifactbrowser/item-view.xsl"/>
- <xsl:import href="lib/xsl/aspects/artifactbrowser/item-list.xsl"/>
+ <xsl:import href="lib/xsl/aspect/administrative/administrative.xsl"/>
+ <xsl:import href="lib/xsl/aspect/artifactbrowser/item-list.xsl"/>
+ <xsl:import href="lib/xsl/aspect/artifactbrowser/item-view.xsl"/>
<xsl:output indent="yes"/>
View
24 dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/lib/css/print.css
@@ -3,25 +3,25 @@
*
* print styles
*/
-@media print {
- * { background: transparent !important; color: #444 !important; text-shadow: none; }
+* { background: transparent !important; color: #444 !important; text-shadow: none; }
- a, a:visited { color: #444 !important; text-decoration: underline; }
+a, a:visited { color: #444 !important; text-decoration: underline; }
- a:after { content: " (" attr(href) ")"; }
+a:after { content: " (" attr(href) ")"; }
- abbr:after { content: " (" attr(title) ")"; }
+abbr:after { content: " (" attr(title) ")"; }
- .ir a:after { content: ""; } /* Don't show links for images */
+.ir a:after { content: ""; } /* Don't show links for images */
- pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
- img { page-break-inside: avoid; }
+img { page-break-inside: avoid; }
- @page { margin: 0.5cm; }
+@page { margin: 0.5cm; }
- p, h2, h3 { orphans: 3; widows: 3; }
+p, h2, h3 { orphans: 3; widows: 3; }
- h2, h3{ page-break-after: avoid; }
-}
+h2, h3{ page-break-after: avoid; }
+
+#no-js-warning-wrapper{ display: none; visibility: hidden; }
View
146 dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/lib/css/style.css
@@ -104,6 +104,7 @@ select.multiple {
color: #1F3F5E;
}
+#no-js-warning,
#ds-trail,
#ds-header,
#ds-footer,
@@ -114,6 +115,7 @@ select.multiple {
}
/*ie6 uses quirks mode for strict xhtml pages, and in quirks mode margin: auto; doesn't center things*/
+.ie6 #no-js-warning-wrapper,
.ie6 #ds-trail-wrapper,
.ie6 #ds-header-wrapper,
.ie6 #ds-footer-wrapper,
@@ -259,6 +261,7 @@ p {
margin-bottom: 10px;
}
+#aspect_eperson_EditProfile_list_form,
.submission fieldset.ds-form-list,
.administrative fieldset.ds-form-list {
margin-bottom: 25px;
@@ -280,57 +283,94 @@ td {
vertical-align: middle;
}
+.ds-button-field,
+#aspect_eperson_StartRegistration_list_registration-progress li {
+ background-color: #6d859c;
+ border: 1px solid #1F3F5E;
+ padding: 2px 5px;
+ color: #FFFFFF;
+ font-weight: bold;
+ cursor: pointer;
+}
+
+#aspect_eperson_StartRegistration_list_registration-progress li {
+ cursor: default;
+}
+
+#aspect_eperson_StartRegistration_list_registration-progress li.arrow {
+ background-color: inherit;
+ border: none;
+ color: inherit;
+ font-weight: normal;
+}
+
+.ie6 #aspect_eperson_StartRegistration_list_registration-progress li.arrow,
+.ie7 #aspect_eperson_StartRegistration_list_registration-progress li.arrow {
+ background-color: #FFFFFF;
+ color: #444444;
+}
+
+.ie6 #aspect_eperson_StartRegistration_list_registration-progress li.arrow {
+ padding-top: 5px;
+}
+
ul.ds-progress-list {
margin: 0 0 10px 0;
padding: 2px 0;
text-align: center;
}
ul.ds-progress-list li {
- font-weight: bold;
- overflow: hidden;
- display: inline;
- padding: 4px 3px;
- margin-top: 2px;
- margin-left: 3px;
- max-width: 400px;
- line-height: 20px;
+ font-weight: bold;
+ overflow: hidden;
+ display: inline;
+ padding: 0;
+ margin: 0;
+ max-width: 400px;
}
ul.ds-progress-list li.button {
- background-color: inherit;
- border: none;
- padding: 1px;
- margin-top: 2px;
- margin-left: 0;
+ padding: 0;
}
ul.ds-progress-list li.button input.ds-button-field {
font-size: 77%;
}
-ul.ds-progress-list li.current.button input.ds-button-field {
- color: #0AAF0A;
+.ie6 ul.ds-progress-list li.button input.ds-button-field,
+.ie7 ul.ds-progress-list li.button input.ds-button-field {
+ padding-left: 0;
+ padding-right: 0;
}
-ul.ds-progress-list li.disabled.button input.ds-button-field {
- color: #B8B8B8;
+ul.ds-progress-list li.current input.ds-button-field,
+#aspect_eperson_StartRegistration_list_registration-progress li.current {
+ background-color: #499c73;
+ border: 1px solid #1f5e3f;
}
-
-ul.ds-progress-list li.current {
- color: #50B728;
- background-color: inherit;
- border-color: #D8F5D8;
+ul.ds-progress-list li.disabled input.ds-button-field
+#aspect_eperson_StartRegistration_list_registration-progress li.disabled {
+ background-color: #F0F2F5;
+ border: 1px solid #D8E8EB;
+ color: #444444;
+ cursor: default;
}
+
ul.ds-progress-list li.arrow {
border: none;
background: none;
font-size: 116%;
font-weight: normal;
- margin-left: 0;
- margin-right: 0;
+ margin-left: 3px;
+ margin-right: 3px;
+}
+
+.ie6 ul.ds-progress-list li.arrow {
+ height: 25px;
+ width: 25px;
+ margin: 0;
}
textarea.ds-textarea-field,
@@ -370,7 +410,8 @@ table textarea.ds-textarea-field {
width: 570px;
}
-#aspect_administrative_item_EditItemMetadataForm_field_language,
+#aspect_administrative_registries_EditMetadataSchema_list_edit-schema-new-field-form .ds-text-field,
+#aspect_administrative_item_EditItemMetadataForm_field_language,
.ds-composite-component input.ds-text-field {
width: auto;
}
@@ -397,7 +438,7 @@ input.input.ds-password-field:focus {
}
span.error {
- clear: both;
+ clear: both;
display: block;
color: #c22121;
font-size: 0.9em;
@@ -455,7 +496,7 @@ li.ds-form-item.last {
margin-bottom: 0;
}
-li.ds-form-item label.ds-form-label{
+li.ds-form-item .ds-form-label{
font-weight: bold;
font-size: 123.1%;
}
@@ -484,7 +525,7 @@ label.ds-composite-component .ds-select-field {
.ds-form-content input.ds-button-field {
font-size: 93%;
}
-
+
#aspect_submission_StepTransformer_field_dc_date_issued_year,
#aspect_submission_StepTransformer_field_dc_date_issued_day {
width: 50px;
@@ -499,7 +540,7 @@ span.composite-help,
span.field-help {
display: block;
font-size: 93%;
- margin-top: 3px;
+ margin-top: 3px;
width: 506px;
text-align: justify;
}
@@ -521,7 +562,7 @@ span.field-help {
.ds-previous-values {
margin-top: 10px;
- clear: both;
+ clear: both;
}
#aspect_submission_Submissions_div_submissions .ds-static-div,
@@ -620,10 +661,14 @@ span.field-help {
margin:0;
}
+.pagination-masked.top {
+ margin-top: 5px;
+}
+
.ds-artifact-list {
list-style: none;
margin: 0;
- line-height: 153.9%;
+ line-height: 153.9%;
}
.file-wrapper,
@@ -733,6 +778,8 @@ form.search .field-help {
margin-bottom: 30px;
}
+#aspect_administrative_registries_EditMetadataSchema_table_metadata-schema-edit-existing-fields,
+#aspect_administrative_registries_MetadataRegistryMain_table_metadata-registry-main-table,
#aspect_administrative_registries_FormatRegistryMain_table_bitstream-format-registry,
#aspect_submission_Submissions_table_unfinished-submissions,
#aspect_submission_Submissions_table_submissions-inprogress,
@@ -742,6 +789,8 @@ table.detailtable {
border-collapse: collapse;
}
+#aspect_administrative_registries_EditMetadataSchema_table_metadata-schema-edit-existing-fields tr,
+#aspect_administrative_registries_MetadataRegistryMain_table_metadata-registry-main-table tr,
#aspect_administrative_registries_FormatRegistryMain_table_bitstream-format-registry tr,
#aspect_submission_Submissions_table_unfinished-submissions tr,
#aspect_submission_Submissions_table_submissions-inprogress tr,
@@ -750,13 +799,17 @@ table.detailtable tr {
border: 1px solid #ebebeb;
}
+#aspect_administrative_registries_EditMetadataSchema_table_metadata-schema-edit-existing-fields tr.even,
+#aspect_administrative_registries_MetadataRegistryMain_table_metadata-registry-main-table tr.even,
#aspect_administrative_registries_FormatRegistryMain_table_bitstream-format-registry tr.even,
#aspect_submission_Submissions_table_unfinished-submissions tr.even,
#aspect_submission_Submissions_table_submissions-inprogress tr.even,
table.detailtable tr.even {
background-color: #fafafa;
}
+#aspect_administrative_registries_EditMetadataSchema_table_metadata-schema-edit-existing-fields td,
+#aspect_administrative_registries_MetadataRegistryMain_table_metadata-registry-main-table td,
#aspect_administrative_registries_FormatRegistryMain_table_bitstream-format-registry td,
#aspect_submission_Submissions_table_unfinished-submissions td,
#aspect_submission_Submissions_table_submissions-inprogress td,
@@ -767,6 +820,8 @@ table.detailtable td {
vertical-align: top;
}
+#aspect_administrative_registries_EditMetadataSchema_table_metadata-schema-edit-existing-fields tr.ds-table-header-row,
+#aspect_administrative_registries_MetadataRegistryMain_table_metadata-registry-main-table tr.ds-table-header-row,
#aspect_administrative_registries_FormatRegistryMain_table_bitstream-format-registry tr.ds-table-header-row,
#aspect_submission_Submissions_table_unfinished-submissions tr.ds-table-header-row,
#aspect_submission_Submissions_table_submissions-inprogress tr.ds-table-header-row {
@@ -826,15 +881,25 @@ div.spacer{
margin-right: 15px;
}
+.item-metadata {
+ float: left;
+}
+
.file-metadata {
width: 300px;
}
-.file-metadata span {
+.file-metadata span,
+.item-metadata span {
float: left;
}
-.file-metadata span.bold {
+.item-metadata span.content span {
+ float: none;
+}
+
+.file-metadata span.bold,
+.item-metadata span.bold {
width: 50px;
clear: left;
text-align: right;
@@ -859,7 +924,7 @@ div.spacer{
.notice.failure
{
border-color: #c22121;
- background-color: #fff2f2;
+ background-color: #fff2f2;
}
#ds-system-wide-alert p {
@@ -874,10 +939,19 @@ div.spacer{
}
.ds-logo-wrapper {
- float: right;
- padding:10px;
+ display: block;
}
#aspect_administrative_item_FindItemForm_list_find-item-form .ds-form-item {
margin:0;
}
+
+#aspect_administrative_registries_EditMetadataSchema_div_edit-schema-new-field .ds-form-item.last {
+ margin-top: -25px;
+}
+
+#no-js-warning {
+ margin-top: 15px;
+ margin-bottom: 10px;
+ text-align: center;
+}
View
655 ...app/themes/Mirage/lib/js/dd_belatedpng.js → ...mes/Mirage/lib/js/DD_belatedPNG_0.0.8a.js
@@ -1,328 +1,329 @@
-/**
-* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
-* Author: Drew Diller
-* Email: drew.diller@gmail.com
-* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
-* Version: 0.0.8a
-* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
-*
-* Example usage:
-* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
-* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
-**/
-
-/*
-PLEASE READ:
-Absolutely everything in this script is SILLY. I know this. IE's rendering of certain pixels doesn't make sense, so neither does this code!
-*/
-
-var DD_belatedPNG = {
- ns: 'DD_belatedPNG',
- imgSize: {},
- delay: 10,
- nodesFixed: 0,
- createVmlNameSpace: function () { /* enable VML */
- if (document.namespaces && !document.namespaces[this.ns]) {
- document.namespaces.add(this.ns, 'urn:schemas-microsoft-com:vml');
- }
- },
- createVmlStyleSheet: function () { /* style VML, enable behaviors */
- /*
- Just in case lots of other developers have added
- lots of other stylesheets using document.createStyleSheet
- and hit the 31-limit mark, let's not use that method!
- further reading: http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
- */
- var screenStyleSheet, printStyleSheet;
- screenStyleSheet = document.createElement('style');
- screenStyleSheet.setAttribute('media', 'screen');
- document.documentElement.firstChild.insertBefore(screenStyleSheet, document.documentElement.firstChild.firstChild);
- if (screenStyleSheet.styleSheet) {
- screenStyleSheet = screenStyleSheet.styleSheet;
- screenStyleSheet.addRule(this.ns + '\\:*', '{behavior:url(#default#VML)}');
- screenStyleSheet.addRule(this.ns + '\\:shape', 'position:absolute;');
- screenStyleSheet.addRule('img.' + this.ns + '_sizeFinder', 'behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;'); /* large negative top value for avoiding vertical scrollbars for large images, suggested by James O'Brien, http://www.thanatopsic.org/hendrik/ */
- this.screenStyleSheet = screenStyleSheet;
-
- /* Add a print-media stylesheet, for preventing VML artifacts from showing up in print (including preview). */
- /* Thanks to Rémi Prévost for automating this! */
- printStyleSheet = document.createElement('style');
- printStyleSheet.setAttribute('media', 'print');
- document.documentElement.firstChild.insertBefore(printStyleSheet, document.documentElement.firstChild.firstChild);
- printStyleSheet = printStyleSheet.styleSheet;
- printStyleSheet.addRule(this.ns + '\\:*', '{display: none !important;}');
- printStyleSheet.addRule('img.' + this.ns + '_sizeFinder', '{display: none !important;}');
- }
- },
- readPropertyChange: function () {
- var el, display, v;
- el = event.srcElement;
- if (!el.vmlInitiated) {
- return;
- }
- if (event.propertyName.search('background') != -1 || event.propertyName.search('border') != -1) {
- DD_belatedPNG.applyVML(el);
- }
- if (event.propertyName == 'style.display') {
- display = (el.currentStyle.display == 'none') ? 'none' : 'block';
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- el.vml[v].shape.style.display = display;
- }
- }
- }
- if (event.propertyName.search('filter') != -1) {
- DD_belatedPNG.vmlOpacity(el);
- }
- },
- vmlOpacity: function (el) {
- if (el.currentStyle.filter.search('lpha') != -1) {
- var trans = el.currentStyle.filter;
- trans = parseInt(trans.substring(trans.lastIndexOf('=')+1, trans.lastIndexOf(')')), 10)/100;
- el.vml.color.shape.style.filter = el.currentStyle.filter; /* complete guesswork */
- el.vml.image.fill.opacity = trans; /* complete guesswork */
- }
- },
- handlePseudoHover: function (el) {
- setTimeout(function () { /* wouldn't work as intended without setTimeout */
- DD_belatedPNG.applyVML(el);
- }, 1);
- },
- /**
- * This is the method to use in a document.
- * @param {String} selector - REQUIRED - a CSS selector, such as '#doc .container'
- **/
- fix: function (selector) {
- if (this.screenStyleSheet) {
- var selectors, i;
- selectors = selector.split(','); /* multiple selectors supported, no need for multiple calls to this anymore */
- for (i=0; i<selectors.length; i++) {
- this.screenStyleSheet.addRule(selectors[i], 'behavior:expression(DD_belatedPNG.fixPng(this))'); /* seems to execute the function without adding it to the stylesheet - interesting... */
- }
- }
- },
- applyVML: function (el) {
- el.runtimeStyle.cssText = '';
- this.vmlFill(el);
- this.vmlOffsets(el);
- this.vmlOpacity(el);
- if (el.isImg) {
- this.copyImageBorders(el);
- }
- },
- attachHandlers: function (el) {
- var self, handlers, handler, moreForAs, a, h;
- self = this;
- handlers = {resize: 'vmlOffsets', move: 'vmlOffsets'};
- if (el.nodeName == 'A') {
- moreForAs = {mouseleave: 'handlePseudoHover', mouseenter: 'handlePseudoHover', focus: 'handlePseudoHover', blur: 'handlePseudoHover'};
- for (a in moreForAs) {
- if (moreForAs.hasOwnProperty(a)) {
- handlers[a] = moreForAs[a];
- }
- }
- }
- for (h in handlers) {
- if (handlers.hasOwnProperty(h)) {
- handler = function () {
- self[handlers[h]](el);
- };
- el.attachEvent('on' + h, handler);
- }
- }
- el.attachEvent('onpropertychange', this.readPropertyChange);
- },
- giveLayout: function (el) {
- el.style.zoom = 1;
- if (el.currentStyle.position == 'static') {
- el.style.position = 'relative';
- }
- },
- copyImageBorders: function (el) {
- var styles, s;
- styles = {'borderStyle':true, 'borderWidth':true, 'borderColor':true};
- for (s in styles) {
- if (styles.hasOwnProperty(s)) {
- el.vml.color.shape.style[s] = el.currentStyle[s];
- }
- }
- },
- vmlFill: function (el) {
- if (!el.currentStyle) {
- return;
- } else {
- var elStyle, noImg, lib, v, img, imgLoaded;
- elStyle = el.currentStyle;
- }
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- el.vml[v].shape.style.zIndex = elStyle.zIndex;
- }
- }
- el.runtimeStyle.backgroundColor = '';
- el.runtimeStyle.backgroundImage = '';
- noImg = true;
- if (elStyle.backgroundImage != 'none' || el.isImg) {
- if (!el.isImg) {
- el.vmlBg = elStyle.backgroundImage;
- el.vmlBg = el.vmlBg.substr(5, el.vmlBg.lastIndexOf('")')-5);
- }
- else {
- el.vmlBg = el.src;
- }
- lib = this;
- if (!lib.imgSize[el.vmlBg]) { /* determine size of loaded image */
- img = document.createElement('img');
- lib.imgSize[el.vmlBg] = img;
- img.className = lib.ns + '_sizeFinder';
- img.runtimeStyle.cssText = 'behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;'; /* make sure to set behavior to none to prevent accidental matching of the helper elements! */
- imgLoaded = function () {
- this.width = this.offsetWidth; /* weird cache-busting requirement! */
- this.height = this.offsetHeight;
- lib.vmlOffsets(el);
- };
- img.attachEvent('onload', imgLoaded);
- img.src = el.vmlBg;
- img.removeAttribute('width');
- img.removeAttribute('height');
- document.body.insertBefore(img, document.body.firstChild);
- }
- el.vml.image.fill.src = el.vmlBg;
- noImg = false;
- }
- el.vml.image.fill.on = !noImg;
- el.vml.image.fill.color = 'none';
- el.vml.color.shape.style.backgroundColor = elStyle.backgroundColor;
- el.runtimeStyle.backgroundImage = 'none';
- el.runtimeStyle.backgroundColor = 'transparent';
- },
- /* IE can't figure out what do when the offsetLeft and the clientLeft add up to 1, and the VML ends up getting fuzzy... so we have to push/enlarge things by 1 pixel and then clip off the excess */
- vmlOffsets: function (el) {
- var thisStyle, size, fudge, makeVisible, bg, bgR, dC, altC, b, c, v;
- thisStyle = el.currentStyle;
- size = {'W':el.clientWidth+1, 'H':el.clientHeight+1, 'w':this.imgSize[el.vmlBg].width, 'h':this.imgSize[el.vmlBg].height, 'L':el.offsetLeft, 'T':el.offsetTop, 'bLW':el.clientLeft, 'bTW':el.clientTop};
- fudge = (size.L + size.bLW == 1) ? 1 : 0;
- /* vml shape, left, top, width, height, origin */
- makeVisible = function (vml, l, t, w, h, o) {
- vml.coordsize = w+','+h;
- vml.coordorigin = o+','+o;
- vml.path = 'm0,0l'+w+',0l'+w+','+h+'l0,'+h+' xe';
- vml.style.width = w + 'px';
- vml.style.height = h + 'px';
- vml.style.left = l + 'px';
- vml.style.top = t + 'px';
- };
- makeVisible(el.vml.color.shape, (size.L + (el.isImg ? 0 : size.bLW)), (size.T + (el.isImg ? 0 : size.bTW)), (size.W-1), (size.H-1), 0);
- makeVisible(el.vml.image.shape, (size.L + size.bLW), (size.T + size.bTW), (size.W), (size.H), 1 );
- bg = {'X':0, 'Y':0};
- if (el.isImg) {
- bg.X = parseInt(thisStyle.paddingLeft, 10) + 1;
- bg.Y = parseInt(thisStyle.paddingTop, 10) + 1;
- }
- else {
- for (b in bg) {
- if (bg.hasOwnProperty(b)) {
- this.figurePercentage(bg, size, b, thisStyle['backgroundPosition'+b]);
- }
- }
- }
- el.vml.image.fill.position = (bg.X/size.W) + ',' + (bg.Y/size.H);
- bgR = thisStyle.backgroundRepeat;
- dC = {'T':1, 'R':size.W+fudge, 'B':size.H, 'L':1+fudge}; /* these are defaults for repeat of any kind */
- altC = { 'X': {'b1': 'L', 'b2': 'R', 'd': 'W'}, 'Y': {'b1': 'T', 'b2': 'B', 'd': 'H'} };
- if (bgR != 'repeat' || el.isImg) {
- c = {'T':(bg.Y), 'R':(bg.X+size.w), 'B':(bg.Y+size.h), 'L':(bg.X)}; /* these are defaults for no-repeat - clips down to the image location */
- if (bgR.search('repeat-') != -1) { /* now let's revert to dC for repeat-x or repeat-y */
- v = bgR.split('repeat-')[1].toUpperCase();
- c[altC[v].b1] = 1;
- c[altC[v].b2] = size[altC[v].d];
- }
- if (c.B > size.H) {
- c.B = size.H;
- }
- el.vml.image.shape.style.clip = 'rect('+c.T+'px '+(c.R+fudge)+'px '+c.B+'px '+(c.L+fudge)+'px)';
- }
- else {
- el.vml.image.shape.style.clip = 'rect('+dC.T+'px '+dC.R+'px '+dC.B+'px '+dC.L+'px)';
- }
- },
- figurePercentage: function (bg, size, axis, position) {
- var horizontal, fraction;
- fraction = true;
- horizontal = (axis == 'X');
- switch(position) {
- case 'left':
- case 'top':
- bg[axis] = 0;
- break;
- case 'center':
- bg[axis] = 0.5;
- break;
- case 'right':
- case 'bottom':
- bg[axis] = 1;
- break;
- default:
- if (position.search('%') != -1) {
- bg[axis] = parseInt(position, 10) / 100;
- }
- else {
- fraction = false;
- }
- }
- bg[axis] = Math.ceil( fraction ? ( (size[horizontal?'W': 'H'] * bg[axis]) - (size[horizontal?'w': 'h'] * bg[axis]) ) : parseInt(position, 10) );
- if (bg[axis] % 2 === 0) {
- bg[axis]++;
- }
- return bg[axis];
- },
- fixPng: function (el) {
- el.style.behavior = 'none';
- var lib, els, nodeStr, v, e;
- if (el.nodeName == 'BODY' || el.nodeName == 'TD' || el.nodeName == 'TR') { /* elements not supported yet */
- return;
- }
- el.isImg = false;
- if (el.nodeName == 'IMG') {
- if(el.src.toLowerCase().search(/\.png$/) != -1) {
- el.isImg = true;
- el.style.visibility = 'hidden';
- }
- else {
- return;
- }
- }
- else if (el.currentStyle.backgroundImage.toLowerCase().search('.png') == -1) {
- return;
- }
- lib = DD_belatedPNG;
- el.vml = {color: {}, image: {}};
- els = {shape: {}, fill: {}};
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- for (e in els) {
- if (els.hasOwnProperty(e)) {
- nodeStr = lib.ns + ':' + e;
- el.vml[v][e] = document.createElement(nodeStr);
- }
- }
- el.vml[v].shape.stroked = false;
- el.vml[v].shape.appendChild(el.vml[v].fill);
- el.parentNode.insertBefore(el.vml[v].shape, el);
- }
- }
- el.vml.image.shape.fillcolor = 'none'; /* Don't show blank white shapeangle when waiting for image to load. */
- el.vml.image.fill.type = 'tile'; /* Makes image show up. */
- el.vml.color.fill.on = false; /* Actually going to apply vml element's style.backgroundColor, so hide the whiteness. */
- lib.attachHandlers(el);
- lib.giveLayout(el);
- lib.giveLayout(el.offsetParent);
- el.vmlInitiated = true;
- lib.applyVML(el); /* Render! */
- }
-};
-try {
- document.execCommand("BackgroundImageCache", false, true); /* TredoSoft Multiple IE doesn't like this, so try{} it */
-} catch(r) {}
-DD_belatedPNG.createVmlNameSpace();
+/**
+* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
+* Author: Drew Diller
+* Email: drew.diller@gmail.com
+* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
+* Version: 0.0.8a
+* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
+*
+* Example usage:
+* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
+* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
+**/
+
+/*
+PLEASE READ:
+Absolutely everything in this script is SILLY. I know this. IE's rendering of certain pixels doesn't make sense, so neither does this code!
+*/
+
+var DD_belatedPNG = {
+ ns: 'DD_belatedPNG',
+ imgSize: {},
+ delay: 10,
+ nodesFixed: 0,
+ createVmlNameSpace: function () { /* enable VML */
+ if (document.namespaces && !document.namespaces[this.ns]) {
+ document.namespaces.add(this.ns, 'urn:schemas-microsoft-com:vml');
+ }
+ },
+ createVmlStyleSheet: function () { /* style VML, enable behaviors */
+ /*
+ Just in case lots of other developers have added
+ lots of other stylesheets using document.createStyleSheet
+ and hit the 31-limit mark, let's not use that method!
+ further reading: http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
+ */
+ var screenStyleSheet, printStyleSheet;
+ screenStyleSheet = document.createElement('style');
+ screenStyleSheet.setAttribute('media', 'screen');
+ document.documentElement.firstChild.insertBefore(screenStyleSheet, document.documentElement.firstChild.firstChild);
+ if (screenStyleSheet.styleSheet) {
+ screenStyleSheet = screenStyleSheet.styleSheet;
+ screenStyleSheet.addRule(this.ns + '\\:*', '{behavior:url(#default#VML)}');
+ screenStyleSheet.addRule(this.ns + '\\:shape', 'position:absolute;');
+ screenStyleSheet.addRule('img.' + this.ns + '_sizeFinder', 'behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;'); /* large negative top value for avoiding vertical scrollbars for large images, suggested by James O'Brien, http://www.thanatopsic.org/hendrik/ */
+ this.screenStyleSheet = screenStyleSheet;
+
+ /* Add a print-media stylesheet, for preventing VML artifacts from showing up in print (including preview). */
+ /* Thanks to R�mi Pr�vost for automating this! */
+ printStyleSheet = document.createElement('style');
+ printStyleSheet.setAttribute('media', 'print');
+ document.documentElement.firstChild.insertBefore(printStyleSheet, document.documentElement.firstChild.firstChild);
+ printStyleSheet = printStyleSheet.styleSheet;
+ printStyleSheet.addRule(this.ns + '\\:*', '{display: none !important;}');
+ printStyleSheet.addRule('img.' + this.ns + '_sizeFinder', '{display: none !important;}');
+ }
+ },
+ readPropertyChange: function () {
+ var el, display, v;
+ el = event.srcElement;
+ if (!el.vmlInitiated) {
+ return;
+ }
+ if (event.propertyName.search('background') != -1 || event.propertyName.search('border') != -1) {
+ DD_belatedPNG.applyVML(el);
+ }
+ if (event.propertyName == 'style.display') {
+ display = (el.currentStyle.display == 'none') ? 'none' : 'block';
+ for (v in el.vml) {
+ if (el.vml.hasOwnProperty(v)) {
+ el.vml[v].shape.style.display = display;
+ }
+ }
+ }
+ if (event.propertyName.search('filter') != -1) {
+ DD_belatedPNG.vmlOpacity(el);
+ }
+ },
+ vmlOpacity: function (el) {
+ if (el.currentStyle.filter.search('lpha') != -1) {
+ var trans = el.currentStyle.filter;
+ trans = parseInt(trans.substring(trans.lastIndexOf('=')+1, trans.lastIndexOf(')')), 10)/100;
+ el.vml.color.shape.style.filter = el.currentStyle.filter; /* complete guesswork */
+ el.vml.image.fill.opacity = trans; /* complete guesswork */
+ }
+ },
+ handlePseudoHover: function (el) {
+ setTimeout(function () { /* wouldn't work as intended without setTimeout */
+ DD_belatedPNG.applyVML(el);
+ }, 1);
+ },
+ /**
+ * This is the method to use in a document.
+ * @param {String} selector - REQUIRED - a CSS selector, such as '#doc .container'
+ **/
+ fix: function (selector) {
+ if (this.screenStyleSheet) {
+ var selectors, i;
+ selectors = selector.split(','); /* multiple selectors supported, no need for multiple calls to this anymore */
+ for (i=0; i<selectors.length; i++) {
+ this.screenStyleSheet.addRule(selectors[i], 'behavior:expression(DD_belatedPNG.fixPng(this))'); /* seems to execute the function without adding it to the stylesheet - interesting... */
+ }
+ }
+ },
+ applyVML: function (el) {
+ el.runtimeStyle.cssText = '';
+ this.vmlFill(el);
+ this.vmlOffsets(el);
+ this.vmlOpacity(el);
+ if (el.isImg) {
+ this.copyImageBorders(el);
+ }
+ },
+ attachHandlers: function (el) {
+ var self, handlers, handler, moreForAs, a, h;
+ self = this;
+ handlers = {resize: 'vmlOffsets', move: 'vmlOffsets'};
+ if (el.nodeName == 'A') {
+ moreForAs = {mouseleave: 'handlePseudoHover', mouseenter: 'handlePseudoHover', focus: 'handlePseudoHover', blur: 'handlePseudoHover'};
+ for (a in moreForAs) {
+ if (moreForAs.hasOwnProperty(a)) {
+ handlers[a] = moreForAs[a];
+ }
+ }
+ }
+ for (h in handlers) {
+ if (handlers.hasOwnProperty(h)) {
+ handler = function () {
+ self[handlers[h]](el);
+ };
+ el.attachEvent('on' + h, handler);
+ }
+ }
+ el.attachEvent('onpropertychange', this.readPropertyChange);
+ },
+ giveLayout: function (el) {
+ el.style.zoom = 1;
+ if (el.currentStyle.position == 'static') {
+ el.style.position = 'relative';
+ }
+ },
+ copyImageBorders: function (el) {
+ var styles, s;
+ styles = {'borderStyle':true, 'borderWidth':true, 'borderColor':true};
+ for (s in styles) {
+ if (styles.hasOwnProperty(s)) {
+ el.vml.color.shape.style[s] = el.currentStyle[s];
+ }
+ }
+ },
+ vmlFill: function (el) {
+ if (!el.currentStyle) {
+ return;
+ } else {
+ var elStyle, noImg, lib, v, img, imgLoaded;
+ elStyle = el.currentStyle;
+ }
+ for (v in el.vml) {
+ if (el.vml.hasOwnProperty(v)) {
+ el.vml[v].shape.style.zIndex = elStyle.zIndex;
+ }
+ }
+ el.runtimeStyle.backgroundColor = '';
+ el.runtimeStyle.backgroundImage = '';
+ noImg = true;
+ if (elStyle.backgroundImage != 'none' || el.isImg) {
+ if (!el.isImg) {
+ el.vmlBg = elStyle.backgroundImage;
+ el.vmlBg = el.vmlBg.substr(5, el.vmlBg.lastIndexOf('")')-5);
+ }
+ else {
+ el.vmlBg = el.src;
+ }
+ lib = this;
+ if (!lib.imgSize[el.vmlBg]) { /* determine size of loaded image */
+ img = document.createElement('img');
+ lib.imgSize[el.vmlBg] = img;
+ img.className = lib.ns + '_sizeFinder';
+ img.runtimeStyle.cssText = 'behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;'; /* make sure to set behavior to none to prevent accidental matching of the helper elements! */
+ imgLoaded = function () {
+ this.width = this.offsetWidth; /* weird cache-busting requirement! */
+ this.height = this.offsetHeight;
+ lib.vmlOffsets(el);
+ };
+ img.attachEvent('onload', imgLoaded);
+ img.src = el.vmlBg;
+ img.removeAttribute('width');
+ img.removeAttribute('height');
+ document.body.insertBefore(img, document.body.firstChild);
+ }
+ el.vml.image.fill.src = el.vmlBg;
+ noImg = false;
+ }
+ el.vml.image.fill.on = !noImg;
+ el.vml.image.fill.color = 'none';
+ el.vml.color.shape.style.backgroundColor = elStyle.backgroundColor;
+ el.runtimeStyle.backgroundImage = 'none';
+ el.runtimeStyle.backgroundColor = 'transparent';
+ },
+ /* IE can't figure out what do when the offsetLeft and the clientLeft add up to 1, and the VML ends up getting fuzzy... so we have to push/enlarge things by 1 pixel and then clip off the excess */
+ vmlOffsets: function (el) {
+ var thisStyle, size, fudge, makeVisible, bg, bgR, dC, altC, b, c, v;
+ thisStyle = el.currentStyle;
+ size = {'W':el.clientWidth+1, 'H':el.clientHeight+1, 'w':this.imgSize[el.vmlBg].width, 'h':this.imgSize[el.vmlBg].height, 'L':el.offsetLeft, 'T':el.offsetTop, 'bLW':el.clientLeft, 'bTW':el.clientTop};
+ fudge = (size.L + size.bLW == 1) ? 1 : 0;
+ /* vml shape, left, top, width, height, origin */
+ makeVisible = function (vml, l, t, w, h, o) {
+ vml.coordsize = w+','+h;
+ vml.coordorigin = o+','+o;
+ vml.path = 'm0,0l'+w+',0l'+w+','+h+'l0,'+h+' xe';
+ vml.style.width = w + 'px';
+ vml.style.height = h + 'px';
+ vml.style.left = l + 'px';
+ vml.style.top = t + 'px';
+ };
+ makeVisible(el.vml.color.shape, (size.L + (el.isImg ? 0 : size.bLW)), (size.T + (el.isImg ? 0 : size.bTW)), (size.W-1), (size.H-1), 0);
+ makeVisible(el.vml.image.shape, (size.L + size.bLW), (size.T + size.bTW), (size.W), (size.H), 1 );
+ bg = {'X':0, 'Y':0};
+ if (el.isImg) {
+ bg.X = parseInt(thisStyle.paddingLeft, 10) + 1;
+ bg.Y = parseInt(thisStyle.paddingTop, 10) + 1;
+ }
+ else {
+ for (b in bg) {
+ if (bg.hasOwnProperty(b)) {
+ this.figurePercentage(bg, size, b, thisStyle['backgroundPosition'+b]);
+ }
+ }
+ }
+ el.vml.image.fill.position = (bg.X/size.W) + ',' + (bg.Y/size.H);
+ bgR = thisStyle.backgroundRepeat;
+ dC = {'T':1, 'R':size.W+fudge, 'B':size.H, 'L':1+fudge}; /* these are defaults for repeat of any kind */
+ altC = { 'X': {'b1': 'L', 'b2': 'R', 'd': 'W'}, 'Y': {'b1': 'T', 'b2': 'B', 'd': 'H'} };
+ if (bgR != 'repeat' || el.isImg) {
+ c = {'T':(bg.Y), 'R':(bg.X+size.w), 'B':(bg.Y+size.h), 'L':(bg.X)}; /* these are defaults for no-repeat - clips down to the image location */
+ if (bgR.search('repeat-') != -1) { /* now let's revert to dC for repeat-x or repeat-y */
+ v = bgR.split('repeat-')[1].toUpperCase();
+ c[altC[v].b1] = 1;
+ c[altC[v].b2] = size[altC[v].d];
+ }
+ if (c.B > size.H) {
+ c.B = size.H;
+ }
+ el.vml.image.shape.style.clip = 'rect('+c.T+'px '+(c.R+fudge)+'px '+c.B+'px '+(c.L+fudge)+'px)';
+ }
+ else {
+ el.vml.image.shape.style.clip = 'rect('+dC.T+'px '+dC.R+'px '+dC.B+'px '+dC.L+'px)';
+ }
+ },
+ figurePercentage: function (bg, size, axis, position) {
+ var horizontal, fraction;
+ fraction = true;
+ horizontal = (axis == 'X');
+ switch(position) {
+ case 'left':
+ case 'top':
+ bg[axis] = 0;
+ break;
+ case 'center':
+ bg[axis] = 0.5;
+ break;
+ case 'right':
+ case 'bottom':
+ bg[axis] = 1;
+ break;
+ default:
+ if (position.search('%') != -1) {
+ bg[axis] = parseInt(position, 10) / 100;
+ }
+ else {
+ fraction = false;
+ }
+ }
+ bg[axis] = Math.ceil( fraction ? ( (size[horizontal?'W': 'H'] * bg[axis]) - (size[horizontal?'w': 'h'] * bg[axis]) ) : parseInt(position, 10) );
+ if (bg[axis] % 2 === 0) {
+ bg[axis]++;
+ }
+ return bg[axis];
+ },
+ fixPng: function (el) {
+ el.style.behavior = 'none';
+ var lib, els, nodeStr, v, e;
+ if (el.nodeName == 'BODY' || el.nodeName == 'TD' || el.nodeName == 'TR') { /* elements not supported yet */
+ return;
+ }
+ el.isImg = false;
+ if (el.nodeName == 'IMG') {
+ if(el.src.toLowerCase().search(/\.png(\?\d+)?$/) != -1) {
+ el.isImg = true;
+ el.style.visibility = 'hidden';
+ }
+ else {
+ return;
+ }
+ }
+ else if (el.currentStyle.backgroundImage.toLowerCase().search('.png') == -1) {
+ return;
+ }
+ lib = DD_belatedPNG;
+ el.vml = {color: {}, image: {}};
+ els = {shape: {}, fill: {}};
+ for (v in el.vml) {
+ if (el.vml.hasOwnProperty(v)) {
+ for (e in els) {
+ if (els.hasOwnProperty(e)) {
+ nodeStr = lib.ns + ':' + e;
+ el.vml[v][e] = document.createElement(nodeStr);
+ }
+ }
+ el.vml[v].shape.stroked = false;
+ el.vml[v].shape.appendChild(el.vml[v].fill);
+ el.parentNode.insertBefore(el.vml[v].shape, el);
+ }
+ }
+ el.vml.image.shape.fillcolor = 'none'; /* Don't show blank white shapeangle when waiting for image to load. */
+ /* If the height and width attributes are set, then scale to size, if not, display as per usual */
+ if (el.height && el.width){el.vml.image.fill.type = 'frame';} else {el.vml.image.fill.type = 'tile';}
+ el.vml.color.fill.on = false; /* Actually going to apply vml element's style.backgroundColor, so hide the whiteness. */
+ lib.attachHandlers(el);
+ lib.giveLayout(el);
+ lib.giveLayout(el.offsetParent);
+ el.vmlInitiated = true;
+ lib.applyVML(el); /* Render! */
+ }
+};
+try {
+ document.execCommand("BackgroundImageCache", false, true); /* TredoSoft Multiple IE doesn't like this, so try{} it */
+} catch(r) {}
+DD_belatedPNG.createVmlNameSpace();
DD_belatedPNG.createVmlStyleSheet();
View
0 ...aspects/administrative/administrative.xsl → .../aspect/administrative/administrative.xsl
File renamed without changes.
View
149 ...xsl/aspects/artifactbrowser/item-list.xsl → .../xsl/aspect/artifactbrowser/item-list.xsl
@@ -63,25 +63,129 @@
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:encoder="xalan://java.net.URLEncoder"
xmlns:util="org.dspace.app.xmlui.utils.XSLUtils"
+ xmlns:confman="org.dspace.core.ConfigurationManager"
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
<xsl:output indent="yes"/>
- <!--Added a shortened version of the abstract-->
- <xsl:template match="dim:dim" mode="itemSummaryList-DIM">
- <xsl:variable name="itemWithdrawn" select="@withdrawn" />
- <div class="artifact-description">
- <div class="artifact-title">
+ <!--these templates are modfied to support the 2 different item list views that
+ can be configured with the property 'xmlui.item-list.emphasis' in dspace.cfg-->
+
+ <xsl:template name="itemSummaryList-DIM">
+ <xsl:variable name="itemWithdrawn" select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim/@withdrawn" />
+
+ <xsl:variable name="href">
+ <xsl:choose>
+ <xsl:when test="$itemWithdrawn">
+ <xsl:value-of select="@OBJEDIT"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@OBJID"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="emphasis" select="confman:getProperty('xmlui.item-list.emphasis')"/>
+ <xsl:choose>
+ <xsl:when test="'file' = $emphasis">
+
+
+ <div class="item-wrapper clearfix">
+ <xsl:apply-templates select="./mets:fileSec" mode="artifact-preview"><xsl:with-param name="href" select="$href"/></xsl:apply-templates>
+ <xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
+ mode="itemSummaryList-DIM-file"><xsl:with-param name="href" select="$href"/></xsl:apply-templates>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
+ mode="itemSummaryList-DIM-metadata"><xsl:with-param name="href" select="$href"/></xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!--handles the rendering of a single item in a list in file mode-->
+ <xsl:template match="dim:dim" mode="itemSummaryList-DIM-file">
+ <xsl:param name="href"/>
+ <xsl:variable name="metadataWidth" select="675 - $thumbnail.maxwidth - 30"/>
+ <div class="item-metadata" style="width: {$metadataWidth}px;">
+ <span class="bold"><i18n:text>xmlui.dri2xhtml.pioneer.title</i18n:text><xsl:text>:</xsl:text></span>
+ <span class="content" style="width: {$metadataWidth - 80}px;">
<xsl:element name="a">
<xsl:attribute name="href">
+ <xsl:value-of select="$href"/>
+ </xsl:attribute>
+ <span class="Z3988">
+ <xsl:attribute name="title">
+ <xsl:call-template name="renderCOinS"/>
+ </xsl:attribute>
<xsl:choose>
- <xsl:when test="$itemWithdrawn">
- <xsl:value-of select="ancestor::mets:METS/@OBJEDIT" />
+ <xsl:when test="dim:field[@element='title']">
+ <xsl:value-of select="dim:field[@element='title'][1]/node()"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="ancestor::mets:METS/@OBJID" />
+ <i18n:text>xmlui.dri2xhtml.METS-1.0.no-title</i18n:text>
</xsl:otherwise>
</xsl:choose>
+ </span>
+ </xsl:element>
+ </span>
+ <span class="bold"><i18n:text>xmlui.dri2xhtml.pioneer.author</i18n:text><xsl:text>:</xsl:text></span>
+ <span class="content" style="width: {$metadataWidth - 80}px;">
+ <xsl:choose>
+ <xsl:when test="dim:field[@element='contributor'][@qualifier='author']">
+ <xsl:for-each select="dim:field[@element='contributor'][@qualifier='author']">
+ <span>
+ <xsl:if test="@authority">
+ <xsl:attribute name="class">
+ <xsl:text>ds-dc_contributor_author-authority</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="node()"/>
+ </span>
+ <xsl:if test="count(following-sibling::dim:field[@element='contributor'][@qualifier='author']) != 0">
+ <xsl:text>; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="dim:field[@element='creator']">
+ <xsl:for-each select="dim:field[@element='creator']">
+ <xsl:copy-of select="node()"/>
+ <xsl:if test="count(following-sibling::dim:field[@element='creator']) != 0">
+ <xsl:text>; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:when test="dim:field[@element='contributor']">
+ <xsl:for-each select="dim:field[@element='contributor']">
+ <xsl:copy-of select="node()"/>
+ <xsl:if test="count(following-sibling::dim:field[@element='contributor']) != 0">
+ <xsl:text>; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <i18n:text>xmlui.dri2xhtml.METS-1.0.no-author</i18n:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <xsl:if test="dim:field[@element='date' and @qualifier='issued'] or dim:field[@element='publisher']">
+ <span class="bold"><i18n:text>xmlui.dri2xhtml.pioneer.date</i18n:text><xsl:text>:</xsl:text></span>
+ <span class="content" style="width: {$metadataWidth - 80}px;">
+ <xsl:value-of
+ select="substring(dim:field[@element='date' and @qualifier='issued']/node(),1,10)"/>
+ </span>
+ </xsl:if>
+ </div>
+ </xsl:template>
+
+ <!--handles the rendering of a single item in a list in metadata mode-->
+ <xsl:template match="dim:dim" mode="itemSummaryList-DIM-metadata">
+ <xsl:param name="href"/>
+ <div class="artifact-description">
+ <div class="artifact-title">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$href"/>
</xsl:attribute>
<span class="Z3988">
<xsl:attribute name="title">
@@ -161,4 +265,33 @@
</div>
</xsl:template>
+ <xsl:template name="itemDetailList-DIM">
+ <xsl:call-template name="itemSummaryList-DIM"/>
+ </xsl:template>
+
+
+ <xsl:template match="mets:fileSec" mode="artifact-preview">
+ <xsl:param name="href"/>
+ <div class="thumbnail-wrapper">
+ <div class="artifact-preview">
+ <a class="image-link" href="{$href}">
+ <xsl:choose>
+ <xsl:when test="mets:fileGrp[@USE='THUMBNAIL']">
+ <img alt="Thumbnail">
+ <xsl:attribute name="src">
+ <xsl:value-of
+ select="mets:fileGrp[@USE='THUMBNAIL']/mets:file/mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <img alt="Icon" src="{concat($theme-path, '/images/mime.png')}" style="height: {$thumbnail.maxheight}px;"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </div>
+ </div>
+ </xsl:template>
+
+
</xsl:stylesheet>
View
11 ...xsl/aspects/artifactbrowser/item-view.xsl → .../xsl/aspect/artifactbrowser/item-view.xsl
@@ -61,7 +61,6 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:encoder="xalan://java.net.URLEncoder"
- xmlns:confman="org.dspace.core.ConfigurationManager"
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
<xsl:output indent="yes"/>
@@ -360,10 +359,6 @@
</div>
</xsl:template>
-
-
- <xsl:variable name="maxheight" select="confman:getIntProperty('thumbnail.maxheight', 80)"/>
-
<xsl:template match="mets:file">
<xsl:param name="context" select="."/>
<div class="file-wrapper clearfix">
@@ -383,12 +378,12 @@
</img>
</xsl:when>
<xsl:otherwise>
- <img alt="Icon" src="{concat($theme-path, '/images/mime.png')}" style="height: {$maxheight}px;"/>
+ <img alt="Icon" src="{concat($theme-path, '/images/mime.png')}" style="height: {$thumbnail.maxheight}px;"/>
</xsl:otherwise>
</xsl:choose>
</a>
</div>
- <div class="file-metadata" style="height: {$maxheight}px;">
+ <div class="file-metadata" style="height: {$thumbnail.maxheight}px;">
<span class="bold">
<i18n:text>xmlui.dri2xhtml.METS-1.0.item-files-name</i18n:text>
<xsl:text>:</xsl:text>
@@ -446,7 +441,7 @@
</xsl:if>
</div>
- <div class="file-link" style="height: {$maxheight}px;">
+ <div class="file-link" style="height: {$thumbnail.maxheight}px;">
<a>
<xsl:attribute name="href">
<xsl:value-of select="mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
View
70 ...xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/lib/xsl/core/global-variables.xsl
@@ -0,0 +1,70 @@
+<!--
+ global-variables.xsl
+
+ Version: $Revision: 3705 $
+
+ Date: $Date: 2009-04-11 17:02:24 +0000 (Sat, 11 Apr 2009) $
+
+ Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
+ Institute of Technology. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Hewlett-Packard Company nor the name of the
+ Massachusetts Institute of Technology nor the names of their
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+-->
+
+<!--
+ Global variables accessible from other templates
+
+ Author: art.lowel at atmire.com
+ Author: lieven.droogmans at atmire.com
+ Author: ben at atmire.com
+ Author: Alexey Maslov
+
+-->
+
+<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:dri="http://di.tamu.edu/DRI/1.0/"
+ xmlns:mets="http://www.loc.gov/METS/"
+ xmlns:xlink="http://www.w3.org/TR/xlink/"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:mods="http://www.loc.gov/mods/v3"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:confman="org.dspace.core.ConfigurationManager"
+ exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
+
+ <xsl:output indent="yes"/>
+
+ <!--the max thumbnail height & width from dspace.cfg, needed for item view and item list pages-->
+ <xsl:variable name="thumbnail.maxheight" select="confman:getIntProperty('thumbnail.maxheight', 80)"/>
+ <xsl:variable name="thumbnail.maxwidth" select="confman:getIntProperty('thumbnail.maxwidth', 80)"/>
+
+</xsl:stylesheet>
View
20 ...e-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/lib/xsl/core/page-structure.xsl
@@ -109,6 +109,16 @@
<!--The trail is built by applying a template over pageMeta's trail children. -->
<xsl:call-template name="buildTrail"/>
+ <!--javascript-disabled warning, will be invisible if javascript is enabled-->
+ <div id="no-js-warning-wrapper" class="hidden">
+ <div id="no-js-warning">
+ <div class="notice failure">
+ <xsl:text>JavaScript is disabled for your browser. Some features of this site may not work without it.</xsl:text>
+ </div>
+ </div>
+ </div>
+
+
<!--ds-content is a groups ds-body and the navigation together and used to put the clearfix on, center, etc.
ds-content-wrapper is necessary for IE6 to allow it to center the page content-->
<div id="ds-content-wrapper">
@@ -167,7 +177,7 @@
</xsl:attribute>
</link>
<link rel="apple-touch-icon">
- <xsl:attribute name="href">
+ <xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='contextPath'][not(@qualifier)]"/>
<xsl:text>/themes/</xsl:text>
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='theme'][@qualifier='path']"/>
@@ -516,7 +526,7 @@
<xsl:template name="addJavascript">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">&#160;</script>
-
+
<xsl:variable name="localJQuerySrc">
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='contextPath'][not(@qualifier)]"/>
<xsl:text>/static/js/jquery-1.4.2.min.js</xsl:text>
@@ -558,10 +568,10 @@
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='contextPath'][not(@qualifier)]"/>
<xsl:text>/themes/</xsl:text>
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='theme'][@qualifier='path']"/>
- <xsl:text>/lib/js/dd_belatedpng.js?v=1</xsl:text>
+ <xsl:text>/lib/js/DD_belatedPNG_0.0.8a.js?v=1</xsl:text>
</xsl:attribute>&#160;</script>
<script type="text/javascript">
- <xsl:text>DD_belatedPNG.fix('#ds-header-logo');DD_belatedPNG.fix('#ds-footer-logo');</xsl:text>
+ <xsl:text>DD_belatedPNG.fix('#ds-header-logo');DD_belatedPNG.fix('#ds-footer-logo');$.each($('img[src$=png]'), function() {DD_belatedPNG.fixPng(this);});</xsl:text>
</script>
<xsl:text disable-output-escaping="yes" >&lt;![endif]--&gt;</xsl:text>
@@ -581,5 +591,5 @@
</xsl:text></script>
</xsl:if>
</xsl:template>
-
+
</xsl:stylesheet>
View
143 dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/themes/Mirage/sitemap.xmap
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
sitemap.xmap
-
+
Version: $Revision: 3705 $
-
+
Date: $Date: 2009-04-11 17:02:24 +0000 (Sat, 11 Apr 2009) $
-
+
Copyright (c) 2002-2005, Hewlett-Packard Company and Massachusetts
Institute of Technology. All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Hewlett-Packard Company nor the name of the
Massachusetts Institute of Technology nor the names of their
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -47,23 +47,23 @@
</map:components>
<map:pipelines>
-
- <!--
- Define global theme variables that are used later in this
- sitemap. Two variables are typically defined here, the theme's
- path and name. The path is the directory name where this theme
- is located, such as "Reference" for the reference theme. The
- theme's name is used only for descriptive purposes to describe
- the theme.
+
+ <!--
+ Define global theme variables that are used later in this
+ sitemap. Two variables are typically defined here, the theme's
+ path and name. The path is the directory name where this theme
+ is located, such as "Reference" for the reference theme. The
+ theme's name is used only for descriptive purposes to describe
+ the theme.
-->
<map:component-configurations>
<global-variables>
<theme-path>Mirage</theme-path>
<theme-name>Mirage</theme-name>
</global-variables>
</map:component-configurations>
-
-
+
+
<map:pipeline>
<!-- Allow the browser to cache static content for an hour -->
<map:parameter name="expires" value="access plus 1 hours"/>
@@ -91,73 +91,82 @@
<map:read src="{2}"/>
</map:match>
</map:pipeline>
-
- <!--
- The theme's pipeline is used to process all requests handled
- by the theme. It is broken up into two parts, the first part
- handles all static theme content while the second part handle
- all dynamic aspect generated content. The static content is
- such things as stylesheets, images, or static pages. Typically
- these are just stored on disk and passed directly to the
- browser without any processing.
+
+ <!--
+ The theme's pipeline is used to process all requests handled
+ by the theme. It is broken up into two parts, the first part
+ handles all static theme content while the second part handle
+ all dynamic aspect generated content. The static content is
+ such things as stylesheets, images, or static pages. Typically
+ these are just stored on disk and passed directly to the
+ browser without any processing.
-->
<map:pipeline>
<!-- Never allow the browser to cache dynamic content -->
<map:parameter name="expires" value="now"/>
-
- <!-- Aspect content
-
+
+ <!-- Aspect content
+
There are five steps to processing aspect content:
-
+
1: Generate the DRI page
-
- The first step is to generate a DRI page for the request;
- this is handled by the aspect chain. Once it is generated
- it is the beginning of a theme's pipeline, the DRI page is
- ultimately transformed in the resulting XHTML that is
+
+ The first step is to generate a DRI page for the request;
+ this is handled by the aspect chain. Once it is generated
+ it is the beginning of a theme's pipeline, the DRI page is
+ ultimately transformed in the resulting XHTML that is
given to the user's browser.
-
+
2: Add page metadata
-
- The next step is to add theme specific metadata to the
- DRI page. This is metadata about where the theme is
- located and its name. Typically this metadata is different
- depending on the users browser, this allows us to give
- different stylesheets to Internet Explorer than for other
+
+ The next step is to add theme specific metadata to the
+ DRI page. This is metadata about where the theme is
+ located and its name. Typically this metadata is different
+ depending on the users browser, this allows us to give
+ different stylesheets to Internet Explorer than for other
browsers.
-
+
3: Transform to XHTML
-
- The third step is the main component of a theme the XSL
- transformations will turn the DRI page from the aspects
- into an XHTML page useable by browsers.
-
+
+ The third step is the main component of a theme the XSL
+ transformations will turn the DRI page from the aspects
+ into an XHTML page useable by browsers.
+
4: Localize the page
-
- The second to last step is to localize the content for the
- particular user, if they user is requesting a page in a
- particular language then those language strings are inserted
- into the resulting XHTML.
-
+
+ The second to last step is to localize the content for the
+ particular user, if they user is requesting a page in a
+ particular language then those language strings are inserted
+ into the resulting XHTML.
+
5: Serialize to the browser
-
- The last step sends the page to the user's browser.
-
+
+ The last step sends the page to the user's browser.
+
-->
<map:match pattern="**">
-
+
<!-- Step 1: Generate the DRI page -->
<map:generate type="file" src="cocoon://DRI/{1}"/>
-
+
<!-- Step 2 Add page metadata -->
+
+ <!--3 different IncludePageMeta transformers to ensure that the
+ stylesheets end up in the correct order-->
<map:transform type="IncludePageMeta">
<map:parameter name="stylesheet.screen#1" value="lib/css/reset.css"/>
<map:parameter name="stylesheet.screen#2" value="lib/css/base.css"/>
<map:parameter name="stylesheet.screen#3" value="lib/css/helper.css"/>
<map:parameter name="stylesheet.screen#4" value="lib/css/style.css"/>
- <map:parameter name="stylesheet.screen#5" value="lib/css/print.css"/>
- <map:parameter name="stylesheet.all" value="lib/css/media.css"/>
+ </map:transform>
+
+ <map:transform type="IncludePageMeta">
<map:parameter name="stylesheet.handheld" value="lib/css/handheld.css"/>
+ <map:parameter name="stylesheet.print" value="lib/css/print.css"/>
+ </map:transform>
+
+ <map:transform type="IncludePageMeta">
+ <map:parameter name="stylesheet.all" value="lib/css/media.css"/>
<map:parameter name="theme.path" value="{global:theme-path}"/>
<map:parameter name="theme.name" value="{global:theme-name}"/>
@@ -167,21 +176,21 @@
<map:match type="request" pattern="XML">
<map:serialize type="xml"/>
</map:match>
-
+
<!-- Step 3: Transform to XHTML -->
<map:transform src="{global:theme-name}.xsl"/>
<!-- <map:transform src="Mirage.xsl"/> -->
-
+
<!-- Step 4: Localize the page -->
<map:act type="locale">
<map:transform type="i18n">
- <map:parameter name="locale" value="{locale}"/>
+ <map:parameter name="locale" value="{locale}"/>
</map:transform>
</map:act>
-
+
<!-- Step 5: Serialize to the browser -->
<map:serialize type="xhtml"/>
-
+
</map:match>
</map:pipeline>
</map:pipelines>
View
9 dspace/config/dspace.cfg
@@ -1830,6 +1830,15 @@ webui.suggest.enable = false
# files before enabling this property.
#xmlui.theme.enableMinification = false
+### Setings for Item lists in Mirage theme ###
+# What should the emphasis be in the display of item lists?
+# Possible values : 'file', 'metadata'. If your repository is
+# used mainly for scientific papers 'metadata' is probably the
+# best way. If you have a lot of images and other files 'file'
+# will be the best starting point
+# (metdata is the default value if this option is not specified)
+#xmlui.theme.mirage.item-list.emphasis = file
+
# Determine which bundles administrators and collection administrators may upload
# into an existing item through the administrative interface. If the user does not
# have the appropriate privileges (add & write) on the bundle then that bundle will

0 comments on commit 2c4546b

Please sign in to comment.