mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Re-enabled check for if the sort checkbox is enabled
Re-enabled removal code if the page sort does not have a previous and/or next Spacing corrections
This commit is contained in:
parent
fae85f04c1
commit
089d4e796d
@ -42,31 +42,31 @@
|
||||
}
|
||||
|
||||
.cms .ss-gridfield .gridfield-sortablerows-movepage .sortablerows-psort-arrow i {
|
||||
display: block;
|
||||
|
||||
position: relative;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
|
||||
position: relative;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cms .ss-gridfield .gridfield-sortablerows-movepage .sortablerows-psort-arrow i:before {
|
||||
display: block;
|
||||
|
||||
content: " ";
|
||||
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
left: 50%;
|
||||
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
left: 50%;
|
||||
|
||||
height: 0;
|
||||
width: 0;
|
||||
|
||||
border: solid transparent;
|
||||
border-width: 14px;
|
||||
border-bottom-color: #FFFFFF;
|
||||
border-bottom-color: #FFFFFF;
|
||||
|
||||
margin-left: -8px;
|
||||
}
|
||||
@ -82,19 +82,19 @@
|
||||
}
|
||||
|
||||
.cms .ss-gridfield .gridfield-sortablerows-movepage .sortablerows-prev-page i {
|
||||
left: 20px;
|
||||
|
||||
-o-transform: rotate(270deg) translateX(-50%);
|
||||
-ms-transform: rotate(270deg) translateX(-50%);
|
||||
-moz-transform: rotate(270deg) translateX(-50%);
|
||||
-webkit-transform: rotate(270deg) translateX(-50%);
|
||||
transform: rotate(270deg) translateX(-50%);
|
||||
|
||||
-o-transform-origin: top left;
|
||||
-ms-transform-origin: top left;
|
||||
-moz-transform-origin: top left;
|
||||
-webkit-transform-origin: top left;
|
||||
transform-origin: top left;
|
||||
left: 20px;
|
||||
|
||||
-o-transform: rotate(270deg) translateX(-50%);
|
||||
-ms-transform: rotate(270deg) translateX(-50%);
|
||||
-moz-transform: rotate(270deg) translateX(-50%);
|
||||
-webkit-transform: rotate(270deg) translateX(-50%);
|
||||
transform: rotate(270deg) translateX(-50%);
|
||||
|
||||
-o-transform-origin: top left;
|
||||
-ms-transform-origin: top left;
|
||||
-moz-transform-origin: top left;
|
||||
-webkit-transform-origin: top left;
|
||||
transform-origin: top left;
|
||||
}
|
||||
|
||||
.cms .ss-gridfield .gridfield-sortablerows-movepage .sortablerows-next-page {
|
||||
@ -102,19 +102,19 @@
|
||||
}
|
||||
|
||||
.cms .ss-gridfield .gridfield-sortablerows-movepage .sortablerows-next-page i {
|
||||
right: 36px;
|
||||
|
||||
-moz-transform: rotate(90deg) translateX(50%);
|
||||
-o-transform: rotate(90deg) translateX(50%);
|
||||
-ms-transform: rotate(90deg) translateX(50%);
|
||||
-webkit-transform: rotate(90deg) translateX(50%);
|
||||
transform: rotate(90deg) translateX(50%);
|
||||
|
||||
-o-transform-origin: bottom right;
|
||||
-ms-transform-origin: bottom right;
|
||||
-moz-transform-origin: bottom right;
|
||||
-webkit-transform-origin: bottom right;
|
||||
transform-origin: bottom right;
|
||||
right: 36px;
|
||||
|
||||
-moz-transform: rotate(90deg) translateX(50%);
|
||||
-o-transform: rotate(90deg) translateX(50%);
|
||||
-ms-transform: rotate(90deg) translateX(50%);
|
||||
-webkit-transform: rotate(90deg) translateX(50%);
|
||||
transform: rotate(90deg) translateX(50%);
|
||||
|
||||
-o-transform-origin: bottom right;
|
||||
-ms-transform-origin: bottom right;
|
||||
-moz-transform-origin: bottom right;
|
||||
-webkit-transform-origin: bottom right;
|
||||
transform-origin: bottom right;
|
||||
}
|
||||
|
||||
.cms table.ss-gridfield-table.dragSorting tbody tr td {
|
||||
|
@ -28,7 +28,7 @@
|
||||
return ui;
|
||||
},
|
||||
start: function(event, ui) {
|
||||
pageArrows.show();
|
||||
pageArrows.show();
|
||||
pageArrows.startMoveTracking();
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
@ -36,7 +36,7 @@
|
||||
pageArrows.hide();
|
||||
},
|
||||
sort: function(event, ui) {
|
||||
pageArrows.moveTracking(event, ui);
|
||||
pageArrows.moveTracking(event, ui);
|
||||
},
|
||||
update: function(event, ui) {
|
||||
if(self.getPageSort()) {
|
||||
@ -122,13 +122,13 @@
|
||||
var sortableCheckbox=gridField.find('.gridfield-sortablerows input');
|
||||
var self=$(this);
|
||||
|
||||
/*if($(this).hasClass('sortablerows-prev-page') && gridField.find('.ss-gridfield-previouspage').is(':disabled')) {
|
||||
if($(this).hasClass('sortablerows-prev-page') && gridField.find('.ss-gridfield-previouspage').is(':disabled')) {
|
||||
$(this).remove();
|
||||
return;
|
||||
}else if($(this).hasClass('sortablerows-next-page') && gridField.find('.ss-gridfield-nextpage').is(':disabled')) {
|
||||
$(this).remove();
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
$(this).droppable({
|
||||
disabled: $(this).is(':disabled'),
|
||||
@ -184,20 +184,20 @@
|
||||
self.setArrowIcon(self.find('i'));
|
||||
},
|
||||
stopMoveTracking: function() {
|
||||
$(this).setArrowIcon(null);
|
||||
$(this).setArrowIcon(null);
|
||||
},
|
||||
moveTracking: function(e, ui) {
|
||||
var self=$(this);
|
||||
var self=$(this);
|
||||
var arrowIcon=self.getArrowIcon();
|
||||
if(arrowIcon) {
|
||||
var selfOffset=self.offset().top;
|
||||
var arrowIconHeight=arrowIcon.width()+10;
|
||||
var railHeight=self.height()-arrowIconHeight;
|
||||
var helperPos=ui.helper.offset().top;
|
||||
|
||||
if(helperPos>selfOffset+10 && helperPos<selfOffset+railHeight) {
|
||||
arrowIcon.css('top', ((helperPos-selfOffset)+arrowIconHeight/2)+'px');
|
||||
}
|
||||
var selfOffset=self.offset().top;
|
||||
var arrowIconHeight=arrowIcon.width()+10;
|
||||
var railHeight=self.height()-arrowIconHeight;
|
||||
var helperPos=ui.helper.offset().top;
|
||||
|
||||
if(helperPos>selfOffset+10 && helperPos<selfOffset+railHeight) {
|
||||
arrowIcon.css('top', ((helperPos-selfOffset)+arrowIconHeight/2)+'px');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
<%-- if $Checked --%>
|
||||
<% if $Checked %>
|
||||
<div class="gridfield-sortablerows-movepage" colspan="$Colspan">
|
||||
<a href="" class="sortablerows-psort-arrow sortablerows-prev-page"><i><%t GridFieldSortableRows.PREVIOUS '_Move to Previous Page' %></i></a>
|
||||
|
||||
<a href="" class="sortablerows-psort-arrow sortablerows-next-page"><i><%t GridFieldSortableRows.NEXT '_Move to Next Page' %></i></a>
|
||||
</div>
|
||||
<%-- end_if --%>
|
||||
<% end_if %>
|
||||
|
Loading…
Reference in New Issue
Block a user