From b624d0a4472a4a70ac195f966f076d1ecb921615 Mon Sep 17 00:00:00 2001 From: Robin Taylor Date: Wed, 24 Aug 2011 15:23:50 +0000 Subject: [PATCH] [DS-749] - Allow for bitstream display order to be changed - some IE fixes. git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6581 9c30dcfa-912a-0410-8fc2-9e0234be79fd --- .../administrative/item/EditItemBitstreamsForm.java | 4 ++-- .../src/main/webapp/static/js/bitstream-ordering.js | 8 ++++---- .../src/main/webapp/themes/Classic/lib/style.css | 5 ++++- .../src/main/webapp/themes/Mirage/lib/css/style.css | 3 +++ .../src/main/webapp/themes/Reference/lib/style.css | 5 ++++- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/administrative/item/EditItemBitstreamsForm.java b/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/administrative/item/EditItemBitstreamsForm.java index 1bc2afeb0f..1b62c01ebe 100644 --- a/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/administrative/item/EditItemBitstreamsForm.java +++ b/dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/administrative/item/EditItemBitstreamsForm.java @@ -201,13 +201,13 @@ public class EditItemBitstreamsForm extends AbstractDSpaceTransformer { //Add the +1 to make it more human readable cell.addHidden("order_" + bitstream.getID()).setValue(String.valueOf(bitstreamIndex + 1)); showBitstreamUpdateOrderButton = true; - Button upButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_up", "icon-button arrowUp "); + Button upButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_up", ((bitstreamIndex == 0) ? "disabled" : "") + " icon-button arrowUp "); if((bitstreamIndex == 0)){ upButton.setDisabled(); } upButton.setValue(T_order_up); upButton.setHelp(T_order_up); - Button downButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_down", "icon-button arrowDown "); + Button downButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_down", (bitstreamIndex == (bitstreams.length - 1) ? "disabled" : "") + " icon-button arrowDown "); if(bitstreamIndex == (bitstreams.length - 1)){ downButton.setDisabled(); } diff --git a/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/static/js/bitstream-ordering.js b/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/static/js/bitstream-ordering.js index 258c307c1d..2378c2dc77 100644 --- a/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/static/js/bitstream-ordering.js +++ b/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/static/js/bitstream-ordering.js @@ -63,16 +63,16 @@ //Check if we are the first row, if so hide the up arrow if(isBundleRow(row.prev())){ - upArrow.attr('disabled', 'disabled'); + upArrow.attr('disabled', 'disabled').addClass('disabled'); }else{ - upArrow.removeAttr('disabled'); + upArrow.removeAttr('disabled').removeClass('disabled'); } //Check if we are the last row,