Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery/ui
File: sortable.js
[500] Fix | Delete
this.lastPositionAbs = this.positionAbs;
[501] Fix | Delete
return false;
[502] Fix | Delete
[503] Fix | Delete
},
[504] Fix | Delete
[505] Fix | Delete
_mouseStop: function( event, noPropagation ) {
[506] Fix | Delete
[507] Fix | Delete
if ( !event ) {
[508] Fix | Delete
return;
[509] Fix | Delete
}
[510] Fix | Delete
[511] Fix | Delete
//If we are using droppables, inform the manager about the drop
[512] Fix | Delete
if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
[513] Fix | Delete
$.ui.ddmanager.drop( this, event );
[514] Fix | Delete
}
[515] Fix | Delete
[516] Fix | Delete
if ( this.options.revert ) {
[517] Fix | Delete
var that = this,
[518] Fix | Delete
cur = this.placeholder.offset(),
[519] Fix | Delete
axis = this.options.axis,
[520] Fix | Delete
animation = {};
[521] Fix | Delete
[522] Fix | Delete
if ( !axis || axis === "x" ) {
[523] Fix | Delete
animation.left = cur.left - this.offset.parent.left - this.margins.left +
[524] Fix | Delete
( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
[525] Fix | Delete
0 :
[526] Fix | Delete
this.offsetParent[ 0 ].scrollLeft
[527] Fix | Delete
);
[528] Fix | Delete
}
[529] Fix | Delete
if ( !axis || axis === "y" ) {
[530] Fix | Delete
animation.top = cur.top - this.offset.parent.top - this.margins.top +
[531] Fix | Delete
( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
[532] Fix | Delete
0 :
[533] Fix | Delete
this.offsetParent[ 0 ].scrollTop
[534] Fix | Delete
);
[535] Fix | Delete
}
[536] Fix | Delete
this.reverting = true;
[537] Fix | Delete
$( this.helper ).animate(
[538] Fix | Delete
animation,
[539] Fix | Delete
parseInt( this.options.revert, 10 ) || 500,
[540] Fix | Delete
function() {
[541] Fix | Delete
that._clear( event );
[542] Fix | Delete
}
[543] Fix | Delete
);
[544] Fix | Delete
} else {
[545] Fix | Delete
this._clear( event, noPropagation );
[546] Fix | Delete
}
[547] Fix | Delete
[548] Fix | Delete
return false;
[549] Fix | Delete
[550] Fix | Delete
},
[551] Fix | Delete
[552] Fix | Delete
cancel: function() {
[553] Fix | Delete
[554] Fix | Delete
if ( this.dragging ) {
[555] Fix | Delete
[556] Fix | Delete
this._mouseUp( new $.Event( "mouseup", { target: null } ) );
[557] Fix | Delete
[558] Fix | Delete
if ( this.options.helper === "original" ) {
[559] Fix | Delete
this.currentItem.css( this._storedCSS );
[560] Fix | Delete
this._removeClass( this.currentItem, "ui-sortable-helper" );
[561] Fix | Delete
} else {
[562] Fix | Delete
this.currentItem.show();
[563] Fix | Delete
}
[564] Fix | Delete
[565] Fix | Delete
//Post deactivating events to containers
[566] Fix | Delete
for ( var i = this.containers.length - 1; i >= 0; i-- ) {
[567] Fix | Delete
this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
[568] Fix | Delete
if ( this.containers[ i ].containerCache.over ) {
[569] Fix | Delete
this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
[570] Fix | Delete
this.containers[ i ].containerCache.over = 0;
[571] Fix | Delete
}
[572] Fix | Delete
}
[573] Fix | Delete
[574] Fix | Delete
}
[575] Fix | Delete
[576] Fix | Delete
if ( this.placeholder ) {
[577] Fix | Delete
[578] Fix | Delete
//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
[579] Fix | Delete
// it unbinds ALL events from the original node!
[580] Fix | Delete
if ( this.placeholder[ 0 ].parentNode ) {
[581] Fix | Delete
this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
[582] Fix | Delete
}
[583] Fix | Delete
if ( this.options.helper !== "original" && this.helper &&
[584] Fix | Delete
this.helper[ 0 ].parentNode ) {
[585] Fix | Delete
this.helper.remove();
[586] Fix | Delete
}
[587] Fix | Delete
[588] Fix | Delete
$.extend( this, {
[589] Fix | Delete
helper: null,
[590] Fix | Delete
dragging: false,
[591] Fix | Delete
reverting: false,
[592] Fix | Delete
_noFinalSort: null
[593] Fix | Delete
} );
[594] Fix | Delete
[595] Fix | Delete
if ( this.domPosition.prev ) {
[596] Fix | Delete
$( this.domPosition.prev ).after( this.currentItem );
[597] Fix | Delete
} else {
[598] Fix | Delete
$( this.domPosition.parent ).prepend( this.currentItem );
[599] Fix | Delete
}
[600] Fix | Delete
}
[601] Fix | Delete
[602] Fix | Delete
return this;
[603] Fix | Delete
[604] Fix | Delete
},
[605] Fix | Delete
[606] Fix | Delete
serialize: function( o ) {
[607] Fix | Delete
[608] Fix | Delete
var items = this._getItemsAsjQuery( o && o.connected ),
[609] Fix | Delete
str = [];
[610] Fix | Delete
o = o || {};
[611] Fix | Delete
[612] Fix | Delete
$( items ).each( function() {
[613] Fix | Delete
var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
[614] Fix | Delete
.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
[615] Fix | Delete
if ( res ) {
[616] Fix | Delete
str.push(
[617] Fix | Delete
( o.key || res[ 1 ] + "[]" ) +
[618] Fix | Delete
"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
[619] Fix | Delete
}
[620] Fix | Delete
} );
[621] Fix | Delete
[622] Fix | Delete
if ( !str.length && o.key ) {
[623] Fix | Delete
str.push( o.key + "=" );
[624] Fix | Delete
}
[625] Fix | Delete
[626] Fix | Delete
return str.join( "&" );
[627] Fix | Delete
[628] Fix | Delete
},
[629] Fix | Delete
[630] Fix | Delete
toArray: function( o ) {
[631] Fix | Delete
[632] Fix | Delete
var items = this._getItemsAsjQuery( o && o.connected ),
[633] Fix | Delete
ret = [];
[634] Fix | Delete
[635] Fix | Delete
o = o || {};
[636] Fix | Delete
[637] Fix | Delete
items.each( function() {
[638] Fix | Delete
ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
[639] Fix | Delete
} );
[640] Fix | Delete
return ret;
[641] Fix | Delete
[642] Fix | Delete
},
[643] Fix | Delete
[644] Fix | Delete
/* Be careful with the following core functions */
[645] Fix | Delete
_intersectsWith: function( item ) {
[646] Fix | Delete
[647] Fix | Delete
var x1 = this.positionAbs.left,
[648] Fix | Delete
x2 = x1 + this.helperProportions.width,
[649] Fix | Delete
y1 = this.positionAbs.top,
[650] Fix | Delete
y2 = y1 + this.helperProportions.height,
[651] Fix | Delete
l = item.left,
[652] Fix | Delete
r = l + item.width,
[653] Fix | Delete
t = item.top,
[654] Fix | Delete
b = t + item.height,
[655] Fix | Delete
dyClick = this.offset.click.top,
[656] Fix | Delete
dxClick = this.offset.click.left,
[657] Fix | Delete
isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
[658] Fix | Delete
( y1 + dyClick ) < b ),
[659] Fix | Delete
isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
[660] Fix | Delete
( x1 + dxClick ) < r ),
[661] Fix | Delete
isOverElement = isOverElementHeight && isOverElementWidth;
[662] Fix | Delete
[663] Fix | Delete
if ( this.options.tolerance === "pointer" ||
[664] Fix | Delete
this.options.forcePointerForContainers ||
[665] Fix | Delete
( this.options.tolerance !== "pointer" &&
[666] Fix | Delete
this.helperProportions[ this.floating ? "width" : "height" ] >
[667] Fix | Delete
item[ this.floating ? "width" : "height" ] )
[668] Fix | Delete
) {
[669] Fix | Delete
return isOverElement;
[670] Fix | Delete
} else {
[671] Fix | Delete
[672] Fix | Delete
return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
[673] Fix | Delete
x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
[674] Fix | Delete
t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
[675] Fix | Delete
y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
[676] Fix | Delete
[677] Fix | Delete
}
[678] Fix | Delete
},
[679] Fix | Delete
[680] Fix | Delete
_intersectsWithPointer: function( item ) {
[681] Fix | Delete
var verticalDirection, horizontalDirection,
[682] Fix | Delete
isOverElementHeight = ( this.options.axis === "x" ) ||
[683] Fix | Delete
this._isOverAxis(
[684] Fix | Delete
this.positionAbs.top + this.offset.click.top, item.top, item.height ),
[685] Fix | Delete
isOverElementWidth = ( this.options.axis === "y" ) ||
[686] Fix | Delete
this._isOverAxis(
[687] Fix | Delete
this.positionAbs.left + this.offset.click.left, item.left, item.width ),
[688] Fix | Delete
isOverElement = isOverElementHeight && isOverElementWidth;
[689] Fix | Delete
[690] Fix | Delete
if ( !isOverElement ) {
[691] Fix | Delete
return false;
[692] Fix | Delete
}
[693] Fix | Delete
[694] Fix | Delete
verticalDirection = this.dragDirection.vertical;
[695] Fix | Delete
horizontalDirection = this.dragDirection.horizontal;
[696] Fix | Delete
[697] Fix | Delete
return this.floating ?
[698] Fix | Delete
( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
[699] Fix | Delete
( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
[700] Fix | Delete
[701] Fix | Delete
},
[702] Fix | Delete
[703] Fix | Delete
_intersectsWithSides: function( item ) {
[704] Fix | Delete
[705] Fix | Delete
var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
[706] Fix | Delete
this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
[707] Fix | Delete
isOverRightHalf = this._isOverAxis( this.positionAbs.left +
[708] Fix | Delete
this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
[709] Fix | Delete
verticalDirection = this.dragDirection.vertical,
[710] Fix | Delete
horizontalDirection = this.dragDirection.horizontal;
[711] Fix | Delete
[712] Fix | Delete
if ( this.floating && horizontalDirection ) {
[713] Fix | Delete
return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
[714] Fix | Delete
( horizontalDirection === "left" && !isOverRightHalf ) );
[715] Fix | Delete
} else {
[716] Fix | Delete
return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
[717] Fix | Delete
( verticalDirection === "up" && !isOverBottomHalf ) );
[718] Fix | Delete
}
[719] Fix | Delete
[720] Fix | Delete
},
[721] Fix | Delete
[722] Fix | Delete
_getDragVerticalDirection: function() {
[723] Fix | Delete
var delta = this.positionAbs.top - this.lastPositionAbs.top;
[724] Fix | Delete
return delta !== 0 && ( delta > 0 ? "down" : "up" );
[725] Fix | Delete
},
[726] Fix | Delete
[727] Fix | Delete
_getDragHorizontalDirection: function() {
[728] Fix | Delete
var delta = this.positionAbs.left - this.lastPositionAbs.left;
[729] Fix | Delete
return delta !== 0 && ( delta > 0 ? "right" : "left" );
[730] Fix | Delete
},
[731] Fix | Delete
[732] Fix | Delete
refresh: function( event ) {
[733] Fix | Delete
this._refreshItems( event );
[734] Fix | Delete
this._setHandleClassName();
[735] Fix | Delete
this.refreshPositions();
[736] Fix | Delete
return this;
[737] Fix | Delete
},
[738] Fix | Delete
[739] Fix | Delete
_connectWith: function() {
[740] Fix | Delete
var options = this.options;
[741] Fix | Delete
return options.connectWith.constructor === String ?
[742] Fix | Delete
[ options.connectWith ] :
[743] Fix | Delete
options.connectWith;
[744] Fix | Delete
},
[745] Fix | Delete
[746] Fix | Delete
_getItemsAsjQuery: function( connected ) {
[747] Fix | Delete
[748] Fix | Delete
var i, j, cur, inst,
[749] Fix | Delete
items = [],
[750] Fix | Delete
queries = [],
[751] Fix | Delete
connectWith = this._connectWith();
[752] Fix | Delete
[753] Fix | Delete
if ( connectWith && connected ) {
[754] Fix | Delete
for ( i = connectWith.length - 1; i >= 0; i-- ) {
[755] Fix | Delete
cur = $( connectWith[ i ], this.document[ 0 ] );
[756] Fix | Delete
for ( j = cur.length - 1; j >= 0; j-- ) {
[757] Fix | Delete
inst = $.data( cur[ j ], this.widgetFullName );
[758] Fix | Delete
if ( inst && inst !== this && !inst.options.disabled ) {
[759] Fix | Delete
queries.push( [ typeof inst.options.items === "function" ?
[760] Fix | Delete
inst.options.items.call( inst.element ) :
[761] Fix | Delete
$( inst.options.items, inst.element )
[762] Fix | Delete
.not( ".ui-sortable-helper" )
[763] Fix | Delete
.not( ".ui-sortable-placeholder" ), inst ] );
[764] Fix | Delete
}
[765] Fix | Delete
}
[766] Fix | Delete
}
[767] Fix | Delete
}
[768] Fix | Delete
[769] Fix | Delete
queries.push( [ typeof this.options.items === "function" ?
[770] Fix | Delete
this.options.items
[771] Fix | Delete
.call( this.element, null, { options: this.options, item: this.currentItem } ) :
[772] Fix | Delete
$( this.options.items, this.element )
[773] Fix | Delete
.not( ".ui-sortable-helper" )
[774] Fix | Delete
.not( ".ui-sortable-placeholder" ), this ] );
[775] Fix | Delete
[776] Fix | Delete
function addItems() {
[777] Fix | Delete
items.push( this );
[778] Fix | Delete
}
[779] Fix | Delete
for ( i = queries.length - 1; i >= 0; i-- ) {
[780] Fix | Delete
queries[ i ][ 0 ].each( addItems );
[781] Fix | Delete
}
[782] Fix | Delete
[783] Fix | Delete
return $( items );
[784] Fix | Delete
[785] Fix | Delete
},
[786] Fix | Delete
[787] Fix | Delete
_removeCurrentsFromItems: function() {
[788] Fix | Delete
[789] Fix | Delete
var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
[790] Fix | Delete
[791] Fix | Delete
this.items = $.grep( this.items, function( item ) {
[792] Fix | Delete
for ( var j = 0; j < list.length; j++ ) {
[793] Fix | Delete
if ( list[ j ] === item.item[ 0 ] ) {
[794] Fix | Delete
return false;
[795] Fix | Delete
}
[796] Fix | Delete
}
[797] Fix | Delete
return true;
[798] Fix | Delete
} );
[799] Fix | Delete
[800] Fix | Delete
},
[801] Fix | Delete
[802] Fix | Delete
_refreshItems: function( event ) {
[803] Fix | Delete
[804] Fix | Delete
this.items = [];
[805] Fix | Delete
this.containers = [ this ];
[806] Fix | Delete
[807] Fix | Delete
var i, j, cur, inst, targetData, _queries, item, queriesLength,
[808] Fix | Delete
items = this.items,
[809] Fix | Delete
queries = [ [ typeof this.options.items === "function" ?
[810] Fix | Delete
this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
[811] Fix | Delete
$( this.options.items, this.element ), this ] ],
[812] Fix | Delete
connectWith = this._connectWith();
[813] Fix | Delete
[814] Fix | Delete
//Shouldn't be run the first time through due to massive slow-down
[815] Fix | Delete
if ( connectWith && this.ready ) {
[816] Fix | Delete
for ( i = connectWith.length - 1; i >= 0; i-- ) {
[817] Fix | Delete
cur = $( connectWith[ i ], this.document[ 0 ] );
[818] Fix | Delete
for ( j = cur.length - 1; j >= 0; j-- ) {
[819] Fix | Delete
inst = $.data( cur[ j ], this.widgetFullName );
[820] Fix | Delete
if ( inst && inst !== this && !inst.options.disabled ) {
[821] Fix | Delete
queries.push( [ typeof inst.options.items === "function" ?
[822] Fix | Delete
inst.options.items
[823] Fix | Delete
.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
[824] Fix | Delete
$( inst.options.items, inst.element ), inst ] );
[825] Fix | Delete
this.containers.push( inst );
[826] Fix | Delete
}
[827] Fix | Delete
}
[828] Fix | Delete
}
[829] Fix | Delete
}
[830] Fix | Delete
[831] Fix | Delete
for ( i = queries.length - 1; i >= 0; i-- ) {
[832] Fix | Delete
targetData = queries[ i ][ 1 ];
[833] Fix | Delete
_queries = queries[ i ][ 0 ];
[834] Fix | Delete
[835] Fix | Delete
for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
[836] Fix | Delete
item = $( _queries[ j ] );
[837] Fix | Delete
[838] Fix | Delete
// Data for target checking (mouse manager)
[839] Fix | Delete
item.data( this.widgetName + "-item", targetData );
[840] Fix | Delete
[841] Fix | Delete
items.push( {
[842] Fix | Delete
item: item,
[843] Fix | Delete
instance: targetData,
[844] Fix | Delete
width: 0, height: 0,
[845] Fix | Delete
left: 0, top: 0
[846] Fix | Delete
} );
[847] Fix | Delete
}
[848] Fix | Delete
}
[849] Fix | Delete
[850] Fix | Delete
},
[851] Fix | Delete
[852] Fix | Delete
_refreshItemPositions: function( fast ) {
[853] Fix | Delete
var i, item, t, p;
[854] Fix | Delete
[855] Fix | Delete
for ( i = this.items.length - 1; i >= 0; i-- ) {
[856] Fix | Delete
item = this.items[ i ];
[857] Fix | Delete
[858] Fix | Delete
//We ignore calculating positions of all connected containers when we're not over them
[859] Fix | Delete
if ( this.currentContainer && item.instance !== this.currentContainer &&
[860] Fix | Delete
item.item[ 0 ] !== this.currentItem[ 0 ] ) {
[861] Fix | Delete
continue;
[862] Fix | Delete
}
[863] Fix | Delete
[864] Fix | Delete
t = this.options.toleranceElement ?
[865] Fix | Delete
$( this.options.toleranceElement, item.item ) :
[866] Fix | Delete
item.item;
[867] Fix | Delete
[868] Fix | Delete
if ( !fast ) {
[869] Fix | Delete
item.width = t.outerWidth();
[870] Fix | Delete
item.height = t.outerHeight();
[871] Fix | Delete
}
[872] Fix | Delete
[873] Fix | Delete
p = t.offset();
[874] Fix | Delete
item.left = p.left;
[875] Fix | Delete
item.top = p.top;
[876] Fix | Delete
}
[877] Fix | Delete
},
[878] Fix | Delete
[879] Fix | Delete
refreshPositions: function( fast ) {
[880] Fix | Delete
[881] Fix | Delete
// Determine whether items are being displayed horizontally
[882] Fix | Delete
this.floating = this.items.length ?
[883] Fix | Delete
this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
[884] Fix | Delete
false;
[885] Fix | Delete
[886] Fix | Delete
// This has to be redone because due to the item being moved out/into the offsetParent,
[887] Fix | Delete
// the offsetParent's position will change
[888] Fix | Delete
if ( this.offsetParent && this.helper ) {
[889] Fix | Delete
this.offset.parent = this._getParentOffset();
[890] Fix | Delete
}
[891] Fix | Delete
[892] Fix | Delete
this._refreshItemPositions( fast );
[893] Fix | Delete
[894] Fix | Delete
var i, p;
[895] Fix | Delete
[896] Fix | Delete
if ( this.options.custom && this.options.custom.refreshContainers ) {
[897] Fix | Delete
this.options.custom.refreshContainers.call( this );
[898] Fix | Delete
} else {
[899] Fix | Delete
for ( i = this.containers.length - 1; i >= 0; i-- ) {
[900] Fix | Delete
p = this.containers[ i ].element.offset();
[901] Fix | Delete
this.containers[ i ].containerCache.left = p.left;
[902] Fix | Delete
this.containers[ i ].containerCache.top = p.top;
[903] Fix | Delete
this.containers[ i ].containerCache.width =
[904] Fix | Delete
this.containers[ i ].element.outerWidth();
[905] Fix | Delete
this.containers[ i ].containerCache.height =
[906] Fix | Delete
this.containers[ i ].element.outerHeight();
[907] Fix | Delete
}
[908] Fix | Delete
}
[909] Fix | Delete
[910] Fix | Delete
return this;
[911] Fix | Delete
},
[912] Fix | Delete
[913] Fix | Delete
_createPlaceholder: function( that ) {
[914] Fix | Delete
that = that || this;
[915] Fix | Delete
var className, nodeName,
[916] Fix | Delete
o = that.options;
[917] Fix | Delete
[918] Fix | Delete
if ( !o.placeholder || o.placeholder.constructor === String ) {
[919] Fix | Delete
className = o.placeholder;
[920] Fix | Delete
nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
[921] Fix | Delete
o.placeholder = {
[922] Fix | Delete
element: function() {
[923] Fix | Delete
[924] Fix | Delete
var element = $( "<" + nodeName + ">", that.document[ 0 ] );
[925] Fix | Delete
[926] Fix | Delete
that._addClass( element, "ui-sortable-placeholder",
[927] Fix | Delete
className || that.currentItem[ 0 ].className )
[928] Fix | Delete
._removeClass( element, "ui-sortable-helper" );
[929] Fix | Delete
[930] Fix | Delete
if ( nodeName === "tbody" ) {
[931] Fix | Delete
that._createTrPlaceholder(
[932] Fix | Delete
that.currentItem.find( "tr" ).eq( 0 ),
[933] Fix | Delete
$( "<tr>", that.document[ 0 ] ).appendTo( element )
[934] Fix | Delete
);
[935] Fix | Delete
} else if ( nodeName === "tr" ) {
[936] Fix | Delete
that._createTrPlaceholder( that.currentItem, element );
[937] Fix | Delete
} else if ( nodeName === "img" ) {
[938] Fix | Delete
element.attr( "src", that.currentItem.attr( "src" ) );
[939] Fix | Delete
}
[940] Fix | Delete
[941] Fix | Delete
if ( !className ) {
[942] Fix | Delete
element.css( "visibility", "hidden" );
[943] Fix | Delete
}
[944] Fix | Delete
[945] Fix | Delete
return element;
[946] Fix | Delete
},
[947] Fix | Delete
update: function( container, p ) {
[948] Fix | Delete
[949] Fix | Delete
// 1. If a className is set as 'placeholder option, we don't force sizes -
[950] Fix | Delete
// the class is responsible for that
[951] Fix | Delete
// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
[952] Fix | Delete
// class name is specified
[953] Fix | Delete
if ( className && !o.forcePlaceholderSize ) {
[954] Fix | Delete
return;
[955] Fix | Delete
}
[956] Fix | Delete
[957] Fix | Delete
// If the element doesn't have a actual height or width by itself (without
[958] Fix | Delete
// styles coming from a stylesheet), it receives the inline height and width
[959] Fix | Delete
// from the dragged item. Or, if it's a tbody or tr, it's going to have a height
[960] Fix | Delete
// anyway since we're populating them with <td>s above, but they're unlikely to
[961] Fix | Delete
// be the correct height on their own if the row heights are dynamic, so we'll
[962] Fix | Delete
// always assign the height of the dragged item given forcePlaceholderSize
[963] Fix | Delete
// is true.
[964] Fix | Delete
if ( !p.height() || ( o.forcePlaceholderSize &&
[965] Fix | Delete
( nodeName === "tbody" || nodeName === "tr" ) ) ) {
[966] Fix | Delete
p.height(
[967] Fix | Delete
that.currentItem.innerHeight() -
[968] Fix | Delete
parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
[969] Fix | Delete
parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
[970] Fix | Delete
}
[971] Fix | Delete
if ( !p.width() ) {
[972] Fix | Delete
p.width(
[973] Fix | Delete
that.currentItem.innerWidth() -
[974] Fix | Delete
parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
[975] Fix | Delete
parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
[976] Fix | Delete
}
[977] Fix | Delete
}
[978] Fix | Delete
};
[979] Fix | Delete
}
[980] Fix | Delete
[981] Fix | Delete
//Create the placeholder
[982] Fix | Delete
that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
[983] Fix | Delete
[984] Fix | Delete
//Append it after the actual current item
[985] Fix | Delete
that.currentItem.after( that.placeholder );
[986] Fix | Delete
[987] Fix | Delete
//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
[988] Fix | Delete
o.placeholder.update( that, that.placeholder );
[989] Fix | Delete
[990] Fix | Delete
},
[991] Fix | Delete
[992] Fix | Delete
_createTrPlaceholder: function( sourceTr, targetTr ) {
[993] Fix | Delete
var that = this;
[994] Fix | Delete
[995] Fix | Delete
sourceTr.children().each( function() {
[996] Fix | Delete
$( "<td>&#160;</td>", that.document[ 0 ] )
[997] Fix | Delete
.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
[998] Fix | Delete
.appendTo( targetTr );
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function