[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
This commit is contained in:
Robin Taylor
2011-08-24 15:23:50 +00:00
parent 3e49b04e32
commit b624d0a447
5 changed files with 17 additions and 8 deletions

View File

@@ -201,13 +201,13 @@ public class EditItemBitstreamsForm extends AbstractDSpaceTransformer {
//Add the +1 to make it more human readable //Add the +1 to make it more human readable
cell.addHidden("order_" + bitstream.getID()).setValue(String.valueOf(bitstreamIndex + 1)); cell.addHidden("order_" + bitstream.getID()).setValue(String.valueOf(bitstreamIndex + 1));
showBitstreamUpdateOrderButton = true; 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)){ if((bitstreamIndex == 0)){
upButton.setDisabled(); upButton.setDisabled();
} }
upButton.setValue(T_order_up); upButton.setValue(T_order_up);
upButton.setHelp(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)){ if(bitstreamIndex == (bitstreams.length - 1)){
downButton.setDisabled(); downButton.setDisabled();
} }

View File

@@ -63,16 +63,16 @@
//Check if we are the first row, if so hide the up arrow //Check if we are the first row, if so hide the up arrow
if(isBundleRow(row.prev())){ if(isBundleRow(row.prev())){
upArrow.attr('disabled', 'disabled'); upArrow.attr('disabled', 'disabled').addClass('disabled');
}else{ }else{
upArrow.removeAttr('disabled'); upArrow.removeAttr('disabled').removeClass('disabled');
} }
//Check if we are the last row, <if so hide the down arrow //Check if we are the last row, <if so hide the down arrow
if(isBundleRow(row.next())){ if(isBundleRow(row.next())){
downArrow.attr('disabled', 'disabled'); downArrow.attr('disabled', 'disabled').addClass('disabled');
}else{ }else{
downArrow.removeAttr('disabled'); downArrow.removeAttr('disabled').removeClass('disabled');
} }
//Set the displayed new order //Set the displayed new order

View File

@@ -825,6 +825,9 @@ form.discover-sort-box select{
width: 30px; width: 30px;
height: 30px; height: 30px;
display:block; display:block;
/*Required for IE*/
font-size: 0;
line-height: 0;
} }
.icon-button.ds-button-field[disabled="disabled"], .icon-button.ds-button-field[disabled="disabled"],

View File

@@ -1052,6 +1052,9 @@ form.discover-sort-box select{
width: 30px; width: 30px;
height: 30px; height: 30px;
display:block; display:block;
/*Required for IE*/
font-size: 0;
line-height: 0;
} }
.ds-button-field[disabled="disabled"], .ds-button-field[disabled="disabled"],

View File

@@ -1268,6 +1268,9 @@ form.discover-sort-box select{
width: 30px; width: 30px;
height: 30px; height: 30px;
display:block; display:block;
/*Required for IE*/
font-size: 0;
line-height: 0;
} }
.icon-button.ds-button-field[disabled="disabled"], .icon-button.ds-button-field[disabled="disabled"],