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
} );
[1000] Fix | Delete
},
[1001] Fix | Delete
[1002] Fix | Delete
_contactContainers: function( event ) {
[1003] Fix | Delete
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
[1004] Fix | Delete
floating, axis,
[1005] Fix | Delete
innermostContainer = null,
[1006] Fix | Delete
innermostIndex = null;
[1007] Fix | Delete
[1008] Fix | Delete
// Get innermost container that intersects with item
[1009] Fix | Delete
for ( i = this.containers.length - 1; i >= 0; i-- ) {
[1010] Fix | Delete
[1011] Fix | Delete
// Never consider a container that's located within the item itself
[1012] Fix | Delete
if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
[1013] Fix | Delete
continue;
[1014] Fix | Delete
}
[1015] Fix | Delete
[1016] Fix | Delete
if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
[1017] Fix | Delete
[1018] Fix | Delete
// If we've already found a container and it's more "inner" than this, then continue
[1019] Fix | Delete
if ( innermostContainer &&
[1020] Fix | Delete
$.contains(
[1021] Fix | Delete
this.containers[ i ].element[ 0 ],
[1022] Fix | Delete
innermostContainer.element[ 0 ] ) ) {
[1023] Fix | Delete
continue;
[1024] Fix | Delete
}
[1025] Fix | Delete
[1026] Fix | Delete
innermostContainer = this.containers[ i ];
[1027] Fix | Delete
innermostIndex = i;
[1028] Fix | Delete
[1029] Fix | Delete
} else {
[1030] Fix | Delete
[1031] Fix | Delete
// container doesn't intersect. trigger "out" event if necessary
[1032] Fix | Delete
if ( this.containers[ i ].containerCache.over ) {
[1033] Fix | Delete
this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
[1034] Fix | Delete
this.containers[ i ].containerCache.over = 0;
[1035] Fix | Delete
}
[1036] Fix | Delete
}
[1037] Fix | Delete
[1038] Fix | Delete
}
[1039] Fix | Delete
[1040] Fix | Delete
// If no intersecting containers found, return
[1041] Fix | Delete
if ( !innermostContainer ) {
[1042] Fix | Delete
return;
[1043] Fix | Delete
}
[1044] Fix | Delete
[1045] Fix | Delete
// Move the item into the container if it's not there already
[1046] Fix | Delete
if ( this.containers.length === 1 ) {
[1047] Fix | Delete
if ( !this.containers[ innermostIndex ].containerCache.over ) {
[1048] Fix | Delete
this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
[1049] Fix | Delete
this.containers[ innermostIndex ].containerCache.over = 1;
[1050] Fix | Delete
}
[1051] Fix | Delete
} else {
[1052] Fix | Delete
[1053] Fix | Delete
// When entering a new container, we will find the item with the least distance and
[1054] Fix | Delete
// append our item near it
[1055] Fix | Delete
dist = 10000;
[1056] Fix | Delete
itemWithLeastDistance = null;
[1057] Fix | Delete
floating = innermostContainer.floating || this._isFloating( this.currentItem );
[1058] Fix | Delete
posProperty = floating ? "left" : "top";
[1059] Fix | Delete
sizeProperty = floating ? "width" : "height";
[1060] Fix | Delete
axis = floating ? "pageX" : "pageY";
[1061] Fix | Delete
[1062] Fix | Delete
for ( j = this.items.length - 1; j >= 0; j-- ) {
[1063] Fix | Delete
if ( !$.contains(
[1064] Fix | Delete
this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
[1065] Fix | Delete
) {
[1066] Fix | Delete
continue;
[1067] Fix | Delete
}
[1068] Fix | Delete
if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
[1069] Fix | Delete
continue;
[1070] Fix | Delete
}
[1071] Fix | Delete
[1072] Fix | Delete
cur = this.items[ j ].item.offset()[ posProperty ];
[1073] Fix | Delete
nearBottom = false;
[1074] Fix | Delete
if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
[1075] Fix | Delete
nearBottom = true;
[1076] Fix | Delete
}
[1077] Fix | Delete
[1078] Fix | Delete
if ( Math.abs( event[ axis ] - cur ) < dist ) {
[1079] Fix | Delete
dist = Math.abs( event[ axis ] - cur );
[1080] Fix | Delete
itemWithLeastDistance = this.items[ j ];
[1081] Fix | Delete
this.direction = nearBottom ? "up" : "down";
[1082] Fix | Delete
}
[1083] Fix | Delete
}
[1084] Fix | Delete
[1085] Fix | Delete
//Check if dropOnEmpty is enabled
[1086] Fix | Delete
if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
[1087] Fix | Delete
return;
[1088] Fix | Delete
}
[1089] Fix | Delete
[1090] Fix | Delete
if ( this.currentContainer === this.containers[ innermostIndex ] ) {
[1091] Fix | Delete
if ( !this.currentContainer.containerCache.over ) {
[1092] Fix | Delete
this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
[1093] Fix | Delete
this.currentContainer.containerCache.over = 1;
[1094] Fix | Delete
}
[1095] Fix | Delete
return;
[1096] Fix | Delete
}
[1097] Fix | Delete
[1098] Fix | Delete
if ( itemWithLeastDistance ) {
[1099] Fix | Delete
this._rearrange( event, itemWithLeastDistance, null, true );
[1100] Fix | Delete
} else {
[1101] Fix | Delete
this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
[1102] Fix | Delete
}
[1103] Fix | Delete
this._trigger( "change", event, this._uiHash() );
[1104] Fix | Delete
this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
[1105] Fix | Delete
this.currentContainer = this.containers[ innermostIndex ];
[1106] Fix | Delete
[1107] Fix | Delete
//Update the placeholder
[1108] Fix | Delete
this.options.placeholder.update( this.currentContainer, this.placeholder );
[1109] Fix | Delete
[1110] Fix | Delete
//Update scrollParent
[1111] Fix | Delete
this.scrollParent = this.placeholder.scrollParent();
[1112] Fix | Delete
[1113] Fix | Delete
//Update overflowOffset
[1114] Fix | Delete
if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
[1115] Fix | Delete
this.scrollParent[ 0 ].tagName !== "HTML" ) {
[1116] Fix | Delete
this.overflowOffset = this.scrollParent.offset();
[1117] Fix | Delete
}
[1118] Fix | Delete
[1119] Fix | Delete
this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
[1120] Fix | Delete
this.containers[ innermostIndex ].containerCache.over = 1;
[1121] Fix | Delete
}
[1122] Fix | Delete
[1123] Fix | Delete
},
[1124] Fix | Delete
[1125] Fix | Delete
_createHelper: function( event ) {
[1126] Fix | Delete
[1127] Fix | Delete
var o = this.options,
[1128] Fix | Delete
helper = typeof o.helper === "function" ?
[1129] Fix | Delete
$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
[1130] Fix | Delete
( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
[1131] Fix | Delete
[1132] Fix | Delete
//Add the helper to the DOM if that didn't happen already
[1133] Fix | Delete
if ( !helper.parents( "body" ).length ) {
[1134] Fix | Delete
this.appendTo[ 0 ].appendChild( helper[ 0 ] );
[1135] Fix | Delete
}
[1136] Fix | Delete
[1137] Fix | Delete
if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
[1138] Fix | Delete
this._storedCSS = {
[1139] Fix | Delete
width: this.currentItem[ 0 ].style.width,
[1140] Fix | Delete
height: this.currentItem[ 0 ].style.height,
[1141] Fix | Delete
position: this.currentItem.css( "position" ),
[1142] Fix | Delete
top: this.currentItem.css( "top" ),
[1143] Fix | Delete
left: this.currentItem.css( "left" )
[1144] Fix | Delete
};
[1145] Fix | Delete
}
[1146] Fix | Delete
[1147] Fix | Delete
if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
[1148] Fix | Delete
helper.width( this.currentItem.width() );
[1149] Fix | Delete
}
[1150] Fix | Delete
if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
[1151] Fix | Delete
helper.height( this.currentItem.height() );
[1152] Fix | Delete
}
[1153] Fix | Delete
[1154] Fix | Delete
return helper;
[1155] Fix | Delete
[1156] Fix | Delete
},
[1157] Fix | Delete
[1158] Fix | Delete
_adjustOffsetFromHelper: function( obj ) {
[1159] Fix | Delete
if ( typeof obj === "string" ) {
[1160] Fix | Delete
obj = obj.split( " " );
[1161] Fix | Delete
}
[1162] Fix | Delete
if ( Array.isArray( obj ) ) {
[1163] Fix | Delete
obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
[1164] Fix | Delete
}
[1165] Fix | Delete
if ( "left" in obj ) {
[1166] Fix | Delete
this.offset.click.left = obj.left + this.margins.left;
[1167] Fix | Delete
}
[1168] Fix | Delete
if ( "right" in obj ) {
[1169] Fix | Delete
this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
[1170] Fix | Delete
}
[1171] Fix | Delete
if ( "top" in obj ) {
[1172] Fix | Delete
this.offset.click.top = obj.top + this.margins.top;
[1173] Fix | Delete
}
[1174] Fix | Delete
if ( "bottom" in obj ) {
[1175] Fix | Delete
this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
[1176] Fix | Delete
}
[1177] Fix | Delete
},
[1178] Fix | Delete
[1179] Fix | Delete
_getParentOffset: function() {
[1180] Fix | Delete
[1181] Fix | Delete
//Get the offsetParent and cache its position
[1182] Fix | Delete
this.offsetParent = this.helper.offsetParent();
[1183] Fix | Delete
var po = this.offsetParent.offset();
[1184] Fix | Delete
[1185] Fix | Delete
// This is a special case where we need to modify a offset calculated on start, since the
[1186] Fix | Delete
// following happened:
[1187] Fix | Delete
// 1. The position of the helper is absolute, so it's position is calculated based on the
[1188] Fix | Delete
// next positioned parent
[1189] Fix | Delete
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
[1190] Fix | Delete
// the document, which means that the scroll is included in the initial calculation of the
[1191] Fix | Delete
// offset of the parent, and never recalculated upon drag
[1192] Fix | Delete
if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
[1193] Fix | Delete
$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
[1194] Fix | Delete
po.left += this.scrollParent.scrollLeft();
[1195] Fix | Delete
po.top += this.scrollParent.scrollTop();
[1196] Fix | Delete
}
[1197] Fix | Delete
[1198] Fix | Delete
// This needs to be actually done for all browsers, since pageX/pageY includes this
[1199] Fix | Delete
// information with an ugly IE fix
[1200] Fix | Delete
if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
[1201] Fix | Delete
( this.offsetParent[ 0 ].tagName &&
[1202] Fix | Delete
this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
[1203] Fix | Delete
po = { top: 0, left: 0 };
[1204] Fix | Delete
}
[1205] Fix | Delete
[1206] Fix | Delete
return {
[1207] Fix | Delete
top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
[1208] Fix | Delete
left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
[1209] Fix | Delete
};
[1210] Fix | Delete
[1211] Fix | Delete
},
[1212] Fix | Delete
[1213] Fix | Delete
_getRelativeOffset: function() {
[1214] Fix | Delete
[1215] Fix | Delete
if ( this.cssPosition === "relative" ) {
[1216] Fix | Delete
var p = this.currentItem.position();
[1217] Fix | Delete
return {
[1218] Fix | Delete
top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
[1219] Fix | Delete
this.scrollParent.scrollTop(),
[1220] Fix | Delete
left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
[1221] Fix | Delete
this.scrollParent.scrollLeft()
[1222] Fix | Delete
};
[1223] Fix | Delete
} else {
[1224] Fix | Delete
return { top: 0, left: 0 };
[1225] Fix | Delete
}
[1226] Fix | Delete
[1227] Fix | Delete
},
[1228] Fix | Delete
[1229] Fix | Delete
_cacheMargins: function() {
[1230] Fix | Delete
this.margins = {
[1231] Fix | Delete
left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
[1232] Fix | Delete
top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
[1233] Fix | Delete
};
[1234] Fix | Delete
},
[1235] Fix | Delete
[1236] Fix | Delete
_cacheHelperProportions: function() {
[1237] Fix | Delete
this.helperProportions = {
[1238] Fix | Delete
width: this.helper.outerWidth(),
[1239] Fix | Delete
height: this.helper.outerHeight()
[1240] Fix | Delete
};
[1241] Fix | Delete
},
[1242] Fix | Delete
[1243] Fix | Delete
_setContainment: function() {
[1244] Fix | Delete
[1245] Fix | Delete
var ce, co, over,
[1246] Fix | Delete
o = this.options;
[1247] Fix | Delete
if ( o.containment === "parent" ) {
[1248] Fix | Delete
o.containment = this.helper[ 0 ].parentNode;
[1249] Fix | Delete
}
[1250] Fix | Delete
if ( o.containment === "document" || o.containment === "window" ) {
[1251] Fix | Delete
this.containment = [
[1252] Fix | Delete
0 - this.offset.relative.left - this.offset.parent.left,
[1253] Fix | Delete
0 - this.offset.relative.top - this.offset.parent.top,
[1254] Fix | Delete
o.containment === "document" ?
[1255] Fix | Delete
this.document.width() :
[1256] Fix | Delete
this.window.width() - this.helperProportions.width - this.margins.left,
[1257] Fix | Delete
( o.containment === "document" ?
[1258] Fix | Delete
( this.document.height() || document.body.parentNode.scrollHeight ) :
[1259] Fix | Delete
this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
[1260] Fix | Delete
) - this.helperProportions.height - this.margins.top
[1261] Fix | Delete
];
[1262] Fix | Delete
}
[1263] Fix | Delete
[1264] Fix | Delete
if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
[1265] Fix | Delete
ce = $( o.containment )[ 0 ];
[1266] Fix | Delete
co = $( o.containment ).offset();
[1267] Fix | Delete
over = ( $( ce ).css( "overflow" ) !== "hidden" );
[1268] Fix | Delete
[1269] Fix | Delete
this.containment = [
[1270] Fix | Delete
co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
[1271] Fix | Delete
( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
[1272] Fix | Delete
co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
[1273] Fix | Delete
( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
[1274] Fix | Delete
co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
[1275] Fix | Delete
( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
[1276] Fix | Delete
( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
[1277] Fix | Delete
this.helperProportions.width - this.margins.left,
[1278] Fix | Delete
co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
[1279] Fix | Delete
( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
[1280] Fix | Delete
( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
[1281] Fix | Delete
this.helperProportions.height - this.margins.top
[1282] Fix | Delete
];
[1283] Fix | Delete
}
[1284] Fix | Delete
[1285] Fix | Delete
},
[1286] Fix | Delete
[1287] Fix | Delete
_convertPositionTo: function( d, pos ) {
[1288] Fix | Delete
[1289] Fix | Delete
if ( !pos ) {
[1290] Fix | Delete
pos = this.position;
[1291] Fix | Delete
}
[1292] Fix | Delete
var mod = d === "absolute" ? 1 : -1,
[1293] Fix | Delete
scroll = this.cssPosition === "absolute" &&
[1294] Fix | Delete
!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
[1295] Fix | Delete
$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
[1296] Fix | Delete
this.offsetParent :
[1297] Fix | Delete
this.scrollParent,
[1298] Fix | Delete
scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
[1299] Fix | Delete
[1300] Fix | Delete
return {
[1301] Fix | Delete
top: (
[1302] Fix | Delete
[1303] Fix | Delete
// The absolute mouse position
[1304] Fix | Delete
pos.top +
[1305] Fix | Delete
[1306] Fix | Delete
// Only for relative positioned nodes: Relative offset from element to offset parent
[1307] Fix | Delete
this.offset.relative.top * mod +
[1308] Fix | Delete
[1309] Fix | Delete
// The offsetParent's offset without borders (offset + border)
[1310] Fix | Delete
this.offset.parent.top * mod -
[1311] Fix | Delete
( ( this.cssPosition === "fixed" ?
[1312] Fix | Delete
-this.scrollParent.scrollTop() :
[1313] Fix | Delete
( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
[1314] Fix | Delete
),
[1315] Fix | Delete
left: (
[1316] Fix | Delete
[1317] Fix | Delete
// The absolute mouse position
[1318] Fix | Delete
pos.left +
[1319] Fix | Delete
[1320] Fix | Delete
// Only for relative positioned nodes: Relative offset from element to offset parent
[1321] Fix | Delete
this.offset.relative.left * mod +
[1322] Fix | Delete
[1323] Fix | Delete
// The offsetParent's offset without borders (offset + border)
[1324] Fix | Delete
this.offset.parent.left * mod -
[1325] Fix | Delete
( ( this.cssPosition === "fixed" ?
[1326] Fix | Delete
-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
[1327] Fix | Delete
scroll.scrollLeft() ) * mod )
[1328] Fix | Delete
)
[1329] Fix | Delete
};
[1330] Fix | Delete
[1331] Fix | Delete
},
[1332] Fix | Delete
[1333] Fix | Delete
_generatePosition: function( event ) {
[1334] Fix | Delete
[1335] Fix | Delete
var top, left,
[1336] Fix | Delete
o = this.options,
[1337] Fix | Delete
pageX = event.pageX,
[1338] Fix | Delete
pageY = event.pageY,
[1339] Fix | Delete
scroll = this.cssPosition === "absolute" &&
[1340] Fix | Delete
!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
[1341] Fix | Delete
$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
[1342] Fix | Delete
this.offsetParent :
[1343] Fix | Delete
this.scrollParent,
[1344] Fix | Delete
scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
[1345] Fix | Delete
[1346] Fix | Delete
// This is another very weird special case that only happens for relative elements:
[1347] Fix | Delete
// 1. If the css position is relative
[1348] Fix | Delete
// 2. and the scroll parent is the document or similar to the offset parent
[1349] Fix | Delete
// we have to refresh the relative offset during the scroll so there are no jumps
[1350] Fix | Delete
if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
[1351] Fix | Delete
this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
[1352] Fix | Delete
this.offset.relative = this._getRelativeOffset();
[1353] Fix | Delete
}
[1354] Fix | Delete
[1355] Fix | Delete
/*
[1356] Fix | Delete
* - Position constraining -
[1357] Fix | Delete
* Constrain the position to a mix of grid, containment.
[1358] Fix | Delete
*/
[1359] Fix | Delete
[1360] Fix | Delete
if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
[1361] Fix | Delete
[1362] Fix | Delete
if ( this.containment ) {
[1363] Fix | Delete
if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
[1364] Fix | Delete
pageX = this.containment[ 0 ] + this.offset.click.left;
[1365] Fix | Delete
}
[1366] Fix | Delete
if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
[1367] Fix | Delete
pageY = this.containment[ 1 ] + this.offset.click.top;
[1368] Fix | Delete
}
[1369] Fix | Delete
if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
[1370] Fix | Delete
pageX = this.containment[ 2 ] + this.offset.click.left;
[1371] Fix | Delete
}
[1372] Fix | Delete
if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
[1373] Fix | Delete
pageY = this.containment[ 3 ] + this.offset.click.top;
[1374] Fix | Delete
}
[1375] Fix | Delete
}
[1376] Fix | Delete
[1377] Fix | Delete
if ( o.grid ) {
[1378] Fix | Delete
top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
[1379] Fix | Delete
o.grid[ 1 ] ) * o.grid[ 1 ];
[1380] Fix | Delete
pageY = this.containment ?
[1381] Fix | Delete
( ( top - this.offset.click.top >= this.containment[ 1 ] &&
[1382] Fix | Delete
top - this.offset.click.top <= this.containment[ 3 ] ) ?
[1383] Fix | Delete
top :
[1384] Fix | Delete
( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
[1385] Fix | Delete
top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
[1386] Fix | Delete
top;
[1387] Fix | Delete
[1388] Fix | Delete
left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
[1389] Fix | Delete
o.grid[ 0 ] ) * o.grid[ 0 ];
[1390] Fix | Delete
pageX = this.containment ?
[1391] Fix | Delete
( ( left - this.offset.click.left >= this.containment[ 0 ] &&
[1392] Fix | Delete
left - this.offset.click.left <= this.containment[ 2 ] ) ?
[1393] Fix | Delete
left :
[1394] Fix | Delete
( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
[1395] Fix | Delete
left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
[1396] Fix | Delete
left;
[1397] Fix | Delete
}
[1398] Fix | Delete
[1399] Fix | Delete
}
[1400] Fix | Delete
[1401] Fix | Delete
return {
[1402] Fix | Delete
top: (
[1403] Fix | Delete
[1404] Fix | Delete
// The absolute mouse position
[1405] Fix | Delete
pageY -
[1406] Fix | Delete
[1407] Fix | Delete
// Click offset (relative to the element)
[1408] Fix | Delete
this.offset.click.top -
[1409] Fix | Delete
[1410] Fix | Delete
// Only for relative positioned nodes: Relative offset from element to offset parent
[1411] Fix | Delete
this.offset.relative.top -
[1412] Fix | Delete
[1413] Fix | Delete
// The offsetParent's offset without borders (offset + border)
[1414] Fix | Delete
this.offset.parent.top +
[1415] Fix | Delete
( ( this.cssPosition === "fixed" ?
[1416] Fix | Delete
-this.scrollParent.scrollTop() :
[1417] Fix | Delete
( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
[1418] Fix | Delete
),
[1419] Fix | Delete
left: (
[1420] Fix | Delete
[1421] Fix | Delete
// The absolute mouse position
[1422] Fix | Delete
pageX -
[1423] Fix | Delete
[1424] Fix | Delete
// Click offset (relative to the element)
[1425] Fix | Delete
this.offset.click.left -
[1426] Fix | Delete
[1427] Fix | Delete
// Only for relative positioned nodes: Relative offset from element to offset parent
[1428] Fix | Delete
this.offset.relative.left -
[1429] Fix | Delete
[1430] Fix | Delete
// The offsetParent's offset without borders (offset + border)
[1431] Fix | Delete
this.offset.parent.left +
[1432] Fix | Delete
( ( this.cssPosition === "fixed" ?
[1433] Fix | Delete
-this.scrollParent.scrollLeft() :
[1434] Fix | Delete
scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
[1435] Fix | Delete
)
[1436] Fix | Delete
};
[1437] Fix | Delete
[1438] Fix | Delete
},
[1439] Fix | Delete
[1440] Fix | Delete
_rearrange: function( event, i, a, hardRefresh ) {
[1441] Fix | Delete
[1442] Fix | Delete
if ( a ) {
[1443] Fix | Delete
a[ 0 ].appendChild( this.placeholder[ 0 ] );
[1444] Fix | Delete
} else {
[1445] Fix | Delete
i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
[1446] Fix | Delete
( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
[1447] Fix | Delete
}
[1448] Fix | Delete
[1449] Fix | Delete
//Various things done here to improve the performance:
[1450] Fix | Delete
// 1. we create a setTimeout, that calls refreshPositions
[1451] Fix | Delete
// 2. on the instance, we have a counter variable, that get's higher after every append
[1452] Fix | Delete
// 3. on the local scope, we copy the counter variable, and check in the timeout,
[1453] Fix | Delete
// if it's still the same
[1454] Fix | Delete
// 4. this lets only the last addition to the timeout stack through
[1455] Fix | Delete
this.counter = this.counter ? ++this.counter : 1;
[1456] Fix | Delete
var counter = this.counter;
[1457] Fix | Delete
[1458] Fix | Delete
this._delay( function() {
[1459] Fix | Delete
if ( counter === this.counter ) {
[1460] Fix | Delete
[1461] Fix | Delete
//Precompute after each DOM insertion, NOT on mousemove
[1462] Fix | Delete
this.refreshPositions( !hardRefresh );
[1463] Fix | Delete
}
[1464] Fix | Delete
} );
[1465] Fix | Delete
[1466] Fix | Delete
},
[1467] Fix | Delete
[1468] Fix | Delete
_clear: function( event, noPropagation ) {
[1469] Fix | Delete
[1470] Fix | Delete
this.reverting = false;
[1471] Fix | Delete
[1472] Fix | Delete
// We delay all events that have to be triggered to after the point where the placeholder
[1473] Fix | Delete
// has been removed and everything else normalized again
[1474] Fix | Delete
var i,
[1475] Fix | Delete
delayedTriggers = [];
[1476] Fix | Delete
[1477] Fix | Delete
// We first have to update the dom position of the actual currentItem
[1478] Fix | Delete
// Note: don't do it if the current item is already removed (by a user), or it gets
[1479] Fix | Delete
// reappended (see #4088)
[1480] Fix | Delete
if ( !this._noFinalSort && this.currentItem.parent().length ) {
[1481] Fix | Delete
this.placeholder.before( this.currentItem );
[1482] Fix | Delete
}
[1483] Fix | Delete
this._noFinalSort = null;
[1484] Fix | Delete
[1485] Fix | Delete
if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
[1486] Fix | Delete
for ( i in this._storedCSS ) {
[1487] Fix | Delete
if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
[1488] Fix | Delete
this._storedCSS[ i ] = "";
[1489] Fix | Delete
}
[1490] Fix | Delete
}
[1491] Fix | Delete
this.currentItem.css( this._storedCSS );
[1492] Fix | Delete
this._removeClass( this.currentItem, "ui-sortable-helper" );
[1493] Fix | Delete
} else {
[1494] Fix | Delete
this.currentItem.show();
[1495] Fix | Delete
}
[1496] Fix | Delete
[1497] Fix | Delete
if ( this.fromOutside && !noPropagation ) {
[1498] Fix | Delete
delayedTriggers.push( function( event ) {
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function