mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 14:19:58 +09:00
Fixed a bug that a ghost table row showed at wrong place in Firefox
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9294 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
62b8eb77d1
commit
1b261db0c8
1 changed files with 5 additions and 4 deletions
|
|
@ -554,13 +554,14 @@ $.fn.xeSortableTable = function(){
|
||||||
.not('.xe-sortable-table')
|
.not('.xe-sortable-table')
|
||||||
.addClass('xe-sortable-table')
|
.addClass('xe-sortable-table')
|
||||||
.delegate('button.dragBtn', 'mousedown.st', function(event){
|
.delegate('button.dragBtn', 'mousedown.st', function(event){
|
||||||
var $this, $tr, $table, $th, height, width, offset, position, offsets, i, dropzone, cols;
|
var $this, $tr, $table, $th, height, width, offset, position, offsets, i, dropzone, cols, ofspar;
|
||||||
|
|
||||||
if(event.which != 1) return;
|
if(event.which != 1) return;
|
||||||
|
|
||||||
$this = $(this);
|
$this = $(this);
|
||||||
$tr = $this.closest('tr');
|
$tr = $this.closest('tr');
|
||||||
$table = $this.closest('table').css('position','relative');
|
$table = $this.closest('table');
|
||||||
|
ofspar = $table.get(0).offsetParent;
|
||||||
height = $tr.height();
|
height = $tr.height();
|
||||||
width = $tr.width();
|
width = $tr.width();
|
||||||
|
|
||||||
|
|
@ -572,7 +573,7 @@ $.fn.xeSortableTable = function(){
|
||||||
if(before_event.isDefaultPrevented()) return false;
|
if(before_event.isDefaultPrevented()) return false;
|
||||||
|
|
||||||
position = {x:event.pageX, y:event.pageY};
|
position = {x:event.pageX, y:event.pageY};
|
||||||
offset = getOffset($tr.get(0), $table.get(0));
|
offset = getOffset($tr.get(0), ofspar);
|
||||||
|
|
||||||
$clone = $tr.attr('target', true).clone(true).appendTo($table);
|
$clone = $tr.attr('target', true).clone(true).appendTo($table);
|
||||||
|
|
||||||
|
|
@ -586,7 +587,7 @@ $.fn.xeSortableTable = function(){
|
||||||
$table.find('tbody>tr:not([target],.sticky,:hidden)').each(function() {
|
$table.find('tbody>tr:not([target],.sticky,:hidden)').each(function() {
|
||||||
var $this = $(this), o;
|
var $this = $(this), o;
|
||||||
|
|
||||||
o = getOffset(this, $table.get(0));
|
o = getOffset(this, ofspar);
|
||||||
offsets.push({top:o.top, bottom:o.top+$this.height(), $item:$this});
|
offsets.push({top:o.top, bottom:o.top+$this.height(), $item:$this});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue